Skip to content

Commit

Permalink
[media] msp3400: fill in v4l2_tuner based on vt->type field
Browse files Browse the repository at this point in the history
The vt->type field determines how the msp3400 should fill in the
tuner data, not whether the msp3400 is in radio mode or not.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Jul 7, 2011
1 parent 5ad339a commit ddc6ff3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/media/video/msp3400-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,14 @@ static int msp_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
struct msp_state *state = to_state(sd);
struct i2c_client *client = v4l2_get_subdevdata(sd);

if (state->radio)
if (vt->type != V4L2_TUNER_ANALOG_TV)
return 0;
if (state->opmode == OPMODE_AUTOSELECT)
msp_detect_stereo(client);
vt->audmode = state->audmode;
vt->rxsubchans = state->rxsubchans;
if (!state->radio) {
if (state->opmode == OPMODE_AUTOSELECT)
msp_detect_stereo(client);
vt->rxsubchans = state->rxsubchans;
}
vt->audmode = state->audmode;
vt->capability |= V4L2_TUNER_CAP_STEREO |
V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2;
return 0;
Expand Down

0 comments on commit ddc6ff3

Please sign in to comment.