Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Patch for cards with the Philips CD1516 tuner box(spXXXX?)



Hi,

Juha Yrjölä wrote:
> I managed to get my Fujitsu-Siemens PCI-DVB Cable card to tune to the
> whole frequency range (130..460 MHz) by patching the driver. The diff
> against the latest CVS HEAD is attached.

I'll apply it, but there is something weird, please see below...

> 
> I also cleaned up the tuner_set_tv_freq() function a bit.
> 
> Cheers,
> Juha
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: driver/frontends/ves1820.c
> ===================================================================
> RCS file: /cvs/linuxtv/DVB/driver/frontends/ves1820.c,v
> retrieving revision 1.2
> diff -u -b -r1.2 ves1820.c
> --- driver/frontends/ves1820.c	10 Oct 2002 19:22:30 -0000	1.2
> +++ driver/frontends/ves1820.c	12 Oct 2002 23:44:35 -0000
> @@ -150,18 +150,29 @@
>  static
>  int tuner_set_tv_freq (struct dvb_frontend *frontend, u32 freq, u8 pwr)
>  {
> -        u32 div = (freq + 36125000) / 62500;
> -	static u8 byte3 [] = { 0x8e, 0x85 };
> +        u32 div;
> +	static int freq_mod [] = { 36750000, 36125000 };
> +	static u8 byte3 [] = { 0x8e, 0x8e };
>  	static u8 byte4 [] = { 0x92, 0x84 };
>  	static u8 addr [] = { 0x61, 0x62 };
>  	int tuner_type = GET_TUNER(frontend);
> -        u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff,
> -			byte3[tuner_type] | ((div >> 10) & 0x60),
> -			byte4[tuner_type] | (pwr << 6) };
> +        u8 buf [4];
>  
> -	if (tuner_type == 1)
> +	div = (freq + freq_mod[tuner_type]) / 62500;
> +	buf[0] = (div >> 8) & 0x7f;
> +	buf[1] = div & 0xff;
> +	buf[2] = byte3[tuner_type];
> +	buf[3] = byte4[tuner_type] | (pwr << 6);
> +	if (tuner_type == 1) {
> +		buf[2] |= (div >> 10) & 0x60;
>  		buf[3] = (freq < 174000000 ? 0x88 :
>  			  freq < 470000000 ? 0x84 : 0x81) | (pwr << 6);
> +	} else {
> +		freq += freq_mod[tuner_type];
> +		buf[2] |= pwr << 7;

are you sure about the 7-bit shift? this would be very unusual. Can you 
please send me a copy of the datasheet you have?

Holger



-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index