[PATCH] [media] au8522: bug-fix: enable modulation AFTER tune (instead of before tuning)

Michael Krufky mkrufky at kernellabs.com
Mon Mar 12 20:07:22 UTC 2012


The au8522 driver programs the tuner after programming the demodulator,
but the tuner should be programmed first. This patch fixes this behavior.

EDIT: Apparantly Devin created a similar patch some time ago, but hasn't
submitted it for merge.  I never saw his patch, but I thank him anyhow
for his efforts.  In addition, Devin pointed out a flaw in my patch:

This newly generated patch takes Devin's comments into account.

Thanks-to: Devin Heitmueller <dheitmueller at kernellabs.com>
Signed-off-by: Michael Krufky <mkrufky at linuxtv.org>
Cc: stable at kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>
---
 drivers/media/dvb/frontends/au8522_dig.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

--- old/drivers/media/dvb/frontends/au8522_dig.c	2012-02-20 16:42:16.000000000 -0500
+++ linux/drivers/media/dvb/frontends/au8522_dig.c	2012-03-22 10:01:18.492766935 -0400
@@ -588,11 +588,6 @@
 	    (state->current_modulation == p->u.vsb.modulation))
 		return 0;
 
-	au8522_enable_modulation(fe, p->u.vsb.modulation);
-
-	/* Allow the demod to settle */
-	msleep(100);
-
 	if (fe->ops.tuner_ops.set_params) {
 		if (fe->ops.i2c_gate_ctrl)
 			fe->ops.i2c_gate_ctrl(fe, 1);
@@ -604,6 +599,11 @@
 	if (ret < 0)
 		return ret;
 
+	au8522_enable_modulation(fe, p->u.vsb.modulation);
+
+	/* Allow the demod to settle */
+	msleep(100);
+
 	state->current_frequency = p->frequency;
 
 	return 0;

--------------010404080305020506030104--


More information about the mythtv-users mailing list