diff options
author | Andrew de Quincy <devnull@localhost> | 2004-12-18 20:57:16 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2004-12-18 20:57:16 +0000 |
commit | 371e000a5ccf5c173e2506d9ea1d1fdae791545e (patch) | |
tree | 8bc1765ad259a871e3ebd2536206a6a30f1a6dc6 /linux/drivers/media/dvb/frontends/stv0297.c | |
parent | 5bdf6b2c3261a02f5b5d6b1cd8b7785461910577 (diff) | |
download | mediapointer-dvb-s2-371e000a5ccf5c173e2506d9ea1d1fdae791545e.tar.gz mediapointer-dvb-s2-371e000a5ccf5c173e2506d9ea1d1fdae791545e.tar.bz2 |
More fixes to initial demod freq
Diffstat (limited to 'linux/drivers/media/dvb/frontends/stv0297.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/stv0297.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |