[mythtv] DisEqC and dvbchannel-v5.patch

Allan Stirling Dibblahmythml0015 at pendor.org
Thu Sep 8 12:18:58 UTC 2005


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 loop.

Cheers,

Allan.


More information about the mythtv-dev mailing list