Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161481
b: refs/heads/master
c: 73c6f46
h: refs/heads/master
i:
  161479: 4c08628
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Sep 12, 2009
1 parent 264c8d6 commit a59f55f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 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: e81516c58ef84663ee05a43760a53a416d529de7
refs/heads/master: 73c6f462d1d07f276e279467f311a96a2a43d9c5
20 changes: 17 additions & 3 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,11 +1146,25 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
else
rc = 1;

/* It were not an AC97 control. Sends it to the v4l2 dev interface */
/* It isn't an AC97 control. Sends it to the v4l2 dev interface */
if (rc == 1) {
v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_ctrl, ctrl);
/* FIXME: should be returning a meaninful value */
rc = 0;

/*
* In the case of non-AC97 volume controls, we still need
* to do some setups at em28xx, in order to mute/unmute
* and to adjust audio volume. However, the value ranges
* should be checked by the corresponding V4L subdriver.
*/
switch (ctrl->id) {
case V4L2_CID_AUDIO_MUTE:
dev->mute = ctrl->value;
rc = em28xx_audio_analog_set(dev);
break;
case V4L2_CID_AUDIO_VOLUME:
dev->volume = ctrl->value;
rc = em28xx_audio_analog_set(dev);
}
}

mutex_unlock(&dev->lock);
Expand Down

0 comments on commit a59f55f

Please sign in to comment.