Mailing List archive

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

[linux-dvb] Re: cinergyT2: which kernel/usb module to use?



Holger Waechtler wrote:
> Klaus Schmidinger wrote:
> >>> do {
> >>>    int stat = ioctl(fd_frontend, FE_GET_EVENT, &Event);
> >>>    if (stat == 0)
> >>>       return true; //stefan lucke: ioctl is successful, so return ! 
> >>>the only way to break this loop.
> >>>    if (stat < 0) {
> >>>       if (errno == EINTR)
> >>>          continue;
> >>>       }
> >>>    } while (0);
> >>> return false; // stefan lucke: this code is unreached !!
...
> >Well, this code was originally written (ina similar form)
> >by Werner Fink, not me.
> >
> >Anyway, is there anything actually _wrong_ with it?
> >Can you suggest a better way to do this?
> 
> In any case you should read the entire set of status and error statistic 
> reports using FE_READ_XXX immediatly after poll() or select() returns. 
> Usually you will use a select()-timout of about 0.2...1 seconds, this 
> leads to smooth statistics of your error indicators in your OSD. If an 
> ioctl is not implemented just don't display that particular statistic 
> value, not all demods can report all statistics.

FE_READ_STAUS is superflous, because the event already tells you about
the status change. That's the whole point of having the event.

(And plain VDR doesn't have any stats display, so it doesn't use
FE_READ_BER etc.)

Johannes




Home | Main Index | Thread Index