The patch number 12345 was added via Mauro Carvalho Chehab <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>
------
From: Mauro Carvalho Chehab <[email protected]>
em28xx: fix audio VIDIOC_S_CTRL adjustments on devices without ac97
Even devices without ac97 needs to call analog audio setup function, to
properly set xclk and mute/unmute.
Thanks to Angelo Cano <[email protected]> for reporting and testing it.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
linux/drivers/media/video/em28xx/em28xx-video.c | 19 +++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff -r 2c02d2b26ccc -r ee6cf88cb5d3
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c Wed Jul 29 01:39:12
2009 -0300
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c Wed Jul 29 01:42:02
2009 -0300
@@ -1123,9 +1123,26 @@
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);
+
+ /*
+ * 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;
+ return em28xx_audio_analog_set(dev);
+ break;
+ case V4L2_CID_AUDIO_VOLUME:
+ dev->volume = ctrl->value;
+ return em28xx_audio_analog_set(dev);
+ }
+
/* FIXME: should be returning a meaninful value */
rc = 0;
}
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/ee6cf88cb5d3faf861289fce0ef0385846adcc7c
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits