Hi everybody,
here is a patch that should fix the VIDIOC_[GS]_INPUT error with the SiGma
Micro USB Web Camera.
The camera advertises a selector unit to select between multiple inputs, but
has a single input only. The patch adds a new device quirk to ignore the
selector unit.
The following error should not occur anymore:
uvcvideo: Failed to query (1) UVC control 1 (unit 4) : -110 (exp. 1).
New errors might appear though (I'm thinking about the white balance issue
that Juho reported). Please let me know if the patch fixes the
VIDIOC_[GS]_INPUT error. I'll then work on the next error.
Best regards,
Laurent Pinchart
Index: uvc_v4l2.c
===================================================================
--- uvc_v4l2.c (revision 214)
+++ uvc_v4l2.c (working copy)
@@ -625,7 +625,8 @@
{
u8 input;
- if (video->selector == NULL) {
+ if (video->selector == NULL ||
+ (video->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) {
*(int *)arg = 0;
break;
}
@@ -647,7 +648,8 @@
if ((ret = uvc_acquire_privileges(handle)) < 0)
return ret;
- if (video->selector == NULL) {
+ if (video->selector == NULL ||
+ (video->dev->quirks & UVC_QUIRK_IGNORE_SELECTOR_UNIT)) {
if (input != 1)
return -EINVAL;
break;
Index: uvc_driver.c
===================================================================
--- uvc_driver.c (revision 213)
+++ uvc_driver.c (working copy)
@@ -1857,7 +1857,8 @@
.bInterfaceClass = USB_CLASS_VIDEO,
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
- .driver_info = UVC_QUIRK_PROBE_MINMAX },
+ .driver_info = UVC_QUIRK_PROBE_MINMAX
+ | UVC_QUIRK_IGNORE_SELECTOR_UNIT},
/* Acer OEM Webcam - Unknown vendor */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
Index: uvcvideo.h
===================================================================
--- uvcvideo.h (revision 214)
+++ uvcvideo.h (working copy)
@@ -314,6 +314,7 @@
#define UVC_QUIRK_PROBE_EXTRAFIELDS 0x00000004
#define UVC_QUIRK_BUILTIN_ISIGHT 0x00000008
#define UVC_QUIRK_STREAM_NO_FID 0x00000010
+#define UVC_QUIRK_IGNORE_SELECTOR_UNIT 0x00000020
/* Format flags */
#define UVC_FMT_FLAG_COMPRESSED 0x00000001
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel