summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc/uvc_ctrl.c
diff options
context:
space:
mode:
authorWilliam Manley <will@williammanley.net>2014-03-13 09:38:48 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-21 20:25:54 -0300
commit17e1319fd051f6f1d8b923ca3104c3391610ab32 (patch)
treed4facfa10f0749c190593ae251f310aa4a9e5b22 /drivers/media/usb/uvc/uvc_ctrl.c
parent3ea375239ca06014b8b421ab1d73d6628d22036f (diff)
downloadlinux-17e1319fd051f6f1d8b923ca3104c3391610ab32.tar.gz
linux-17e1319fd051f6f1d8b923ca3104c3391610ab32.tar.bz2
linux-17e1319fd051f6f1d8b923ca3104c3391610ab32.zip
[media] uvcvideo: Work around buggy Logitech C920 firmware
The uvcvideo webcam driver exposes the v4l2 control "Exposure (Absolute)" which allows the user to control the exposure time of the webcam, essentially controlling the brightness of the received image. By default the webcam automatically adjusts the exposure time automatically but the if you set the control "Exposure, Auto"="Manual Mode" the user can fix the exposure time. Unfortunately it seems that the Logitech C920 has a firmware bug where it will forget that it's in manual mode temporarily during initialisation. This means that the camera doesn't respect the exposure time that the user requested if they request it before starting to stream video. They end up with a video stream which is either too bright or too dark and must reset the controls after video starts streaming. This patch introduces the quirk UVC_QUIRK_RESTORE_CTRLS_ON_INIT which causes the cached controls to be re-uploaded to the camera immediately after initialising the camera. This quirk is applied to the C920 to work around this camera bug. Signed-off-by: William Manley <will@williammanley.net> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_ctrl.c')
-rw-r--r--drivers/media/usb/uvc/uvc_ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index d2d1755145c8..3e59b288b8a8 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -1847,7 +1847,7 @@ done:
* - Handle restore order (Auto-Exposure Mode should be restored before
* Exposure Time).
*/
-int uvc_ctrl_resume_device(struct uvc_device *dev)
+int uvc_ctrl_restore_values(struct uvc_device *dev)
{
struct uvc_control *ctrl;
struct uvc_entity *entity;