From 371e000a5ccf5c173e2506d9ea1d1fdae791545e Mon Sep 17 00:00:00 2001 From: Andrew de Quincy Date: Sat, 18 Dec 2004 20:57:16 +0000 Subject: More fixes to initial demod freq --- linux/drivers/media/dvb/frontends/stv0297.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/frontends/stv0297.c') diff --git a/linux/drivers/media/dvb/frontends/stv0297.c b/linux/drivers/media/dvb/frontends/stv0297.c index cf5bfe290..3e34a3177 100644 --- a/linux/drivers/media/dvb/frontends/stv0297.c +++ b/linux/drivers/media/dvb/frontends/stv0297.c @@ -498,6 +498,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par int delay; int sweeprate; int carrieroffset; + int freq_off; unsigned long starttime; unsigned long timeout; fe_spectral_inversion_t inversion; @@ -684,7 +685,11 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par /* success!! */ stv0297_writereg_mask(state, 0x5a, 0x40, 0x00); - state->freq_off = stv0297_get_carrieroffset(state); + freq_off = stv0297_get_carrieroffset(state); + if (freq_off < 0) + freq_off = -freq_off; + if (freq_off <= 1500) + state->freq_off = freq_off; state->base_freq = p->frequency; return 0; -- cgit v1.2.3