diff options
author | Holger Waechtler <devnull@localhost> | 2003-06-04 12:47:38 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2003-06-04 12:47:38 +0000 |
commit | c6da65df6a8380382f240d6c087db140cb14b054 (patch) | |
tree | b5f5c8b277034436c173351430648dea07616492 /linux/drivers/media | |
parent | e79f613b8fc0492ffaeb688447a17513eea755e5 (diff) | |
download | mediapointer-dvb-s2-c6da65df6a8380382f240d6c087db140cb14b054.tar.gz mediapointer-dvb-s2-c6da65df6a8380382f240d6c087db140cb14b054.tar.bz2 |
fix charge pump and band switch setting bug, catched by Robert Schlabbach <robert_s@gmx.net>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/frontends/grundig_29504-401.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/frontends/grundig_29504-401.c b/linux/drivers/media/dvb/frontends/grundig_29504-401.c index 7a244b428..7c0fd1c05 100644 --- a/linux/drivers/media/dvb/frontends/grundig_29504-401.c +++ b/linux/drivers/media/dvb/frontends/grundig_29504-401.c @@ -113,15 +113,15 @@ int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq) div = (36125000 + freq) / 166666; cfg = 0x88; - cpump = div < 175000000 ? 2 : div < 390000000 ? 1 : - div < 470000000 ? 2 : div < 750000000 ? 1 : 3; + cpump = freq < 175000000 ? 2 : freq < 390000000 ? 1 : + freq < 470000000 ? 2 : freq < 750000000 ? 1 : 3; - band_select = div < 175000000 ? 0x0e : div < 470000000 ? 0x05 : 0x03; + band_select = freq < 175000000 ? 0x0e : freq < 470000000 ? 0x05 : 0x03; buf [0] = (div >> 8) & 0x7f; buf [1] = div & 0xff; buf [2] = ((div >> 10) & 0x60) | cfg; - buf [3] = cpump | band_select; + buf [3] = (cpump << 6) | band_select; return tsa5060_write(i2c, buf); } |