[mythtv] [mythtv-commits] Ticket #1502: DVB API requires usleep after certain calls to get reliable tuning on certain drivers (esp Nova-T).

Doug Scoular dscoular at cisco.com
Wed Mar 15 11:05:03 UTC 2006


Hi Daniel,
    I've just finished doing various testing of my patch versus yours
    (well, 9368, actually) and I think we still have a problem.

    In your code you are only doing a usleep after the FE_SET_FRONTEND
    ioctl but my code does this after all FE_SET_FRONTEND and
    FE_READ_STATUS ioctls. Apologies if I am misreading your
    code. IMHO I think my implementation is a closer mimickery
    of the scan.c code.

    Your code fails to tune on my Nova-T for certain channels and
    reports random noise for the BER and UNC on both my Nova-T
    and AverTV A800 tuners. I also get a blank dialog window when
    it fails to get lock after some other signal monitor timeout.

    I spent a while last night talking to the linuxtv guys and they are
    adamant (remember Ant music ;) the example reference for the API
    is linuxtv-apps and they still insist the usleep(200000) is a safety
    margin which they have factored into the API design to allow the
    driver writers a margin of error. The driver code already has
    usleeps throughout it but this extra usleep allows them to tweak
    the safety factor across all drivers and leave the kernel code
    untouched. If you are doing FE_READ_STATUS without
    waiting for their current safety margin of 200,000usecs then
    you are likely to get random noise returned as values.

    This certainly is bourne out in my testing on both my
    Nova-T (TDA1004x) and AverMedia AverTV USB 2.0
    A800 tuners.

    Would you like me to produce a new prototype patch based on your
    latest code ?

    Oh, and I had also removed the select(2) call in wait_for_backend
    in dvbchannel.cpp (I think the usleep makes it unnecessary but I'm
    not 100% sure).

    P.S. I really like the way you did the mythtv-setup allowing
    all card owners the ability to configure the usleep... nice.
    Ooh... and the new fading transitions between mythtv
    screens is just so nice!!! Ooh... and... ooh... ;^)

    Cheers,

    Doug




More information about the mythtv-dev mailing list