Skip to content

Commit

Permalink
V4L/DVB: au8522: fix case where we don't perform the first tune after…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Devin Heitmueller authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent 7f2c983 commit b628a2a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/media/dvb/frontends/au8522_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,11 @@ static int au8522_reset(struct v4l2_subdev *sd, u32 val)

state->operational_mode = AU8522_ANALOG_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);

return 0;
Expand Down
5 changes: 5 additions & 0 deletions drivers/media/dvb/frontends/au8522_dig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b628a2a

Please sign in to comment.