diff options
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r-- | linux/drivers/media/dvb/frontends/grundig_29504-401.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/frontends/grundig_29504-401.c b/linux/drivers/media/dvb/frontends/grundig_29504-401.c index c043b9251..a50af41bd 100644 --- a/linux/drivers/media/dvb/frontends/grundig_29504-401.c +++ b/linux/drivers/media/dvb/frontends/grundig_29504-401.c @@ -102,6 +102,7 @@ static int tsa5060_write (struct dvb_i2c_bus *i2c, u8 data [4]) */ static int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq) { +#if 1 u32 div; u8 buf [4]; u8 cfg, cpump, band_select; @@ -118,6 +119,20 @@ static int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq) buf [1] = div & 0xff; buf [2] = ((div >> 10) & 0x60) | cfg; buf [3] = (cpump << 6) | band_select; +#else + /* old code which seems to work better for at least one person */ + u32 div; + u8 buf [4]; + u8 cfg; + + div = (36000000 + freq) / 166666; + cfg = 0x88; + + buf [0] = (div >> 8) & 0x7f; + buf [1] = div & 0xff; + buf [2] = ((div >> 10) & 0x60) | cfg; + buf [3] = 0xc0; +#endif return tsa5060_write(i2c, buf); } |