summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/ves1820.c
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2003-05-19 11:23:40 +0000
committerHolger Waechtler <devnull@localhost>2003-05-19 11:23:40 +0000
commitc2a33a5d9968baed02ac85bd24cbca3ebcd94a03 (patch)
tree65093acfbc402d9da4897b0d284a58060a8687c0 /linux/drivers/media/dvb/frontends/ves1820.c
parentc41c87eddd0aef604b1bcf2adab81e233289c4be (diff)
downloadmediapointer-dvb-s2-c2a33a5d9968baed02ac85bd24cbca3ebcd94a03.tar.gz
mediapointer-dvb-s2-c2a33a5d9968baed02ac85bd24cbca3ebcd94a03.tar.bz2
apply patch by <jaakko@hyvatti.iki.fi> to distinguish different PLL/Synthesizer
combinations used by Siemens and Technotrend on their DVB-C cards
Diffstat (limited to 'linux/drivers/media/dvb/frontends/ves1820.c')
-rw-r--r--linux/drivers/media/dvb/frontends/ves1820.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c
index f68ec68bb..24223d583 100644
--- a/linux/drivers/media/dvb/frontends/ves1820.c
+++ b/linux/drivers/media/dvb/frontends/ves1820.c
@@ -170,7 +170,7 @@ int tuner_write (struct dvb_i2c_bus *i2c, u8 addr, u8 data [4])
static
int tuner_set_tv_freq (struct dvb_frontend *fe, u32 freq)
{
- u32 div;
+ u32 div, ifreq;
static u8 addr [] = { 0x61, 0x62 };
static u8 byte3 [] = { 0x8e, 0x85 };
int tuner_type = GET_TUNER(fe->data);
@@ -179,8 +179,13 @@ int tuner_set_tv_freq (struct dvb_frontend *fe, u32 freq)
if (tuner_type == 0xff) /* PLL not reachable over i2c ... */
return 0;
- /* div = (freq + 36125000 + 31250) / 62500; */
- div = (freq + 35937500 + 31250) / 62500; /* works better for finland and sweden */
+ if (strstr (fe->i2c->adapter->name, "Technotrend"))
+ ifreq = 35937500;
+ else
+ ifreq = 36125000;
+
+ div = (freq + ifreq + 31250) / 62500;
+
buf[0] = (div >> 8) & 0x7f;
buf[1] = div & 0xff;
buf[2] = byte3[tuner_type];