Following is a diff adding missing USB descriptor to uvideo.h according
to USB Video spec 1.5 . It also update a couple of table reference from
spec 1.1 to 1.5
Index: sys/dev/usb/uvideo.h
===================================================================
RCS file: /cvs/src/sys/dev/usb/uvideo.h,v
retrieving revision 1.57
diff -u -p -r1.57 uvideo.h
--- sys/dev/usb/uvideo.h        9 Jul 2015 14:58:32 -0000       1.57
+++ sys/dev/usb/uvideo.h        14 Jul 2015 17:24:42 -0000
@@ -208,6 +208,18 @@ struct usb_video_camera_terminal_desc {
        uByte   *bmControls;
 } __packed;
 
+/* Table 3-7: VC Selector Unit Descriptor */
+struct usb_video_vc_selector_desc {
+       uByte   bLength;
+       uByte   bDescriptorType;
+       uByte   bDescriptorSubType;
+       uByte   bUnitID;
+       uByte   bNrInPins;
+       uByte   baSourceID[1];
+/*     uByte   iSelector; */
+#define                VC_GET_ISELECTOR(w) ((w).baSourceID[0] + (w).bNrInPins)
+} __packed;
+
 /* Table 3-8: VC Processing Unit Descriptor */
 struct usb_video_vc_processing_desc {
        uByte   bLength;
@@ -222,7 +234,20 @@ struct usb_video_vc_processing_desc {
        /* uByte bmVideoStandards; */
 } __packed;
 
-/* Table 3-9: VC Extension Unit Descriptor */
+/* Table 3-9: VC Encoding Unit Descriptor */
+struct usb_video_vc_encoding_desc {
+       uByte   bLength;
+       uByte   bDescriptorType;
+       uByte   bDescriptorSubtype;
+       uByte   bUnitID;
+       uByte   bSourceID;
+       uByte   iEncoding;
+       uByte   bControlSize;
+       uByte   bmControls[3];
+       uByte   bmControlsRuntime[3];
+} __packed;
+
+/* Table 3-10: VC Extension Unit Descriptor */
 struct usb_video_vc_extension_desc {
        uByte   bLength;
        uByte   bDescriptorType;
@@ -233,7 +258,7 @@ struct usb_video_vc_extension_desc {
        uByte   bNrInPins;
 } __packed;
 
-/* Table 3-11: VC Endpoint Descriptor */
+/* Table 3-12: VC Endpoint Descriptor */
 struct usb_video_vc_endpoint_desc {
        uByte   bLength;
        uByte   bDescriptorType;
@@ -241,7 +266,7 @@ struct usb_video_vc_endpoint_desc {
        uWord   wMaxTransferSize;
 } __packed;
 
-/* Table 3-13: Interface Input Header Descriptor */
+/* Table 3-14: Interface Input Header Descriptor */
 struct usb_video_input_header_desc {
        uByte   bLength;
        uByte   bDescriptorType;
@@ -262,7 +287,36 @@ struct usb_video_input_header_desc_all {
        uByte                                   *bmaControls;
 };
 
-/* Table 3-18: Color Matching Descriptor */
+/* Table 3-15: Interface Output Header Descriptor */
+struct usb_video_output_header_desc {
+       uByte   bLength;
+       uByte   bDescriptorType;
+       uByte   bDescriptorSubtype;
+       uByte   bNumFormats;
+       uWord   wTotalLength;
+       uByte   bEndpointAddress;
+       uByte   bTerminalLink;
+       uByte   bControlSize;
+       uByte   baControls[1];
+} __packed;
+
+/* Table 3-18: Still Image Frame Descriptor */
+struct usb_video_still_image_frame_desc {
+       uByte   bLength;
+       uByte   bDescriptorType;
+       uByte   bDescriptorSubtype;
+       uByte   bEndpointAddress;
+       uByte   bNumImageSizePatterns;
+       uByte   data[1];
+/*     struct {
+               uWord   wWidth;
+               wWord   wHeight;
+       } __packed size[1]; */
+/*     uByte   bNumCompressionPattern; */
+/*     uByte   bCompression[1]; */
+} __packed;
+
+/* Table 3-19: Color Matching Descriptor */
 struct usb_video_color_matching_descr {
        uByte   bLength;
        uByte   bDescriptorType;

Reply via email to