diff options
author | Johannes Stezenbach <devnull@localhost> | 2005-07-24 20:04:55 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2005-07-24 20:04:55 +0000 |
commit | ca87074fb096e681cce4aa33f63723fa21ca10d7 (patch) | |
tree | b579e49d98e40bdd9497033f300fead856f21f03 | |
parent | 516035449e0dfc4b7aaa668f824da2f35fb06d20 (diff) | |
download | mediapointer-dvb-s2-ca87074fb096e681cce4aa33f63723fa21ca10d7.tar.gz mediapointer-dvb-s2-ca87074fb096e681cce4aa33f63723fa21ca10d7.tar.bz2 |
Reset acgconf register after tuning to improve locking, as suggested
by Marco Schluessler.
Minor cleanups in ves1820_init().
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1820.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c index 70fb44b39..c6d276618 100644 --- a/linux/drivers/media/dvb/frontends/ves1820.c +++ b/linux/drivers/media/dvb/frontends/ves1820.c @@ -194,19 +194,18 @@ static int ves1820_init(struct dvb_frontend* fe) { struct ves1820_state* state = fe->demodulator_priv; int i; - int val; ves1820_writereg(state, 0, 0); - for (i = 0; i < 53; i++) { - val = ves1820_inittab[i]; - if ((i == 2) && (state->config->selagc)) val |= 0x08; - ves1820_writereg(state, i, val); - } + for (i = 0; i < sizeof(ves1820_inittab); i++) + ves1820_writereg(state, i, ves1820_inittab[i]); + if (state->config->selagc) + ves1820_writereg(state, 2, ves1820_inittab[2] | 0x08); ves1820_writereg(state, 0x34, state->pwm); - if (state->config->pll_init) state->config->pll_init(fe); + if (state->config->pll_init) + state->config->pll_init(fe); return 0; } @@ -234,7 +233,7 @@ static int ves1820_set_parameters(struct dvb_frontend* fe, struct dvb_frontend_p ves1820_writereg(state, 0x09, reg0x09[real_qam]); ves1820_setup_reg0(state, reg0x00[real_qam], p->inversion); - + ves1820_writereg(state, 2, ves1820_inittab[2] | (state->config->selagc ? 0x08 : 0)); return 0; } |