Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Patch for cards with the Philips CD1516 tuner box (spXXXX?)
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 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;
+ buf[3] = (freq < 174000000 ? 0xa1 :
+ freq < 454000000 ? 0x92 : 0x34);
+ }
return tuner_write (frontend->i2c, addr[tuner_type], buf);
}
Home |
Main Index |
Thread Index