aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/au8522_dig.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2010-02-17 22:51:46 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-18 00:46:22 -0300
commitb628a2a3d4e97044cc9f6818bfb8330d8d0b021a (patch)
treeabf2daf6da84f96e247d2d74291215978f5aa0c2 /drivers/media/dvb/frontends/au8522_dig.c
parentV4L/DVB: au8522: fix race condition in switching from digital to analog mode (diff)
downloadlinux-dev-b628a2a3d4e97044cc9f6818bfb8330d8d0b021a.tar.xz
linux-dev-b628a2a3d4e97044cc9f6818bfb8330d8d0b021a.zip
V4L/DVB: au8522: fix case where we don't perform the first tune after going digital
Address a problem found in MythTV where if we are in digital mode, switch to analog mode, and the switch back to digital mode, the first tuning request after switching back to digital mode gets dropped. This is because the au8522 maintains internal state, and would think the demod was already tuned to the target frequency. Thanks to Zaphod Beeblebrox for reporting this issue. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/au8522_dig.c')
-rw-r--r--drivers/media/dvb/frontends/au8522_dig.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/au8522_dig.c b/drivers/media/dvb/frontends/au8522_dig.c
index e2efb25d1a75..65f6a36dfb21 100644
--- a/drivers/media/dvb/frontends/au8522_dig.c
+++ b/drivers/media/dvb/frontends/au8522_dig.c
@@ -618,6 +618,11 @@ int au8522_init(struct dvb_frontend *fe)
state->operational_mode = AU8522_DIGITAL_MODE;
+ /* Clear out any state associated with the digital side of the
+ chip, so that when it gets powered back up it won't think
+ that it is already tuned */
+ state->current_frequency = 0;
+
au8522_writereg(state, 0xa4, 1 << 5);
au8522_i2c_gate_ctrl(fe, 1);