[mythtv] DisEqC and dvbchannel-v5.patch
Dibblahmythml0015 at pendor.org
Thu Sep 8 12:22:21 UTC 2005
Allan Stirling wrote:
> Stuart Auchterlonie wrote:
>> On Thu, Sep 08, 2005 at 12:04:10PM +0100, Allan Stirling wrote:
>>> Daniel Kristjansson wrote:
>>>> Can you try the latest code?
>>> Err... Don't you mean to do something like this (Not a proper patch -
>>> There's some other non-related cruft in my dvbchannel.cpp) :
>>> @@ -689,11 +785,12 @@
>>> fe_status_t status;
>>> usleep(2000); // yield for 2 ms
>>> ioctl(fd, FE_READ_STATUS, &status);
>>> VERBOSE(VB_CHANNEL, toString(status));
>>> - return true;
>>> + if (status&&FE_HAS_LOCK)
>>> + return true;
>>> + return false;
>> This shouldn't be here as the comments on that function say not
>> to block and wait for lock as that is the job of the signal monitor.
>> That said, it probably should have a select loop with a smallish
>> timeout instead.
> Err... It's still not blocking?
>>> /** \fn handle_diseq(int, const DVBTuning&, DVBDiSEqC*, bool)
>>> @@ -725,7 +822,8 @@
>>> "Setting Frontend tuning parameters failed.");
>>> return false;
>>> - wait_for_backend(fd_frontend);
>>> + if (wait_for_backend(fd_frontend))
>>> + havetuned=true;
>> The way wait_for_backend is currently written havetuned would
>> always be set to true since wait for backend always returns true.
> Uhuh. That'd be the first part of the patch, above ;)
> Well, this works, the original code... Doesn't. How does it exit from
> the loop when tuning was successful? havetuned is never set inside the
Okay. Just looked again at the code (I should do this more before
sending mail ;)
I'm now looking through dvbdiseqc.cpp to see where it should be (and
isn't) setting havetuned.
More information about the mythtv-dev