Hi Adrian,

> Thanks a million for this. I'm looking forward to testing the patch for
> you!

Could you test the following patch ? Please use the latest driver revision 
from SVN (75).

Cheers,

Laurent Pinchart

Index: uvc_driver.c
===================================================================
--- uvc_driver.c	(revision 75)
+++ uvc_driver.c	(working copy)
@@ -14,7 +14,8 @@
 /*
  * WARNING: This driver is definitely *NOT* complete. It will (hopefully)
  * support UVC devices with a camera sensors, a processing unit and several
- * optional extension units. Everything else is unsupported.
+ * optional extension units. Single-input selector units are ignored.
+ * Everything else is unsupported.
  *
  * The driver doesn't support the deprecated v4l1 interface. It implements the
  * mmap capture method only, and doesn't do any image format conversion in
@@ -994,9 +995,16 @@
 
 /*
  * Scan the UVC descriptors to locate a chain starting at an Output Terminal
- * and containing only a Processing Unit, optional Extension Units and an
- * Input Terminal. A side forward scan is made on each detected entity to
- * check for additional extension units.
+ * and containing the following units:
+ *
+ * - a USB Streaming Output Terminal
+ * - zero or one Processing Unit
+ * - zero, one or mode single-input Selector Units
+ * - zero, one or mode single-input Extension Units
+ * - one Camera Input Terminal, or one or more External terminals.
+ *
+ * A side forward scan is made on each detected entity to check for additional
+ * extension units.
  */
 static int uvc_scan_chain(struct uvc_video_device *video)
 {
@@ -1069,10 +1077,16 @@
 			break;
 
 		case VC_SELECTOR_UNIT:
-			uvc_trace(UVC_TRACE_DESCR, "Selector units are not "
-				"supported yet.\n");
-			return -1;
+			if (entity->selector.bNrInPins != 1) {
+				uvc_trace(UVC_TRACE_DESCR, "Multiple-input "
+					"selector units are not supported "
+					"yet.\n");
+				return -1;
+			}
 
+			id = entity->selector.baSourceID[0];
+			break;
+
 		default:
 			uvc_trace(UVC_TRACE_DESCR, "Unsupported unit type "
 				"0x%04x found in chain.n", entity->type);
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to