diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-13 08:11:49 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-13 08:11:49 -0500 |
commit | ae5e0bd6101a2b5eed55d740487c8d30f837907f (patch) | |
tree | c1c1762b6ea1530f7e65c83a31b1c48aaf0b26ad /linux/drivers/media/dvb/frontends/s5h1409.c | |
parent | 32127f7d5133a71be9aadd4f6c8275ff3fd4a7e9 (diff) | |
download | mediapointer-dvb-s2-ae5e0bd6101a2b5eed55d740487c8d30f837907f.tar.gz mediapointer-dvb-s2-ae5e0bd6101a2b5eed55d740487c8d30f837907f.tar.bz2 |
s5h1409: use VSB IF frequency ( 44 / 5.38 MHz ) unless otherwise specified
From: Michael Krufky <mkrufky@linuxtv.org>
use VSB IF frequency ( 44 / 5.38 MHz ) if qam_if is invalid or unspecified
Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/s5h1409.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/s5h1409.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/frontends/s5h1409.c b/linux/drivers/media/dvb/frontends/s5h1409.c index f11827927..29ec9ac8f 100644 --- a/linux/drivers/media/dvb/frontends/s5h1409.c +++ b/linux/drivers/media/dvb/frontends/s5h1409.c @@ -355,28 +355,26 @@ static int s5h1409_softreset(struct dvb_frontend* fe) static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz) { struct s5h1409_state* state = fe->demodulator_priv; - int ret = 0; dprintk("%s(%d KHz)\n", __FUNCTION__, KHz); - if( (KHz == 44000) || (KHz == 5380) ) { - s5h1409_writereg(state, 0x87, 0x01be); - s5h1409_writereg(state, 0x88, 0x0436); - s5h1409_writereg(state, 0x89, 0x054d); - } else - if (KHz == 4000) { + switch (KHz) { + case 4000: s5h1409_writereg(state, 0x87, 0x014b); s5h1409_writereg(state, 0x88, 0x0cb5); s5h1409_writereg(state, 0x89, 0x03e2); - } else { - printk("%s() Invalid arg = %d KHz\n", __FUNCTION__, KHz); - ret = -1; + break; + case 5380: + case 44000: + default: + s5h1409_writereg(state, 0x87, 0x01be); + s5h1409_writereg(state, 0x88, 0x0436); + s5h1409_writereg(state, 0x89, 0x054d); + break; } + state->if_freq = KHz; - if (0 == ret) - state->if_freq = KHz; - - return ret; + return 0; } static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted) |