diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-13 08:11:49 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:03:45 -0500 |
commit | 6b7daa88f23bb23f61977063e3f8ea9598e65e32 (patch) | |
tree | e9e0c97200e8dbc8235d14258a84c82435ada2a4 /drivers/media | |
parent | 2b03238a79295aff30afc3d9a82afa617fd33971 (diff) |
V4L/DVB (6822): s5h1409: use VSB IF frequency ( 44 / 5.38 MHz ) unless otherwise specified
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/frontends/s5h1409.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c index b80a3ee91ba4..d3b148ddad2b 100644 --- a/drivers/media/dvb/frontends/s5h1409.c +++ b/drivers/media/dvb/frontends/s5h1409.c | |||
@@ -355,28 +355,26 @@ static int s5h1409_softreset(struct dvb_frontend* fe) | |||
355 | static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz) | 355 | static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz) |
356 | { | 356 | { |
357 | struct s5h1409_state* state = fe->demodulator_priv; | 357 | struct s5h1409_state* state = fe->demodulator_priv; |
358 | int ret = 0; | ||
359 | 358 | ||
360 | dprintk("%s(%d KHz)\n", __FUNCTION__, KHz); | 359 | dprintk("%s(%d KHz)\n", __FUNCTION__, KHz); |
361 | 360 | ||
362 | if( (KHz == 44000) || (KHz == 5380) ) { | 361 | switch (KHz) { |
363 | s5h1409_writereg(state, 0x87, 0x01be); | 362 | case 4000: |
364 | s5h1409_writereg(state, 0x88, 0x0436); | ||
365 | s5h1409_writereg(state, 0x89, 0x054d); | ||
366 | } else | ||
367 | if (KHz == 4000) { | ||
368 | s5h1409_writereg(state, 0x87, 0x014b); | 363 | s5h1409_writereg(state, 0x87, 0x014b); |
369 | s5h1409_writereg(state, 0x88, 0x0cb5); | 364 | s5h1409_writereg(state, 0x88, 0x0cb5); |
370 | s5h1409_writereg(state, 0x89, 0x03e2); | 365 | s5h1409_writereg(state, 0x89, 0x03e2); |
371 | } else { | 366 | break; |
372 | printk("%s() Invalid arg = %d KHz\n", __FUNCTION__, KHz); | 367 | case 5380: |
373 | ret = -1; | 368 | case 44000: |
369 | default: | ||
370 | s5h1409_writereg(state, 0x87, 0x01be); | ||
371 | s5h1409_writereg(state, 0x88, 0x0436); | ||
372 | s5h1409_writereg(state, 0x89, 0x054d); | ||
373 | break; | ||
374 | } | 374 | } |
375 | state->if_freq = KHz; | ||
375 | 376 | ||
376 | if (0 == ret) | 377 | return 0; |
377 | state->if_freq = KHz; | ||
378 | |||
379 | return ret; | ||
380 | } | 378 | } |
381 | 379 | ||
382 | static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted) | 380 | static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted) |