This patch fixes the auto exposure mode control so it complies with
4.2.2.1.2. of USB_Video_Class_1.1.pdf .

-- 
Antoine Cellerier
dionoea
Index: uvc_ctrl.c
===================================================================
--- uvc_ctrl.c	(revision 159)
+++ uvc_ctrl.c	(working copy)
@@ -172,6 +172,13 @@
 	{ 2, "60 Hz" },
 };
 
+static struct uvc_menu_info exposure_auto_controls[] = {
+	{ 1, "Manual Mode" },
+	{ 2, "Auto Mode" },
+	{ 4, "Shutter Priority Mode" },
+	{ 8, "Aperture Priority Mode" },
+};
+
 static struct uvc_control_mapping uvc_ctrl_mappings[] = {
 	{
 		.id		= V4L2_CID_BRIGHTNESS,
@@ -282,8 +289,10 @@
 		.selector	= CT_AE_MODE_CONTROL,
 		.size		= 4,
 		.offset		= 0,
-		.v4l2_type	= V4L2_CTRL_TYPE_INTEGER,
+		.v4l2_type	= V4L2_CTRL_TYPE_MENU,
 		.data_type	= UVC_CTRL_DATA_TYPE_BITMASK,
+		.menu_info	= exposure_auto_controls,
+		.menu_count	= ARRAY_SIZE(exposure_auto_controls),
 	},
 	{
 		.id		= V4L2_CID_EXPOSURE_ABSOLUTE,
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to