On Mon, 25 May 2009, Mauro Carvalho Chehab wrote:
>
> +       if (params->frequency >= 48000000 && params->frequency <= 154000000) \
> +               bs = 0x09;
> +       if (params->frequency >= 161000000 && params->frequency <= 439000000) 
> \
> +               bs = 0x0a;
> +       if (params->frequency >= 447000000 && params->frequency <= 863000000) 
> \
> +               bs = 0x08;
>
> Just remove the backslash. You don't need they.

The original code has this, but bs will be zero for a frequency between 154
MHz to 161 Mhz as welll as 439-447 MHz.  Probably wrong.  My guess is the
data sheet says, "low band 48 to 154 MHz, mid band 161 MHz to 439 MHz,
etc.," where 154 is the frequency of the last channel in the low band and
161 is the first channel in the mid band.  Then someone translated this to
code without really understanding what's going on.  It should probably be:

        if      (params->frequency > 443000000) bs = 0x08;
        else if (params->frequency > 157500000) bs = 0x0a;
        else                                    bs = 0x09;

The tuner's limits should already be enforced elsewhere.  Or just convert
this to use dvb_pll.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to