aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2012-03-12 16:07:22 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-03-19 18:05:46 -0400
commitef3d2dc366c8c32d58dbbf9898cfd4f853ff8fe0 (patch)
treed7fc47a22357a4ecd11039846bbc0ec423c03695 /drivers/media/dvb
parent22f1732fcda5ab62b6da2ddcec282868e7ccb089 (diff)
[media] au8522: bug-fix: enable modulation AFTER tune (instead of before tuning)
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@kernellabs.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/frontends/au8522_dig.c10
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 c688b95df48..25f650934c7 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)
588 (state->current_modulation == c->modulation)) 588 (state->current_modulation == c->modulation))
589 return 0; 589 return 0;
590 590
591 au8522_enable_modulation(fe, c->modulation);
592
593 /* Allow the demod to settle */
594 msleep(100);
595
596 if (fe->ops.tuner_ops.set_params) { 591 if (fe->ops.tuner_ops.set_params) {
597 if (fe->ops.i2c_gate_ctrl) 592 if (fe->ops.i2c_gate_ctrl)
598 fe->ops.i2c_gate_ctrl(fe, 1); 593 fe->ops.i2c_gate_ctrl(fe, 1);
@@ -604,6 +599,11 @@ static int au8522_set_frontend(struct dvb_frontend *fe)
604 if (ret < 0) 599 if (ret < 0)
605 return ret; 600 return ret;
606 601
602 /* Allow the tuner to settle */
603 msleep(100);
604
605 au8522_enable_modulation(fe, c->modulation);
606
607 state->current_frequency = c->frequency; 607 state->current_frequency = c->frequency;
608 608
609 return 0; 609 return 0;