[vdr] VDR -> S2API: 2 questions

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Sat Nov 22 15:56:14 CET 2008


On 22.11.2008 15:47, Klaus Schmidinger wrote:
> On 22.11.2008 14:17, Niels Wagenaar wrote:
>>> -----Oorspronkelijk bericht-----
>>> Van: n.wagenaar at xs4all.nl [mailto:vdr-bounces at linuxtv.org] Namens Niels
>>> Wagenaar
>>> Verzonden: zaterdag 22 november 2008 14:13
>>> Aan: VDR Mailing List
>>> Onderwerp: Re: [vdr] VDR -> S2API: 2 questions
>>>
>>> The patch from 7-10 is indeed the latest. There weren't any changes in
>>> S2API in the last weeks, which would or could my VDR/S2API patch.
>>>
>> (Damn Send button!)
>>
>> Which would or could break my VDR/S2API patch ;-)
>>
>> BTW, only DVB-S, DVB-S2 and DVB-T is really tested by me (and with great success). The DVB-C code is theory and untested.
> 
> This part of your patch is a little irritating:
> 
> -     if (ioctl(fd_frontend, DVBFE_GET_DELSYS, &frontendType) >= 0) {
> +//     if (ioctl(fd_frontend, DVBFE_GET_DELSYS, &frontendType) >= 0) {
> +     dvb_frontend_info feinfo;
> +     fe_type fetype;
> +     if (ioctl(fd_frontend, FE_GET_INFO, &feinfo) >= 0) {
> +        fetype =  feinfo.type;
> +        if (fetype == FE_QPSK)
> +            frontendType = SYS_DVBS;
> +        if (fetype == FE_OFDM)
> +            frontendType = SYS_DVBT;
> +        if (fetype == FE_QAM)
> +            frontendType = SYS_DVBC_ANNEX_AC;
> +        if (fetype == FE_ATSC)
> +            frontendType = SYS_ATSC;
> +
>          const char **DeliverySystem = DeliverySystems;
>          cString ds;
> +       cString check;
>          for (int i = 0; i < 32; i++) {
>              if (frontendType & (1u << i)) {
>                 numProvidedSystems++;
> 
> 
> In the multiproto driver, frontendType was a flag variable, where each bit
> indicated the presence of a particular frontend. That way DVB cards with
> different frontends were able to report all the frontend types they
> provide.
> 
> In S2API this is apparently an enum type, so the subsequent flag checking makes
> no sense any more. Or am I missing something?
> 
> How does a DVB device tell the application about its frontend types in S2API?

One more thing:

+       // Following is a hack so that DVB-S cards don't get DVB-S2 transports.
+       // If check has a value and is not NULL, it means that the card can handle
+       // DVB-S2 transports and frontendType is forces to SYS_DVBS2.
+       check = strstr(ds,"DVBS2");
+       if (*check)
+       {
+           isyslog("device %d forced to frontendType SYS_DVBS2\n", CardIndex() + 1);
+          frontendType = SYS_DVBS2;
+       }

How would "DVBS2" ever get into the ds string?
The flag checks are completely bogus, and the explicit setting of frontendType
above only sets SYS_DVBS, and not SYS_DVBS2.

Klaus



More information about the vdr mailing list