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>
This commit is contained in:
Michael Krufky 2007-12-13 10:11:49 -03:00 committed by Mauro Carvalho Chehab
parent 2b03238a79
commit 6b7daa88f2
1 changed files with 12 additions and 14 deletions

View File

@ -355,28 +355,26 @@ static int s5h1409_softreset(struct dvb_frontend* fe)
static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz) static int s5h1409_set_if_freq(struct dvb_frontend* fe, int KHz)
{ {
struct s5h1409_state* state = fe->demodulator_priv; struct s5h1409_state* state = fe->demodulator_priv;
int ret = 0;
dprintk("%s(%d KHz)\n", __FUNCTION__, KHz); dprintk("%s(%d KHz)\n", __FUNCTION__, KHz);
if( (KHz == 44000) || (KHz == 5380) ) { switch (KHz) {
s5h1409_writereg(state, 0x87, 0x01be); case 4000:
s5h1409_writereg(state, 0x88, 0x0436);
s5h1409_writereg(state, 0x89, 0x054d);
} else
if (KHz == 4000) {
s5h1409_writereg(state, 0x87, 0x014b); s5h1409_writereg(state, 0x87, 0x014b);
s5h1409_writereg(state, 0x88, 0x0cb5); s5h1409_writereg(state, 0x88, 0x0cb5);
s5h1409_writereg(state, 0x89, 0x03e2); s5h1409_writereg(state, 0x89, 0x03e2);
} else { break;
printk("%s() Invalid arg = %d KHz\n", __FUNCTION__, KHz); case 5380:
ret = -1; 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) return 0;
state->if_freq = KHz;
return ret;
} }
static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted) static int s5h1409_set_spectralinversion(struct dvb_frontend* fe, int inverted)