[mythtv] DisEqC and dvbchannel-v5.patch

Stuart Auchterlonie stuarta at squashedfrog.net
Thu Sep 8 12:12:53 UTC 2005


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.

> 
>  /** \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.


Stuart



More information about the mythtv-dev mailing list