Skip to content

Commit ddc6ff3

Browse files
Hans VerkuilMauro Carvalho Chehab
authored andcommitted
[media] msp3400: fill in v4l2_tuner based on vt->type field
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>
1 parent 5ad339a commit ddc6ff3

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎drivers/media/video/msp3400-driver.c‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -480,12 +480,14 @@ static int msp_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
480480
struct msp_state *state = to_state(sd);
481481
struct i2c_client *client = v4l2_get_subdevdata(sd);
482482

483-
if (state->radio)
483+
if (vt->type != V4L2_TUNER_ANALOG_TV)
484484
return 0;
485-
if (state->opmode == OPMODE_AUTOSELECT)
486-
msp_detect_stereo(client);
487-
vt->audmode = state->audmode;
488-
vt->rxsubchans = state->rxsubchans;
485+
if (!state->radio) {
486+
if (state->opmode == OPMODE_AUTOSELECT)
487+
msp_detect_stereo(client);
488+
vt->rxsubchans = state->rxsubchans;
489+
}
490+
vt->audmode = state->audmode;
489491
vt->capability |= V4L2_TUNER_CAP_STEREO |
490492
V4L2_TUNER_CAP_LANG1 | V4L2_TUNER_CAP_LANG2;
491493
return 0;

0 commit comments

Comments
 (0)