[DVB patch 17/54] frontend: ves1820: improve tuning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reset acgconf register after tuning to improve locking, as suggested
by Marco Schluessler.
Minor cleanups in ves1820_init().

Signed-off-by: Johannes Stezenbach <[email protected]>

 drivers/media/dvb/frontends/ves1820.c |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

--- linux-2.6.13-git4.orig/drivers/media/dvb/frontends/ves1820.c	2005-09-04 22:24:24.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/frontends/ves1820.c	2005-09-04 22:28:08.000000000 +0200
@@ -194,19 +194,18 @@ static int ves1820_init(struct dvb_front
 {
 	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
 	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;
 }
 

--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux