Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Patch for DVB-T support




Klaus,

Here is a patch to add DVB-T tuning to VDR.

In the UK (where I have tested the card), all the parameters are the same for 
every channel.  The only difference is the frequency. Therefore, my patch 
hardcodes those parameters into the tuning routine - only the Frequency and 
PIDs are needed in the channels.conf.

My system comprises a full-featured DVB-S card as my primary card, and the 
Hauppauge NOVA-t as a secondary card.  Therefore, all my DVB-T channels have 
a CA parameter of "2" to direct VDR to use the second card for those channels.

I believe there are still some issues with mixing different cards like this - 
I will investigate over the weekend.  For example, I get EPG data for the 
DVB-T channels, but not for the DVB-S channels.

For the benefit of other UK users, here are the main FTA channels available 
from the Crystal Palace transmitter (which serves London and SE England).  
The Frequency is in KHz (MHz isn't good enough for DVB-T).

BBC ONE:505833:0:0:0:600:601:0:2:4164
BBC TWO:505833:0:0:0:610:611:0:2:4228
ITV 1:481833:0:0:0:512:650:0:2:8261
Channel 4:481833:0:0:0:2827:2828:0:2:8384
Channel 5:561833:0:0:0:6017:6018:0:2:12866
ITV 2:481833:0:0:0:2818:2819:0:2:8325
BBC CHOICE:505833:0:0:0:620:621:0:2:4351
BBC NEWS 24:505833:0:0:0:640:641:0:2:4415
BBC Knowledge:505833:0:0:0:630:631:0:2:4607
Shop!:561833:0:0:0:6049:6050:0:2:13120

These can be mixed in the same channels.conf that you use for your DVB-S card.

And here is the tuning code for dvbapi.c

       case FE_OFDM: { // DVB-T
            // Frequency and OFDM paramaters:

            FrontendParameters Frontend;
            Frontend.Frequency = FrequencyMHz * 1000UL;
            Frontend.Inversion = INVERSION_AUTO;
            Frontend.u.ofdm.bandWidth=BANDWIDTH_8_MHZ;
            Frontend.u.ofdm.HP_CodeRate=FEC_2_3;
            Frontend.u.ofdm.LP_CodeRate=FEC_1_2;
            Frontend.u.ofdm.Constellation=QAM_64;
            Frontend.u.ofdm.TransmissionMode=TRANSMISSION_MODE_2K;
            Frontend.u.ofdm.guardInterval=GUARD_INTERVAL_1_32;
            Frontend.u.ofdm.HierarchyInformation=HIERARCHY_NONE;

            // Tuning:

            CHECK(ioctl(fd_frontend, FE_SET_FRONTEND, &Frontend));

            // Wait for channel sync:

            if (cFile::FileReady(fd_frontend, 5000)) {
               FrontendEvent event;
               int res = ioctl(fd_frontend, FE_GET_EVENT, &event);
               if (res >= 0)
                  ChannelSynced = event.type == FE_COMPLETION_EV;
               else
                  esyslog(LOG_ERR, "ERROR %d in frontend get event", res);
               }
            else
               esyslog(LOG_ERR, "ERROR: timeout while tuning");
            }
            break;



Home | Main Index | Thread Index