This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-dvb.git tree:
Subject: V4L/DVB: uvcvideo: Make button controls work properly Author: Hans de Goede <[email protected]> Date: Wed May 19 20:15:00 2010 -0300 According to the v4l2 spec, writing any value to a button control should result in the action belonging to the button control being triggered. UVC cams however want to see a 1 written, this patch fixes this by overriding whatever value user space passed in with -1 (0xffffffff) when the control is a button control. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/video/uvc/uvc_ctrl.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) --- http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=3a4e95b6601877dde299cb89d5187ab456f9e7d3 diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 5ec2f4a..8bb825d 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c @@ -698,6 +698,14 @@ static void uvc_set_le_value(struct uvc_control_mapping *mapping, int offset = mapping->offset; __u8 mask; + /* According to the v4l2 spec, writing any value to a button control + * should result in the action belonging to the button control being + * triggered. UVC devices however want to see a 1 written -> override + * value. + */ + if (mapping->v4l2_type == V4L2_CTRL_TYPE_BUTTON) + value = -1; + data += offset / 8; offset &= 7; _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
