diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-01 15:40:16 -0500 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-12-01 15:40:16 -0500 |
commit | dec053bf7e536421dc5c18e56236951a4f3b94e1 (patch) | |
tree | 29fc9530aa747e830f79a8004b577829ae23bb11 /linux/drivers/media | |
parent | 156c8dae5bd45c5b5dbe6639ed84e63d7aecbae6 (diff) | |
download | mediapointer-dvb-s2-dec053bf7e536421dc5c18e56236951a4f3b94e1.tar.gz mediapointer-dvb-s2-dec053bf7e536421dc5c18e56236951a4f3b94e1.tar.bz2 |
tda18271: only force init once during attach
From: Michael Krufky <mkrufky@linuxtv.org>
Once the image rejection calibration procedure has been successful,
we should not initialize the tuner registers again.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/frontends/tda18271-fe.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271-fe.c b/linux/drivers/media/dvb/frontends/tda18271-fe.c index 08990ddaa..17bfeb875 100644 --- a/linux/drivers/media/dvb/frontends/tda18271-fe.c +++ b/linux/drivers/media/dvb/frontends/tda18271-fe.c @@ -338,6 +338,20 @@ static int tda18271_init_regs(struct dvb_frontend *fe) return 0; } +static int tda18271_init(struct dvb_frontend *fe) +{ + struct tda18271_priv *priv = fe->tuner_priv; + unsigned char *regs = priv->tda18271_regs; + + tda18271_read_regs(fe); + + /* test IR_CAL_OK to see if we need init */ + if ((regs[R_EP1] & 0x08) == 0) + tda18271_init_regs(fe); + + return 0; +} + static int tda18271_tune(struct dvb_frontend *fe, u32 ifc, u32 freq, u32 bw, u8 std) { @@ -748,7 +762,7 @@ static struct dvb_tuner_ops tda18271_tuner_ops = { .frequency_max = 864000000, .frequency_step = 62500 }, - .init = tda18271_init_regs, + .init = tda18271_init, .set_params = tda18271_set_params, .set_analog_params = tda18271_set_analog_params, .release = tda18271_release, @@ -774,6 +788,8 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, fe->tuner_priv = priv; + tda18271_init_regs(fe); + return fe; } EXPORT_SYMBOL_GPL(tda18271_attach); |