Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357415
b: refs/heads/master
c: ba1066d
h: refs/heads/master
i:
  357413: 1286216
  357411: 6245baa
  357407: cc9db11
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Feb 5, 2013
1 parent f099177 commit a0fb6e8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84a15ded76ec8ec23d84974238b7864813143655
refs/heads/master: ba1066d2e9686a5c96c5c0dfcbda7f874fa7b88d
17 changes: 16 additions & 1 deletion trunk/drivers/media/v4l2-core/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,11 @@ static void set_radio_freq(struct i2c_client *c, unsigned int freq)
t->standby = false;

analog_ops->set_params(&t->fe, &params);
/*
* The tuner driver might decide to change the audmode if it only
* supports stereo, so update t->audmode.
*/
t->audmode = params.audmode;
}

/*
Expand Down Expand Up @@ -1235,8 +1240,18 @@ static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
if (set_mode(t, vt->type))
return 0;

if (t->mode == V4L2_TUNER_RADIO)
if (t->mode == V4L2_TUNER_RADIO) {
t->audmode = vt->audmode;
/*
* For radio audmode can only be mono or stereo. Map any
* other values to stereo. The actual tuner driver that is
* called in set_radio_freq can decide to limit the audmode to
* mono if only mono is supported.
*/
if (t->audmode != V4L2_TUNER_MODE_MONO &&
t->audmode != V4L2_TUNER_MODE_STEREO)
t->audmode = V4L2_TUNER_MODE_STEREO;
}
set_freq(t, 0);

return 0;
Expand Down

0 comments on commit a0fb6e8

Please sign in to comment.