diff options
authorMichael Krufky <mkrufky@kernellabs.com>2012-03-12 20:07:22 (GMT)
committerMichael Krufky <mkrufky@linuxtv.org>2012-03-13 19:51:04 (GMT)
commit57adb4e69d8e53cf1e8691acfb77383a13b831d4 (patch)
parent632fba4d012458fd5fedc678fb9b0f8bc59ceda2 (diff)
au8522: bug-fix: enable modulation AFTER tune (instead of before tuning)au8522
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: FYI: your patch is wrong. You have the msleep() after putting the demod into acquisition mode, whereas it's supposed to be before (the goal is for the tuner to have time to settle before telling the demod to resync). This newly generated patch takes Devin's comments into account. Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/dvb/frontends/au8522_dig.c b/drivers/media/dvb/frontends/au8522_dig.c
index c688b95d..25f6509 100644
--- a/drivers/media/dvb/frontends/au8522_dig.c
+++ b/drivers/media/dvb/frontends/au8522_dig.c
@@ -588,11 +588,6 @@ static int au8522_set_frontend(struct dvb_frontend *fe)
(state->current_modulation == c->modulation))
return 0;
- au8522_enable_modulation(fe, c->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 @@ static int au8522_set_frontend(struct dvb_frontend *fe)
if (ret < 0)
return ret;
+ /* Allow the tuner to settle */
+ msleep(100);
+ au8522_enable_modulation(fe, c->modulation);
state->current_frequency = c->frequency;
return 0;

Privacy Policy