summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorAndrew de Quincy <devnull@localhost>2005-01-06 08:45:04 +0000
committerAndrew de Quincy <devnull@localhost>2005-01-06 08:45:04 +0000
commit98bd12227ff15b6af75ab9abe941b249b4fce5c3 (patch)
tree7bcab9b27dba2f7c4d0eb8fb9fb29cd8f612bb62 /linux
parent1eaaa7637c976567ecd52ce682e6910994f9812b (diff)
downloadmediapointer-dvb-s2-98bd12227ff15b6af75ab9abe941b249b4fce5c3.tar.gz
mediapointer-dvb-s2-98bd12227ff15b6af75ab9abe941b249b4fce5c3.tar.bz2
Patch from Markus Breitenberger to fix tuning problems
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/frontends/stv0297.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0297.c b/linux/drivers/media/dvb/frontends/stv0297.c
index e80bff1d2..6d6e9b901 100644
--- a/linux/drivers/media/dvb/frontends/stv0297.c
+++ b/linux/drivers/media/dvb/frontends/stv0297.c
@@ -38,7 +38,6 @@ struct stv0297_state {
struct dvb_frontend frontend;
- int freq_off;
unsigned long base_freq;
u8 pwm;
};
@@ -507,7 +506,6 @@ 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;
@@ -559,7 +557,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
stv0297_writereg(state, 0x82, 0x0);
/* set initial demodulation frequency */
- stv0297_set_initialdemodfreq(state, state->freq_off + 7250);
+ stv0297_set_initialdemodfreq(state, 7250);
/* setup AGC */
stv0297_writereg_mask(state, 0x43, 0x10, 0x00);
@@ -695,11 +693,6 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
/* success!! */
stv0297_writereg_mask(state, 0x5a, 0x40, 0x00);
- 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;
@@ -716,7 +709,7 @@ static int stv0297_get_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
reg_00 = stv0297_readreg(state, 0x00);
reg_83 = stv0297_readreg(state, 0x83);
- p->frequency = state->base_freq + state->freq_off;
+ p->frequency = state->base_freq;
p->inversion = (reg_83 & 0x08) ? INVERSION_ON : INVERSION_OFF;
if (state->config->invert)
p->inversion = (p->inversion == INVERSION_ON) ? INVERSION_OFF : INVERSION_ON;
@@ -766,7 +759,6 @@ struct dvb_frontend *stv0297_attach(const struct stv0297_config *config,
state->config = config;
state->i2c = i2c;
memcpy(&state->ops, &stv0297_ops, sizeof(struct dvb_frontend_ops));
- state->freq_off = 0;
state->base_freq = 0;
state->pwm = pwm;