USB系列之-UVC+UAC扬声器+麦克风实例分享

原创 嵌入式Lee 2024-04-15 08:00

一. 前言

前面三篇文章分享了UAC的扬声器,麦克风,扬声器+麦克风的设备。而一般多媒体设备是音频和视频同时有的,所以本文继续分享UVC+UAC(扬声器+麦克风)的复合设备。UVC实例后面再单独分享详细介绍。

.描述符拓扑

我们使用IAD可以方便的实现复合设备,前面已经实现了UVCUAC则只需要把他们拼起来即可。

我这里分享一个基于IADUVC+UAC描述符拓扑实例

UVC一共两个接口

控制接口0,一个输入终端,一个处理单元,一个输出终端。

0带宽流接口1alt 0, 实现了NV12H264MJPEGY800 4种格式,每种格式都有两种帧类型即两种分辨率。

9带宽流接口1alt 1,实现一个IN端点0x81用于发送数据。

UAC一共3个接口,接口2是控制接口,接口3是扬声器流,接口4是麦克风流。

接口3alt00带宽接口,设置接口选择该alt时关闭扬声器流,alt1是数据流接口,设置接口选择该alt时启动扬声器流,该接口下有一个OUT端点用于接收数据。

接口4alt00带宽接口,设置接口选择该alt时关闭麦克风流,alt1是数据流接口,设置接口选择该alt时启动麦克风流,该接口下有一个IN端点用于发送数据。

控制接口中包括

扬声器的:输入终端1,特征单元2和输出终端3。流接口3alt 1绑定到输入终端,

而输入终端对应的是OUT端点0x02

麦克风的:输入终端4,特征单元5和输出终端6。流接口4alt 1绑定到输出终端,

而输出终端对应的是IN端点0x82,注意这里在特征单元5和输出终端6之间插入了选择单元9.

.描述符实例

设备描述符和配置描述符如下,字符串描述符就略去了,描述符后有详细的注释和注意说明,不再赘述。

static const uint8_t dev_desc[] = {    0x12,        /* bLength 本描述符长度,固定为0x12 */    0x01,        /* bDescriptorType 描述符类型DEVICE=1, 见Table 9-5. Descriptor Types */    0x00,0x02,   /* bcdUSB USB规格书发布编号,BCD,小端 */    /* bDeviceClass-bDeviceSubClass-DeviceProtocol决定具体设备类型 见https://www.usb.org/defined-class-codes     * 这里EF-02-01表示IAD设备     */    0xEF,        /* bDeviceClass 设备类类型  */    0x02,        /* bDeviceSubClass 设备子类 */    0x01,        /* bDeviceProtocol 设备协议 */    0x40,        /* bMaxPacketSize0 控制端点最大包大小 */    0x4A,0x4C,   /* idVendor 厂商ID VID,小端*/    0x55,0x4C,   /* idProduct 产品ID PID,小端*/    0x00,0x01,   /* bcdDevice 设备发布号,BCD,小端*/    0x01,        /* iManufacturer 制造商字符串描述符索引 */      0x02,        /* iProduct 产品字符串描述符索引 */    0x03,        /* iSerialNumber 设备序列号字符串描述符索引 0则不使用 */    0x01,        /* bNumConfigurations 配置个数 */};static const uint8_t cfg_desc[] = {    /* 配置描述符见Table 9-10. Standard Configuration Descriptor */    0x09,  /* bLength 本描述符长度,固定为9 */    0x02,  /* bDescriptorType 描述符类型CONFIGURATION =0x02, 见Table 9-5. Descriptor Types P251 */    0xD8,  /* wTotalLength 本配置符所有内容长度,小端 */    0x02,    0x05,  /* bNumInterfaces 本配置的接口数 一个控制一个流 */    0x01,  /* bConfigurationValue 设置配置请求,选择该配置的对应的设置值 */    0x00,  /* iConfiguration 本配置对应的字符串描述符,配置为0则没有     */    0x80,  /* bmAttributes 配置特征 D7固定为1 D6:Self-powered D5:Remote Wakeup*/    0xC8,  /* bMaxPower 最大消耗电流,单位2mA */
    /********************************************************     *           以下是UVC部分     *******************************************************/    /**     * IAD描述符     * 见UVC 1.5 Class specification.pdf 3.6 Interface Association Descriptor P60    */    0x08,                /* bLength 本描述符长度,固定为8 */    0x0B,                /* bDescriptorType 描述符类型 INTERFACE_ASSOCIATION=0x0B 参考InterfaceAssociationDescriptor_ecn P3 */    UVC_ITF_VC,          /* bFirstInterface 本IAD下第一个接口 */    0x02,                /* bInterfaceCount 本IAD下接口数,默认一个控制接口一个流接口 */    0x0E,                /* bFunctionClass 功能类 见UVC 1.5 Class specification.pdf Table A- 1 Video Interface Class Code P171 CC_VIDEO=0x0E */    0x03,                /* bFunctionSubClass 功能子类 见UVC 1.5 Class specification.pdf Table A- 2 Video Interface Subclass Codes P171 SC_VIDEO_INTERFACE_COLLECTION=0x03  */    0x00,                /* bFunctionProtocol 功能协议号 见UVC 1.5 Class specification.pdf Table A- 3 Video Interface Protocol Codes P171 PC_PROTOCOL_UNDEFINED=0x00 */    0x00,                /* iFunction 对应字符串索引                                */
        /* 控制接口描述符 见UVC 1.5 Class specification.pdf 3.7 VideoControl Interface Descriptors P61          * Table 3-2 Standard VC Interface Descriptor        */        0x09,                      /* bLength  本描述符长度,固定为9               */        0x04,                      /* bDescriptorType 描述符类型  见usb_20 P251 Table 9-5. Descriptor Types  INTERFACE=4  */        UVC_ITF_VC,                /* bInterfaceNumber  接口号,从0开始            */        0x00,                      /* bAlternateSetting alt接口号,从0开始         */        0x00,                      /* bNumEndpoints 本接口下端点数                */        0x0E,                      /* bInterfaceClass 接口类,见UVC 1.5 Class specification.pdf Table A- 1 Video Interface Class Code P171 CC_VIDEO=0x0E        */        0x01,                      /* bInterfaceSubClass接口子类 见UVC 1.5 Class specification.pdf Table A- 2 Video Interface Subclass Codes P171 SC_VIDEOCONTROL=0x01   */        0x00,                      /* bInterfaceProtocol 接口协议号,见UVC 1.5 Class specification.pdf Table A- 3 Video Interface Protocol Codes P171 PC_PROTOCOL_UNDEFINED=0x00 */        0x00,                      /* iInterface 本接口字符串描述符索引            */
                /* 见UVC 1.5 Class specification.pdf 3.7.2 Class-Specific VC Interface Descriptor P62                  * Table 3-3 Class-specific VC Interface Header Descriptor                 */                0x0D,                   /* bLength  本描述符长度 12+n */                0x24,                   /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                0x01,                   /* bDescriptorSubType 描述符子类型 见UVC 1.5 Class specification.pdf P172 Table A- 5 Video Class-Specific VC Interface Descriptor Subtypes VC_HEADER=0x01 */                0x00, 0x01,             /* bcdUVC UVC版本,压缩BCD,小端 */                53, 0x00,               /* wTotalLength 本描述符加后面的所有Input/Output Terminal和Unit的总长    */                UVC_MAKE_DWORD(UVC_CLOCKFRQ), /* dwClockFrequency 设备时钟频率,单位Hz,小端4字节 */                1,                      /* bInCollection 本VideoControl接口包含的VideoStreaming interfaces接口数 */                UVC_ITF_VS,             /* baInterfaceNr(1) 第一个VideoStreaming interface接口号 */
                        /*  见UVC 1.5 Class specification.pdf P64 3.7.2.1 Input Terminal Descriptor                           *  Table 3-4 Input Terminal Descriptor                         */                        0x12,               /* bLength  8+x */                        0x24,               /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x02,               /* bDescriptorSubType 描述符子类型 见UVC 1.5 Class specification.pdf P172 Table A- 5 Video Class-Specific VC Interface Descriptor Subtypes VC_INPUT_TERMINAL=0x02      */                        UVC_TID_IN,         /* bTerminalID (1) 终端ID,非0       */                        UVC_MAKE_WORD(0x0201),       /* wTerminalType  见UVC 1.5 Class specification.pdf P177 Table B- 2 Input Terminal Types (ITT_CAMERA=0x0201)  */                        0x00,                        /* bAssocTerminal(Not  associated with an Output Terminal) */                        0x00,                        /* iTerminal 终端的字符串描述符索引,  (No String Descriptor) */                        UVC_MAKE_WORD(0x0000),       /* wObjectiveFocalLengthMin */                        UVC_MAKE_WORD(0x0000),       /* wObjectiveFocalLengthMax */                        UVC_MAKE_WORD(0x0000),       /* wOcularFocalLength */                        0x03,                        /* bControlSize (3 bytes) */                        /*  bmControls                        D0: Scanning Mode                        D1: Auto-Exposure Mode                        D2: Auto-Exposure Priority                        D3: Exposure Time (Absolute)                        D4: Exposure Time (Relative)                        D5: Focus (Absolute)                        D6 : Focus (Relative)                        D7: Iris (Absolute)                        D8 : Iris (Relative)                        D9: Zoom (Absolute)                        D10: Zoom (Relative)                        D11: PanTilt (Absolute)                        D12: PanTilt (Relative)                        D13: Roll (Absolute)                        D14: Roll (Relative)                        D15: Reserved                        D16: Reserved                        D17: Focus, Auto                        D18: Privacy                        D19: Focus, Simple                        D20: Window                        D21: Region of Interest                        D22 – D23: Reserved, set to zero                        */                        0x00,                        0x00,                        0x00,
                        /* 见UVC 1.5 Class specification.pdf P69 3.7.2.5 Processing Unit Descriptor                          * Table 3-8 Processing Unit Descriptor                         */                        0x0D,                        /*  bLength  (11 bytes) */                        0x24,                        /*  bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x05,                        /*  bDescriptorSubType 描述符子类型 见UVC 1.5 Class specification.pdf P172 Table A- 5 Video Class-Specific VC Interface Descriptor Subtypes VC_PROCESSING_UNIT=0x05 */                        UVC_TID_PU,                  /*  bUnitID (1)   */                        UVC_TID_IN,                  /*  bSourceID (2) */                        UVC_MAKE_WORD(0x0000),       /*  wMaxMultiplier */                        0x03,                        /*  bControlSize (3 bytes) */                        /*                        bmControls                        D0: Brightness                        D1: Contrast                        D2: Hue                        D3: Saturation                        D4: Sharpness                        D5: Gamma                        D6: White Balance Temperature                        D7: White Balance Component                        D8: Backlight Compensation                        D9: Gain                        D10: Power Line Frequency                        D11: Hue, Auto                        D12: White Balance Temperature, Auto                        D13: White Balance Component, Auto                        D14: Digital Multiplier                        D15: Digital Multiplier Limit                        D16: Analog Video Standard                        D17: Analog Video Lock Status                        D18: Contrast, Auto                        D19 – D23: Reserved. Set to zero                        */                        0x00,                        0x00,                        0x00,                        0x00,                  /* iProcessing  Index of a string descriptor */                        /*  bmVideoStandards                        D0: None                        D1: NTSC – 525/60                        D2: PAL – 625/50                        D3: SECAM – 625/50                        D4: NTSC – 625/50                        D5: PAL – 525/60                        */                        0x00,
                        /* 见UVC 1.5 Class specification.pdf 3.7.2.2 Output Terminal Descriptor P66 */                        0x09,               /* bLength */                        0x24,               /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24          */                        0x03,               /* bDescriptorSubType 描述符子类型 见UVC 1.5 Class specification.pdf P172 Table A- 5 Video Class-Specific VC Interface Descriptor Subtypes VC_OUTPUT_TERMINAL=0x03  */                        UVC_TID_OUT,        /* bTerminalID 终端ID. 9.2.1 Input Header Descriptor的bTerminalLink对应 */                        UVC_MAKE_WORD(0x0101),     /* wTerminalType  见UVC 1.5 Class specification.pdf P177 Table B- 1 USB Terminal Types (TT_STREAMING=0x0101)   */                        UVC_TID_IN,                /* bAssocTerminal 关联Input Terminal */                        UVC_TID_PU,                /* bSourceID 本终端连接的Unit or Terminal的ID */                        0x00,                      /* iTerminal 描述终端的字符串描述符索*/
        /* Class-Specific VS Interface Descriptors alternate setting 0          * 见UVC 1.5 Class specification.pdf P76 Table 3-13 Standard VS Interface Descriptor         */        0x09,                   /* bLength   接口描述符长固定9字节            */        0x04,                   /* bDescriptorType  bDescriptorType   见usb_20 P251 Table 9-5. Descriptor Types  INTERFACE=4        */        UVC_ITF_VS,             /* bInterfaceNumber  接口索引           */        0x00,                   /* bAlternateSetting alt接口设置索引    */        0x00,                   /* bNumEndpoints 本接口使用的端点个数(不含端点0) */        0x0E,                   /* bInterfaceClass 见UVC 1.5 Class specification.pdf P171 Table A- 1 Video Interface Class Code  CC_VIDEO=0x0E */        0x02,                   /* bInterfaceSubClass 见UVC 1.5 Class specification.pdf P171 Table A- 2 Video Interface Subclass Codes SC_VIDEOSTREAMING=0x02        */        0x00,                   /* bInterfaceProtocol 见UVC 1.5 Class specification.pdf P171 Table A- 3 Video Interface Protocol Codes PC_PROTOCOL_UNDEFINED=0x00 */        0x00,                   /* iInterface 字符串描述符索引 0:            */
                /* 3.9.2 Class-Specific VS Interface Descriptors                   3.9.2.1 Input Header Descriptor                    见UVC 1.5 Class specification.pdf P76 Table 3-14 Class-specific VS Interface Input Header Descriptor*/                0x11,            /* bLength 13+(p*n)                     */                0x24,            /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24        */                0x01,            /* bDescriptorSubtype 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_INPUT_HEADER=0x01   */                0x04,            /* bNumFormats 本接口对应的格式描述符个数 */                0xA4,0x01,       /* wTotalLength 本描述符加上后面格式描述帧描述符的长*/                UVC_IN_ED,       /* bEndpointAddress videa data对应的端D7: Direction 1 = IN endpoint D3..0: The endpoint number*/                0x00,            /* bmInfo D0: Dynamic Format Change supported */                UVC_TID_OUT,     /* bTerminalLink 本接口的video端点连接的输出终端的ID */                0x00,            /* bStillCaptureMethod Method of still image capture */                0x00,            /* bTriggerSupport */                0x00,            /* bTriggerUsage */                0x01,            /* bControlSize bmaControls区域的大小 每个格式对应1字节,4种格式 */                /*                For bits D3..0, a bit set to 1 indicates that                the named field is supported by the Video                Probe and Commit Control when                bFormatIndex is 1:                D0: wKeyFrameRate                D1: wPFrameRate                D2: wCompQuality                D3: wCompWindowSize                For bits D5..4, a bit set to 1 indicates that                the named control is supported by the                device when bFormatIndex is 1:                D4: Generate Key Frame                D5: Update Frame Segment                D6..(n*8-1): Reserved, set to zero                */                0x00,            /* bmaControls(1) */                0x00,            /* bmaControls(2) */                0x00,            /* bmaControls(3) */                0x00,            /* bmaControls(4) */
                        /**************************************                         *    NV12格式部分                         *************************************/                        /* 见 USB_Video_Payload_Uncompressed_1.5.pdf P10 Table 3-1 Uncompressed Video Format Descriptor */                        27,                             /* bLength 27*/                        0x24,                           /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24  */                        0x04,                           /* bDescriptorSubType : 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FORMAT_UNCOMPRESSED=0x04 */                        0x01,                           /* bFormatIndex : 格式索引 */                        0x02,                           /* bNumFrameDescriptors : 本格式符下有一个帧描述, 可以有多个不同分辨率的帧 */                        //0x59,0x55,0x59,0x32,          /* Giud Format YUY2 {32595559-0000-0010-8000-00AA00389B71} */                        0x4E,0x56,0x31,0x32,            /* Giud Format NV12 {3231564E-0000-0010-8000-00AA00389B71} */                        0x00,0x00,                        0x10,0x00,                        0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71,                        12,                             // bBitsPerPixel : Number of bits per pixel used to specify color in the decoded video frame - 12 for nv12 16 for YUY2                        0x01,                           /* bDefaultFrameIndex : Default frame index is 1. 默认选择格式下的第一个帧 */                        0x00,                           /* bAspectRatioX : Non-interlaced stream not required. */                        0x00,                           /* bAspectRatioY : Non-interlaced stream not required. */                        0x00,                           /* bmInterlaceFlags : Non-interlaced stream */                        0x00,                           /* bCopyProtect : No restrictions imposed on the duplication of this video stream. */
                        /* 见 USB_Video_Payload_Uncompressed_1.5.pdf P12 Table 3-2 Uncompressed Video Frame Descriptors */                        0x26,                           /* bLength 30*/                        0x24,                           /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x05,                           /* bDescriptorSubType : 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FRAME_UNCOMPRESSED=0x05 */                        0x01,                           /* bFrameIndex : 帧索引 */                        0x02,                           /* bmCapabilities : Still images using capture method 0 are supported at this frame setting.D1: Fixed frame-rate. */                        UVC_MAKE_WORD(UVC_NV12_WIDTH_MAX1),           /* wWidth (2bytes). */                        UVC_MAKE_WORD(UVC_NV12_HEIGHT_MAX1),          /* wHeight (2bytes). */                        UVC_MAKE_DWORD(UVC_NV12_MIN_BIT_RATE1),       /* dwMinBitRate (4bytes): Min bit rate in bits/s  */                        UVC_MAKE_DWORD(UVC_NV12_MAX_BIT_RATE1),       /* dwMaxBitRate (4bytes): Max bit rate in bits/s  */                         UVC_MAKE_DWORD(UVC_NV12_MAX_FRAME_SIZE1),     /* dwMaxVideoFrameBufSize (4bytes): Maximum video or still frame size, in bytes. 这个值不能小,否则host可能分配空间不足以存储一帧图片 */                        UVC_MAKE_DWORD(UVC_NV12_FRAME_DEFINTERVEL1),  /* dwDefaultFrameInterval : 1,000,000 * 100ns -> 10 FPS */                         0x03,                                         /* bFrameIntervalType 帧间隔配置方法 0:连续帧间1..255:离散帧间隔配置个数 */                        UVC_MAKE_DWORD(UVC_NV12_FRAME_MININTERVEL1),  /* bFrameIntervalType=0dwMinFrameInterval 最小帧间隔(最大帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_NV12_FRAME_DEFINTERVEL1),  /* bFrameIntervalType=0dwMaxFrameInterval 最大帧间隔(最小帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_NV12_FRAME_MAXINTERVEL1),  /* bFrameIntervalType=0dwFrameIntervalStep 帧间隔步单位100ns         */
                        /* 见 USB_Video_Payload_Uncompressed_1.5.pdf P12 Table 3-2 Uncompressed Video Frame Descriptors */                        0x26,                           /* bLength 30*/                        0x24,                           /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x05,                           /* bDescriptorSubType : 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FRAME_UNCOMPRESSED=0x05 */                        0x02,                           /* bFrameIndex : 帧索引 */                        0x02,                           /* bmCapabilities : Still images using capture method 0 are supported at this frame setting.D1: Fixed frame-rate. */                        UVC_MAKE_WORD(UVC_NV12_WIDTH_MAX2),           /* wWidth (2bytes). */                        UVC_MAKE_WORD(UVC_NV12_HEIGHT_MAX2),          /* wHeight (2bytes). */                        UVC_MAKE_DWORD(UVC_NV12_MIN_BIT_RATE2),       /* dwMinBitRate (4bytes): Min bit rate in bits/s  */                        UVC_MAKE_DWORD(UVC_NV12_MAX_BIT_RATE2),       /* dwMaxBitRate (4bytes): Max bit rate in bits/s  */                         UVC_MAKE_DWORD(UVC_NV12_MAX_FRAME_SIZE2),     /* dwMaxVideoFrameBufSize (4bytes): Maximum video or still frame size, in bytes. 这个值不能小,否则host可能分配空间不足以存储一帧图片 */                        UVC_MAKE_DWORD(UVC_NV12_FRAME_DEFINTERVEL2),  /* dwDefaultFrameInterval : 1,000,000 * 100ns -> 10 FPS */                         0x03,                                         /* bFrameIntervalType 帧间隔配置方法 0:连续帧间1..255:离散帧间隔配置个数 */                        UVC_MAKE_DWORD(UVC_NV12_FRAME_MININTERVEL2),  /* bFrameIntervalType=0dwMinFrameInterval 最小帧间隔(最大帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_NV12_FRAME_DEFINTERVEL2),  /* bFrameIntervalType=0dwMaxFrameInterval 最大帧间隔(最小帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_NV12_FRAME_MAXINTERVEL2),  /* bFrameIntervalType=0dwFrameIntervalStep 帧间隔步单位100ns         */
                        /* 见 USB_Video_Payload_Uncompressed_1.5.pdf P83 Table 3-19 Color Matching Descriptor                            必须跟在Frame Descriptors后 一个格式描述符只能对应一个                         */                        6,                                    /* bLength */                        0x24,                                 /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x0D,                                 /* bDescriptorSubType : 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_COLORFORMAT=0x0D  */                        0x01,                                 /* bColorPrimarie : 1: BT.709, sRGB (default) */                        0x01,                                 /* bTransferCharacteristics : 1: BT.709 (default) */                        0x04,                                 /* bMatrixCoefficients : 4: SMPTE 170M (BT.601,default) */
                        /**************************************                         *    H264格式部分                         *************************************/                        /* 见USB_Video_Payload_Frame_Based_1.5.pdf P11 Table 3-1 Frame Based Payload Video Format Descriptor */                        0x1C,           /* bLength */                        0x24,           /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24   */                        0x10,           /* bDescriptorSubtype 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FORMAT_FRAME_BASED=0x10 */                        0x02,           /* bFormatIndex 格式索引*/                        0x02,           /* bNumFrameDescriptors 本格式下的帧描述符个数 */                        0x48,0x32,0x36,0x34, /* guidFormat */                        0x00,0x00,                        0x10,0x00,                        0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71,                        0x10,           /* bBitsPerPixel */                        0x01,           /* bDefaultFrameIndex  */                        0x00,           /* bAspectRatioX */                        0x00,           /* bAspectRatioY */                        /*                        Specifies interlace information. If the                        scanning mode control in the Camera                        Terminal is supported for this stream,                        this field shall reflect the field format                        used in interlaced mode.                        (Top field in PAL is field 1, top field in                        NTSC is field 2.):                        D0: Interlaced stream or variable. 1 =                        Yes                        D1: Fields per frame. 0= 2 fields, 1 = 1                        field                        D2: Field 1 first. 1 = Yes                        D3: Reserved                        D5..4: Field pattern                        00 = Field 1 only                        01 = Field 2 only                        10 = Regular pattern of fields 1 and 2                        11 = Random pattern of fields 1 and 2                        D7..6: Reserved. Do not use                        */                        0x00,           /* bmInterlaceFlags */                        0x00,           /* bCopyProtect  */                        0x01,           /* bVariableSize 1:帧大小是可变的 0:帧大小是固定的 */
                        /* 见USB_Video_Payload_Frame_Based_1.5.pdf P14 Table 3-2 Frame Based Payload Video Frame Descriptors */                        0x26,                   /* bLength   */                        0x24,                   /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x11,                   /* bDescriptorSubtype 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FRAME_FRAME_BASED=0x11 */                        0x01,                   /* bFrameIndex   */                        0x00,                   /* bmCapabilities*/                        UVC_MAKE_WORD(UVC_H264_WIDTH_MAX1),           /* wWidth  */                        UVC_MAKE_WORD(UVC_H264_HEIGHT_MAX1),          /* wHeight  */                        UVC_MAKE_DWORD(UVC_H264_MIN_BIT_RATE1),       /* dwMinBitRate  */                        UVC_MAKE_DWORD(UVC_H264_MAX_BIT_RATE1),       /* dwMaxBitRate */                        UVC_MAKE_DWORD(UVC_H264_FRAME_DEFINTERVEL1),  /* dwDefaultFrameInterval */                        0x03,                                         /* bFrameIntervalType */                        0x00,0x00,0x00,0x00,                          /* dwBytesPerLine 固定帧大小时使用 */                        UVC_MAKE_DWORD(UVC_H264_FRAME_MININTERVEL1),  /* bFrameIntervalType=0dwMinFrameInterval 最小帧间隔(最大帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_H264_FRAME_DEFINTERVEL1),  /* bFrameIntervalType=0dwMaxFrameInterval 最大帧间隔(最小帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_H264_FRAME_MAXINTERVEL1),  /* bFrameIntervalType=0dwFrameIntervalStep 帧间隔步单位100ns         */
                        /* 见USB_Video_Payload_Frame_Based_1.5.pdf P14 Table 3-2 Frame Based Payload Video Frame Descriptors */                        0x26,                   /* bLength   */                        0x24,                   /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x11,                   /* bDescriptorSubtype 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FRAME_FRAME_BASED=0x11 */                        0x02,                   /* bFrameIndex   */                        0x00,                   /* bmCapabilities*/                        UVC_MAKE_WORD(UVC_H264_WIDTH_MAX2),           /* wWidth  */                        UVC_MAKE_WORD(UVC_H264_HEIGHT_MAX2),          /* wHeight  */                        UVC_MAKE_DWORD(UVC_H264_MIN_BIT_RATE2),       /* dwMinBitRate  */                        UVC_MAKE_DWORD(UVC_H264_MAX_BIT_RATE2),       /* dwMaxBitRate */                        UVC_MAKE_DWORD(UVC_H264_FRAME_DEFINTERVEL2),  /* dwDefaultFrameInterval */                        0x03,                                         /* bFrameIntervalType */                        0x00,0x00,0x00,0x00,                          /* dwBytesPerLine 固定帧大小时使用 */                        UVC_MAKE_DWORD(UVC_H264_FRAME_MININTERVEL2),  /* bFrameIntervalType=0dwMinFrameInterval 最小帧间隔(最大帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_H264_FRAME_DEFINTERVEL2),  /* bFrameIntervalType=0dwMaxFrameInterval 最大帧间隔(最小帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_H264_FRAME_MAXINTERVEL2),  /* bFrameIntervalType=0dwFrameIntervalStep 帧间隔步单位100ns         */
                        /**************************************                         *    MJPEG格式部分                         *************************************/                        /* 见 MJPEG USB_Video_Payload_MJPEG_1.5.pdf P12 3.1.1 MJPEG Video Format Descriptor */                        0x0B,           /* bLength 描述符长固定x0B  */                        0x24,           /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24  */                        0x06,           /* bDescriptorSubtype 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FORMAT_MJPEG=0x06 */                        0x03,           /* bFormatIndex 格式描述索引  */                        0x02,           /* bNumFrameDescriptors 与此格式描述符对应的帧描述符个数 */                        0x01,           /* bmFlags D0: FixedSizeSamples. 1 = Yes */                        0x01,           /* bDefaultFrameIndex 此流的默认帧索引 */                        0x00,           /* bAspectRatioX 纵横比x*/                        0x00,           /* bAspectRatioY 纵横比y*/                        /*                        Specifies interlace information. If the                        scanning mode control in the Camera                        Terminal is supported for this stream,                        this field should reflect the field format                        used in interlaced mode.                        (Top field in PAL is field 1, top field in                        NTSC is field 2.):                        D0: Interlaced stream or variable. 1 =                        Yes                        D1: Fields per frame. 0= 2 fields, 1 = 1                        field                        D2: Field 1 first. 1 = Yes                        D3: Reserved                        D5..4: Field pattern                        00 = Field 1 only                        01 = Field 2 only                        10 = Regular pattern of fields 1 and 2                        11 = Random pattern of fields 1 and 2                        D7..6: Reserved. Do not use.                        */                        0x00,           /* bmInterlaceFlags */                        0x00,           /* bCopyProtect 是否限制重复的视频流 */
                        /* 见 MJPEG USB_Video_Payload_MJPEG_1.5.pdf P13 Table 3-2 Motion-JPEG Video Frame Descriptor */                        0x26,                   /* bLength   描述符长bFrameIntervalType=08,bFrameIntervalType>06+(4*n) */                        0x24,                   /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x07,                   /* bDescriptorSubtype 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FRAME_MJPEG=0x07 */                        0x01,                   /* bFrameIndex  帧描述符索引 */                        0x02,                   /* bmCapabilities D0: Still image supported(Image Capture Method 1) D1: Fixed frame-rate*/                        UVC_MAKE_WORD(UVC_MJPEG_WIDTH_MAX1),        /* wWidth  */                        UVC_MAKE_WORD(UVC_MJPEG_HEIGHT_MAX1),        /* wHeight  */                        UVC_MAKE_DWORD(UVC_MJPEG_MIN_BIT_RATE1),     /* dwMinBitRate 指定默认压缩质量下和最长的帧间隔时对应的传输最小比特率bps */                        UVC_MAKE_DWORD(UVC_MJPEG_MAX_BIT_RATE1),        /* dwMaxBitRate 指定默认压缩质量下和最短的帧间隔时对应的传输最大比特率bps */                        UVC_MAKE_DWORD(UVC_MJPEG_MAX_FRAME_SIZE1),   /* dwMaxVideoFrameBufferSize 帧压缩缓冲大小 */                        UVC_MAKE_DWORD(UVC_MJPEG_FRAME_DEFINTERVEL1),   /* dwDefaultFrameInterval 默认帧间隔 */                        0x03,                                          /* bFrameIntervalType 帧间隔配置方0:连续帧间1..255:离散帧间隔配置个*/                        UVC_MAKE_DWORD(UVC_MJPEG_FRAME_MININTERVEL1),  /* bFrameIntervalType=0dwMinFrameInterval 最小帧间隔(最大帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_MJPEG_FRAME_DEFINTERVEL1),  /* bFrameIntervalType=0dwMaxFrameInterval 最大帧间隔(最小帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_MJPEG_FRAME_MAXINTERVEL1),  /* bFrameIntervalType=0dwFrameIntervalStep 帧间隔步单位100ns         */
                        /* 见 MJPEG USB_Video_Payload_MJPEG_1.5.pdf P13 Table 3-2 Motion-JPEG Video Frame Descriptor */                        0x26,                   /* bLength   描述符长bFrameIntervalType=08,bFrameIntervalType>06+(4*n) */                        0x24,                   /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x07,                   /* bDescriptorSubtype 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FRAME_MJPEG=0x07 */                        0x02,                   /* bFrameIndex  帧描述符索引 */                        0x02,                   /* bmCapabilities D0: Still image supported(Image Capture Method 1) D1: Fixed frame-rate*/                        UVC_MAKE_WORD(UVC_MJPEG_WIDTH_MAX2),        /* wWidth  */                        UVC_MAKE_WORD(UVC_MJPEG_HEIGHT_MAX2),        /* wHeight  */                        UVC_MAKE_DWORD(UVC_MJPEG_MIN_BIT_RATE2),     /* dwMinBitRate 指定默认压缩质量下和最长的帧间隔时对应的传输最小比特率bps */                        UVC_MAKE_DWORD(UVC_MJPEG_MAX_BIT_RATE2),        /* dwMaxBitRate 指定默认压缩质量下和最短的帧间隔时对应的传输最大比特率bps */                        UVC_MAKE_DWORD(UVC_MJPEG_MAX_FRAME_SIZE2),   /* dwMaxVideoFrameBufferSize 帧压缩缓冲大小 */                        UVC_MAKE_DWORD(UVC_MJPEG_FRAME_DEFINTERVEL2),   /* dwDefaultFrameInterval 默认帧间隔 */                        0x03,                                          /* bFrameIntervalType 帧间隔配置方0:连续帧间1..255:离散帧间隔配置个*/                        UVC_MAKE_DWORD(UVC_MJPEG_FRAME_MININTERVEL2),  /* bFrameIntervalType=0dwMinFrameInterval 最小帧间隔(最大帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_MJPEG_FRAME_DEFINTERVEL2),  /* bFrameIntervalType=0dwMaxFrameInterval 最大帧间隔(最小帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_MJPEG_FRAME_MAXINTERVEL2),  /* bFrameIntervalType=0dwFrameIntervalStep 帧间隔步单位100ns         */                                                /**************************************                         *    Y800格式部分                         *************************************/                        /* 见 USB_Video_Payload_Uncompressed_1.5.pdf P10 Table 3-1 Uncompressed Video Format Descriptor */                        27,                             /* bLength 27*/                        0x24,                           /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24  */                        0x04,                           /* bDescriptorSubType : 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FORMAT_UNCOMPRESSED=0x04 */                        0x04,                           /* bFormatIndex : 格式索引 */                        0x02,                           /* bNumFrameDescriptors : 本格式符下有一个帧描述, 可以有多个不同分辨率的帧 */                        'Y',  '8',  '0',  '0',                        0x00,0x00,                        0x10,0x00,                        0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71,                        8,                              /* bBitsPerPixel : Number of bits per pixel used to specify color in the decoded video frame */                         0x01,                           /* bDefaultFrameIndex : Default frame index is 1. 默认选择格式下的第一个帧 */                        0x00,                           /* bAspectRatioX : Non-interlaced stream not required. */                        0x00,                           /* bAspectRatioY : Non-interlaced stream not required. */                        0x00,                           /* bmInterlaceFlags : Non-interlaced stream */                        0x00,                           /* bCopyProtect : No restrictions imposed on the duplication of this video stream. */
                        /* 见 USB_Video_Payload_Uncompressed_1.5.pdf P12 Table 3-2 Uncompressed Video Frame Descriptors */                        0x26,                           /* bLength 30*/                        0x24,                           /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x05,                           /* bDescriptorSubType : 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FRAME_UNCOMPRESSED=0x05 */                        0x01,                           /* bFrameIndex : 帧索引 */                        0x02,                           /* bmCapabilities : Still images using capture method 0 are supported at this frame setting.D1: Fixed frame-rate. */                        UVC_MAKE_WORD(UVC_Y800_WIDTH_MAX1),           /* wWidth (2bytes). */                        UVC_MAKE_WORD(UVC_Y800_HEIGHT_MAX1),          /* wHeight (2bytes). */                        UVC_MAKE_DWORD(UVC_Y800_MIN_BIT_RATE1),       /* dwMinBitRate (4bytes): Min bit rate in bits/s  */                        UVC_MAKE_DWORD(UVC_Y800_MAX_BIT_RATE1),       /* dwMaxBitRate (4bytes): Max bit rate in bits/s  */                         UVC_MAKE_DWORD(UVC_Y800_MAX_FRAME_SIZE1),     /* dwMaxVideoFrameBufSize (4bytes): Maximum video or still frame size, in bytes. 这个值不能小,否则host可能分配空间不足以存储一帧图片 */                        UVC_MAKE_DWORD(UVC_Y800_FRAME_DEFINTERVEL1),  /* dwDefaultFrameInterval : 1,000,000 * 100ns -> 10 FPS */                         0x03,                                         /* bFrameIntervalType 帧间隔配置方法 0:连续帧间1..255:离散帧间隔配置个数 */                        UVC_MAKE_DWORD(UVC_Y800_FRAME_MININTERVEL1),  /* bFrameIntervalType=0dwMinFrameInterval 最小帧间隔(最大帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_Y800_FRAME_DEFINTERVEL1),  /* bFrameIntervalType=0dwMaxFrameInterval 最大帧间隔(最小帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_Y800_FRAME_MAXINTERVEL1),  /* bFrameIntervalType=0dwFrameIntervalStep 帧间隔步单位100ns         */
                        /* 见 USB_Video_Payload_Uncompressed_1.5.pdf P12 Table 3-2 Uncompressed Video Frame Descriptors */                        0x26,                           /* bLength 30*/                        0x24,                           /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x05,                           /* bDescriptorSubType : 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_FRAME_UNCOMPRESSED=0x05 */                        0x02,                           /* bFrameIndex : 帧索引 */                        0x02,                           /* bmCapabilities : Still images using capture method 0 are supported at this frame setting.D1: Fixed frame-rate. */                        UVC_MAKE_WORD(UVC_Y800_WIDTH_MAX2),           /* wWidth (2bytes). */                        UVC_MAKE_WORD(UVC_Y800_HEIGHT_MAX2),          /* wHeight (2bytes). */                        UVC_MAKE_DWORD(UVC_Y800_MIN_BIT_RATE2),       /* dwMinBitRate (4bytes): Min bit rate in bits/s  */                        UVC_MAKE_DWORD(UVC_Y800_MAX_BIT_RATE2),       /* dwMaxBitRate (4bytes): Max bit rate in bits/s  */                         UVC_MAKE_DWORD(UVC_Y800_MAX_FRAME_SIZE2),     /* dwMaxVideoFrameBufSize (4bytes): Maximum video or still frame size, in bytes. 这个值不能小,否则host可能分配空间不足以存储一帧图片 */                        UVC_MAKE_DWORD(UVC_Y800_FRAME_DEFINTERVEL2),  /* dwDefaultFrameInterval : 1,000,000 * 100ns -> 10 FPS */                         0x03,                                         /* bFrameIntervalType 帧间隔配置方法 0:连续帧间1..255:离散帧间隔配置个数 */                        UVC_MAKE_DWORD(UVC_Y800_FRAME_MININTERVEL2),  /* bFrameIntervalType=0dwMinFrameInterval 最小帧间隔(最大帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_Y800_FRAME_DEFINTERVEL2),  /* bFrameIntervalType=0dwMaxFrameInterval 最大帧间隔(最小帧 单位 100ns */                        UVC_MAKE_DWORD(UVC_Y800_FRAME_MAXINTERVEL2),  /* bFrameIntervalType=0dwFrameIntervalStep 帧间隔步单位100ns         */
                        /* 见 USB_Video_Payload_Uncompressed_1.5.pdf P83 Table 3-19 Color Matching Descriptor                            必须跟在Frame Descriptors后 一个格式描述符只能对应一个                         */                        6,                                    /* bLength */                        0x24,                                 /* bDescriptorType 描述符类型 见UVC 1.5 Class specification.pdf P171 Table A- 4 Video Class-Specific Descriptor Types CS_INTERFACE=0x24 */                        0x0D,                                 /* bDescriptorSubType : 见UVC 1.5 Class specification.pdf P172 Table A- 6 Video Class-Specific VS Interface Descriptor Subtypes VS_COLORFORMAT=0x0D  */                        0x01,                                 /* bColorPrimarie : 1: BT.709, sRGB (default) */                        0x01,                                 /* bTransferCharacteristics : 1: BT.709 (default) */                        0x04,                                 /* bMatrixCoefficients : 4: SMPTE 170M (BT.601,default) */
        /* 3.9.1 Standard VS Interface Descriptor alternate setting 1 */        0x09,   /* bLength   接口描述符长固定9字节            */        0x04,   /* bDescriptorType  bDescriptorType   见usb_20 P251 Table 9-5. Descriptor Types  INTERFACE=4         */        UVC_ITF_VS,   /* bInterfaceNumber  接口索引          */        0x01,         /* bAlternateSetting alt接口设置索引   */        0x01,         /* bNumEndpoints 本接口使用的端点个数(不含端点0) */        0x0E,         /* bInterfaceClass 见UVC 1.5 Class specification.pdf P171 Table A- 1 Video Interface Class Code  CC_VIDEO=0x0E */        0x02,         /* bInterfaceSubClass 见UVC 1.5 Class specification.pdf P171 Table A- 2 Video Interface Subclass Codes SC_VIDEOSTREAMING=0x02        */        0x00,         /* bInterfaceProtocol 见UVC 1.5 Class specification.pdf P171 Table A- 3 Video Interface Protocol Codes PC_PROTOCOL_UNDEFINED=0x00 */        0x00,         /* iInterface 字符串描述符索引 0:            */
        /* 3.10 VideoStreaming Endpoint Descriptors            3.10.1.1 Standard VS Isochronous Video Data Endpoint Descriptor            见UVC 1.5 Class specification.pdf P85 Table 3-20 Standard VS Isochronous Video Data Endpoint Descriptor        */        0x07,   /* bLength 端点描述符长固定7字节              */        0x05,   /* bDescriptorType 见usb_20.pdf P251 Table 9-5. Descriptor Types ENDPOINT=5           */        UVC_IN_ED,   /* bEndpointAddress    D7: 0 = OUT端点 1 = IN端点 D3..0: 端点*/        0x05,        /* bmAttributes D3..2: 同步类型ISO端点只能01 = Asynchronous  D1..0: 端点类型 01 = 同步端点 */        0x00,        /* wMaxPacketSize 2字节 bit12:11表示一个微帧传几包 bit10:0包大*/#if UVC_PACKET_NUM==1        0x04,#elif UVC_PACKET_NUM==2        0x0C,#elif UVC_PACKET_NUM==3        0x14,#endif        0x01,   /* bInterval 2^(bInterval-1) SOF的间        */
    /********************************************************     *           以下是MIC+SPK部分     *******************************************************/    /**     * IAD描述符  参考InterfaceAssociationDescriptor_ecn P4    */    0x08,         /* bLength 本描述符长度,固定为8 */    0x0B,         /* bDescriptorType 描述符类型 INTERFACE_ASSOCIATION=0x0B 参考InterfaceAssociationDescriptor_ecn P3 */    SPK_AC_ITF,   /* bFirstInterface 本IAD下第一个接口 */    0x03,         /* bInterfaceCount 本IAD下接口数,默认一个控制接口一个SPK流接口一个MIC流接口 */    0x01,         /* bFunctionClass UAC是接口中说明类功能 这里应该是接口类 见https://www.usb.org/defined-class-codes (Audio=1) 见audio10.pdf P99 Table A-1: Audio Interface Class Code AUDIO=1 */    0x02,         /* bFunctionSubClass  UAC是接口中说明类功能 这里应该是接口类子类 见audio10.pdf P99 Table A-2: Audio Interface Subclass Codes AUDIOSTREAMING=0x02 */    0x00,         /* bFunctionProtocol UAC是接口中说明类功能 这里应该是接口协议号 见audio10.pdf P99 Table A-3: Audio Interface Protocol Codes PR_PROTOCOL_UNDEFINED=0x00  */    0x07,         /* iFunction 对应字符串索引                                */
        /********************************************************         *           控制接口部分         *******************************************************/        /* 接口描述符 UAC是接口描述符说明功能          * 见usb_20 P268 Table 9-12. Standard Interface Descriptor         */        0x09,         /* bLength                */        0x04,         /* bDescriptorType   见usb_20 P251 Table 9-5. Descriptor Types  INTERFACE=4   */        SPK_AC_ITF,   /* bInterfaceNumber       */        0x00,         /* bAlternateSetting      */        0x00,         /* bNumEndpoints 本接口下无端点*/        0x01,         /* bInterfaceClass    (Audio)  见audio10.pdf P99 Table A-1: Audio Interface Class Code AUDIO=1  */        0x01,         /* bInterfaceSubClass (Audio Control) 见audio10.pdf P99 Table A-2: Audio Interface Subclass Codes AUDIOCONTROL=0x01 */        0x00,         /* bInterfaceProtocol   见audio10.pdf P99 Table A-3: Audio Interface Protocol Codes PR_PROTOCOL_UNDEFINED=0x00  */        0x07,         /* iInterface 对应字符串索引           */
        /* BasicAudioDevice-10.pdf P57 Table 7-4: Headset Class-Specific AC Interface Header Descriptor */        0x0A,         /* bLength */        0x24,         /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24  */        0x01,         /* bDescriptorSubtype 见audio10.pdf P100 Table A-5: Audio Class-Specific AC Interface Descriptor Subtypes HEADER=0x01 */        0x00,0x01,    /* bcdADC Audio 1.0 */        0x4D,0x00,    /* wTotalLength 本接口下后续所有描述符的长度 包括本描述符 */        0x02,         /* bInCollection 2个流接口 */        SPK_AS_ITF,   /* baInterfaceNr(1) SPK流接口号 */        MIC_AS_ITF,   /* baInterfaceNr(2) MIC流接口号 */
        /* BasicAudioDevice-10.pdf P22 Table 5-3: Mono Input Terminal Descriptor          * BasicAudioDevice-10.pdf P21 5.3.3.1.3 Headphone Input Terminal ID1 Descriptor         * BasicAudioDevice-10.pdf P58 7.3.3.1.3 Headset Input Terminal ID1 Descriptor        */        0x0C,         /* bLength */        0x24,         /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24 */        0x02,         /* bDescriptorSubtype 见audio10.pdf P100 Table A-5: Audio Class-Specific AC Interface Descriptor Subtypes INPUT_TERMINAL=0x02 */        SPK_INPUT_TID,/* bTerminalID TID=1*/        0x01,0x01,    /* wTerminalType TT Headphone Input Terminal */        0x00,         /* bAssocTerminal */        0x01,         /* bNrChannels 1个通道 */        0x04,0x00,    /* wChannelConfig Center Front channel. */        0x00,         /* iChannelNames 固定为0 */        0x00,         /* iTerminal 对应字符串描述符索引 */
        /* BasicAudioDevice-10.pdf P24 Table 5-5: Mono Feature Unit Descriptor          * BasicAudioDevice-10.pdf P59 7.3.3.1.7 Headset Feature Unit ID2 Descriptor         */        0x09,         /* bLength */        0x24,         /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24  */        0x06,         /* bDescriptorSubtype 见audio10.pdf P100 Table A-5: Audio Class-Specific AC Interface Descriptor Subtypes FEATURE_UNIT=0x06 */        SPK_FEATURE_TID,         /* bUnitID   */        SPK_INPUT_TID,           /* bSourceID */        0x01,                 /* bControlSize */        /**            A bit set to 1 indicates that the mentioned            Control is supported for master channel            0:            D0: Mute            D1: Volume            D2: Bass            D3: Mid            D4: Treble            D5: Graphic Equalizer            D6: Automatic Gain            D7: Delay            D8: Bass Boost            D9: Loudness            D10..(n*8-1): Reserved        */        0x01,                 /* bmaControls(0) Mute Control on Master Channel.*/        /*A bit set to 1 indicates that the mentioned          Control is supported for logical channel 1 */        0x02,                 /* bmaControls(1) Volume Control on Center Front channel */        0x00,         /* iFeature 对应字符串描述符索引 */
        /* BasicAudioDevice-10.pdf P25 Table 5-7: Headphone Output Terminal ID3 Descriptor          * BasicAudioDevice-10.pdf P67 7.3.3.1.16 Headset Output Terminal ID3 Descriptor        */        0x09,       /* bLength */        0x24,       /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24  */        0x03,       /* bDescriptorSubtype 见audio10.pdf P100 Table A-5: Audio Class-Specific AC Interface Descriptor Subtypes OUTPUT_TERMINAL=0x03 */        SPK_OUTPUT_TID,       /* bTerminalID */        0x02, 0x03,           /* 0x0301扬声器 0x0302耳机 Headphones Terminal Type (0x0302) */        0x00,                 /* bAssocTerminal */        SPK_FEATURE_TID,      /* bSourceID */        0x00,                 /* iTerminal */                    /* BasicAudioDevice-10.pdf P59 7.3.3.1.6 Headset Microphone Input Terminal ID4 Descriptor         * BasicAudioDevice-10.pdf P40 6.3.3.1.3 Microphone Input Terminal ID4 Descriptor         * BasicAudioDevice-10.pdf P22 Table 5-3: Mono Input Terminal Descriptor        */        0x0C,       /* bLength */        0x24,       /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24 */        0x02,       /* bDescriptorSubtype 见audio10.pdf P100 Table A-5: Audio Class-Specific AC Interface Descriptor Subtypes INPUT_TERMINAL=0x02 */        MIC_INPUT_TID,/* bTerminalID TID=4*/        0x01,0x02,    /* wTerminalType TT Terminal is Microphone. */        0x00,         /* bAssocTerminal */        0x01,         /* bNrChannels 1个通道 */        0x04,0x00,    /* wChannelConfig Center Front channel. @todo 0x0000改为0004*/        0x00,         /* iChannelNames 固定为0 */        0x00,         /* iTerminal 对应字符串描述符索引 */
        /*         * BasicAudioDevice-10.pdf P60 7.3.3.1.10 Headset Feature Unit ID5 Descriptor        */        0x09,      /* bLength */        0x24,      /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24 */        0x06,      /* bDescriptorSubtype 见audio10.pdf P100 Table A-5: Audio Class-Specific AC Interface Descriptor Subtypes FEATURE_UNIT=0x06 */        MIC_FEATURE_TID,      /* bUnitID   */        MIC_INPUT_TID,        /* bSourceID */        0x01,                 /* bControlSize */        /**            A bit set to 1 indicates that the mentioned            Control is supported for master channel            0:            D0: Mute            D1: Volume            D2: Bass            D3: Mid            D4: Treble            D5: Graphic Equalizer            D6: Automatic Gain            D7: Delay            D8: Bass Boost            D9: Loudness            D10..(n*8-1): Reserved        */        0x43,                 /* bmaControls(0) Mute Control on Master Channel.*/        /*A bit set to 1 indicates that the mentioned          Control is supported for logical channel 1 */        0x00,                 /* bmaControls(1) Volume Control on Center Front channel */        0x00,                 /* iFeature 对应字符串描述符索引 */
        /* BasicAudioDevice-10.pdf P66 Table 7-12: Headset Selector Unit ID9 Descriptor for HS2 */        0x07,                 /* bLength */        0x24,                 /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24 */        0x05,                 /* bDescriptorSubtype 见audio10.pdf P100 Table A-5: Audio Class-Specific AC Interface Descriptor Subtypes SELECTOR_UNIT=0x05 */        MIC_SEL_TID,          /* bUnitID */        0x01,                 /* bNrInPins */        MIC_FEATURE_TID,      /* baSourceID(1) */        0x00,                 /* iSelector */
        /*         * BasicAudioDevice-10.pdf P67 7.3.3.1.17 Headset Output Terminal ID6 Descriptor        */        0x09,    /* bLength */        0x24,    /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24 */        0x03,    /* bDescriptorSubtype 见audio10.pdf P100 Table A-5: Audio Class-Specific AC Interface Descriptor Subtypes OUTPUT_TERMINAL=0x03 */        MIC_OUTPUT_TID,       /* bTerminalID */        0x01,0x01,            /* wTerminalType USB Streaming Terminal Type*/        0x02,                 /* bAssocTerminal */        MIC_SEL_TID,          /* bSourceID */        0x00,                 /* iTerminal */
        /********************************************************         *           SPK流部分         *******************************************************/
        /* 接口描述符        * usb_20.pdf P268 Table 9-12. Standard Interface Descriptor         * BasicAudioDevice-10.pdf P30  Table 5-13: Headphone Standard AS Interface Descriptor (Alt. Set. 0)        */        0x09,    /* bLength */        0x04,    /* bDescriptorType INTERFACE */        SPK_AS_ITF,    /* bInterfaceNumber */        0x00,    /* bAlternateSetting */        0x00,    /* bNumEndpoints */        0x01,    /* bInterfaceClass 见audio10.pdf P99 Table A-1: Audio Interface Class Code AUDIO=1  */        0x02,    /* bInterfaceSubClass 见audio10.pdf P99 Table A-2: Audio Interface Subclass Codes AUDIOSTREAMING=0x02 */        0x00,    /* bInterfaceProtocol 见audio10.pdf P99 Table A-3: Audio Interface Protocol Codes PR_PROTOCOL_UNDEFINED = 0x00 */        0x00,    /* iInterface         */
        /* 接口描述符        * usb_20.pdf P268 Table 9-12. Standard Interface Descriptor         BasicAudioDevice-10.pdf P31  Table 5-14: Headphone Standard AS Interface Descriptor (Alt. Set .1)        */        0x09,   /* bLength */        0x04,   /* bDescriptorType INTERFACE */        SPK_AS_ITF,   /* bInterfaceNumber */        0x01,   /* bAlternateSetting */        0x01,   /* bNumEndpoints 一个端点 */        0x01,   /* bInterfaceClass 见audio10.pdf P99 Table A-1: Audio Interface Class Code AUDIO=1 */        0x02,   /* bInterfaceSubClass 见audio10.pdf P99 Table A-2: Audio Interface Subclass Codes AUDIOSTREAMING=0x02 */        0x00,   /* bInterfaceProtocol 见audio10.pdf P99 Table A-3: Audio Interface Protocol Codes PR_PROTOCOL_UNDEFINED = 0x00 */        0x00,   /* iInterface         */
        /*         * BasicAudioDevice-10.pdf P31  Table 5-15: Headphone Class-specific AS General Interface Descriptor        */        0x07,   /* bLength */        0x24,   /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24  */        0x01,   /* bDescriptorSubtype 见audio10.pdf P100 Table A-6: Audio Class-Specific AS Interface Descriptor Subtypes AS_GENERAL=0x01 */        SPK_INPUT_TID,   /* bTerminalLink */        0x01,            /* bDelay Total interface delay, expressed in frames. Not used and shall be set to 0x00 */        0x01,0x00,       /* wFormatTag PCM Format */
        /*         * BasicAudioDevice-10.pdf P32 Table 5-16: Mono Headphone Type I Format Type Descriptor         */        0x0B,  /* bLength */        0x24,  /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24  */        0x02,  /* bDescriptorSubtype 见audio10.pdf P100 Table A-6: Audio Class-Specific AS Interface Descriptor Subtypes FORMAT_TYPE=0x02 */        0x01,  /* bFormatType 见frmts10.pdf P20 Table A-4: Format Type Codes FORMAT_TYPE_I=0x01 */        0x01,  /* bNrChannels One channel. */        0x02,  /* bSubFrameSize Two bytes per audio subframe. */        0x10,  /* bBitResolution 16 bits per sample */        0x01,  /* bSamFreqType One frequency supported. */        0x80,0x3E,0x00, /* tSamFreq 0x003E80=16000 */
        /* 端点描述符         * usb_20.pdf P269 Table 9-13. Standard Endpoint Descriptor        * BasicAudioDevice-10.pdf P33 Table 5-18: Mono Headphone Standard AS Audio Data Endpoint Descriptor        */        0x09,  /* bLength */        0x05,  /* bDescriptorType 见usb_20.pdf P251 Table 9-5. Descriptor Types ENDPOINT=5 */        SPK_OUT_EP, /* bEndpointAddress */        0x0D,  /* bmAttributes b[1:0] 01 = Isochronous, b[3:2] 11 = Synchronous */        0x20,  0x00,  /* wMaxPacketSize */        0x01,  /* bInterval 1ms一包 */        0x00,  /* bRefresh  */        0x00,  /* bSynchAddress */
        /*         * BasicAudioDevice-10.pdf P33 Table 5-20: Headphone Class-specific Isoc. Audio Data Endpoint Descriptor        */        0x07,  /* bLength                                */        0x25,  /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_ENDPOINT=0x25 */        0x01,  /* bDescriptorSubtype 见audio10.pdf P101 Table A-8: Audio Class-Specific Endpoint Descriptor Subtypes EP_GENERAL=0x01. */        0x00,  /* bmAttributes No sampling frequency control, no pitch control, no packet padding.*/        0x00,  /* bLockDelayUnits */        0x00,  0x00, /* wLockDelay */
        /********************************************************         *           MIC流部分         *******************************************************/        /* 接口描述符        * usb_20.pdf P268 Table 9-12. Standard Interface Descriptor         * BasicAudioDevice-10.pdf P30  Table 5-13: Headphone Standard AS Interface Descriptor (Alt. Set. 0)        */        0x09,    /* bLength */        0x04,    /* bDescriptorType INTERFACE */        MIC_AS_ITF,    /* bInterfaceNumber */        0x00,    /* bAlternateSetting */        0x00,    /* bNumEndpoints */        0x01,    /* bInterfaceClass 见audio10.pdf P99 Table A-1: Audio Interface Class Code AUDIO=1  */        0x02,    /* bInterfaceSubClass 见audio10.pdf P99 Table A-2: Audio Interface Subclass Codes AUDIOSTREAMING=0x02 */        0x00,    /* bInterfaceProtocol 见audio10.pdf P99 Table A-3: Audio Interface Protocol Codes PR_PROTOCOL_UNDEFINED = 0x00 */        0x00,    /* iInterface         */
        /* 接口描述符        * usb_20.pdf P268 Table 9-12. Standard Interface Descriptor         BasicAudioDevice-10.pdf P31  Table 5-14: Headphone Standard AS Interface Descriptor (Alt. Set .1)        */        0x09,   /* bLength */        0x04,   /* bDescriptorType INTERFACE */        MIC_AS_ITF,   /* bInterfaceNumber */        0x01,   /* bAlternateSetting */        0x01,   /* bNumEndpoints 一个端点 */        0x01,   /* bInterfaceClass 见audio10.pdf P99 Table A-1: Audio Interface Class Code AUDIO=1 */        0x02,   /* bInterfaceSubClass 见audio10.pdf P99 Table A-2: Audio Interface Subclass Codes AUDIOSTREAMING=0x02 */        0x00,   /* bInterfaceProtocol 见audio10.pdf P99 Table A-3: Audio Interface Protocol Codes PR_PROTOCOL_UNDEFINED = 0x00 */        0x00,   /* iInterface         */
        /*         * BasicAudioDevice-10.pdf P31  Table 5-15: Headphone Class-specific AS General Interface Descriptor        */        0x07,   /* bLength */        0x24,   /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24  */        0x01,   /* bDescriptorSubtype 见audio10.pdf P100 Table A-6: Audio Class-Specific AS Interface Descriptor Subtypes AS_GENERAL=0x01 */        MIC_OUTPUT_TID,   /* bTerminalLink */        0x01,            /* bDelay Total interface delay, expressed in frames. Not used and shall be set to 0x00 */        0x01,0x00,       /* wFormatTag PCM Format */
        /*         * BasicAudioDevice-10.pdf P32 Table 5-16: Mono Headphone Type I Format Type Descriptor         */        0x0B,  /* bLength */        0x24,  /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_INTERFACE=0x24  */        0x02,  /* bDescriptorSubtype 见audio10.pdf P100 Table A-6: Audio Class-Specific AS Interface Descriptor Subtypes FORMAT_TYPE=0x02 */        0x01,  /* bFormatType 见frmts10.pdf P20 Table A-4: Format Type Codes FORMAT_TYPE_I=0x01 */        0x01,  /* bNrChannels One channel. */        0x02,  /* bSubFrameSize Two bytes per audio subframe. */        0x10,  /* bBitResolution 16 bits per sample */        0x01,  /* bSamFreqType One frequency supported. */        0x80,0x3E,0x00, /* tSamFreq 0x003E80=16000 */
        /* 端点描述符         * usb_20.pdf P269 Table 9-13. Standard Endpoint Descriptor        * BasicAudioDevice-10.pdf P33 Table 5-18: Mono Headphone Standard AS Audio Data Endpoint Descriptor        */        0x09,  /* bLength */        0x05,  /* bDescriptorType 见usb_20.pdf P251 Table 9-5. Descriptor Types ENDPOINT=5 */        MIC_IN_EP, /* bEndpointAddress */        0x0D,  /* bmAttributes b[1:0] 01 = Isochronous, b[3:2] 11 = Synchronous */        0x20,  0x00,  /* wMaxPacketSize */        0x01,  /* bInterval 1ms一包 */        0x00,  /* bRefresh  */        0x00,  /* bSynchAddress */
        /*         * BasicAudioDevice-10.pdf P33 Table 5-20: Headphone Class-specific Isoc. Audio Data Endpoint Descriptor        */        0x07,  /* bLength                                */        0x25,  /* bDescriptorType 见audio10.pdf P99 Table A-4: Audio Class-specific Descriptor Types CS_ENDPOINT=0x25 */        0x01,  /* bDescriptorSubtype 见audio10.pdf P101 Table A-8: Audio Class-Specific Endpoint Descriptor Subtypes EP_GENERAL=0x01. */        0x00,  /* bmAttributes No sampling frequency control, no pitch control, no packet padding.*/        0x00,  /* bLockDelayUnits */        0x00,  0x00, /* wLockDelay */};

其中

#define SPK_AC_ITF 2#define SPK_AS_ITF 3#define MIC_AS_ITF 4
#define SPK_INPUT_TID 1#define SPK_FEATURE_TID 2#define SPK_OUTPUT_TID 3
#define MIC_INPUT_TID 4#define MIC_FEATURE_TID 5#define MIC_SEL_TID 9 #define MIC_OUTPUT_TID 6
#define SPK_OUT_EP 0x02#define MIC_IN_EP 0x82
#define UVC_ITF_VC 0#define UVC_ITF_VS 1#define UVC_TID_IN 1#define UVC_TID_OUT 3#define UVC_TID_PU 2#define UVC_IN_ED 0x81#define UVC_PACKET_NUM 1
#define UVC_MAKE_DWORD(x) (uint8_t)((x)&0xFF),(uint8_t)(((x)>>8)&0xFF),(uint8_t)(((x)>>16)&0xFF),(uint8_t)(((x)>>24)&0xFF)#define UVC_CLOCKFRQ 30000000ul /* 时钟频率 */#define UVC_MAKE_WORD(x) (uint8_t)((x)&0xFF),(uint8_t)(((x)>>8)&0xFF)
#define UVC_NV12_WIDTH_MAX1 1280 #define UVC_NV12_HEIGHT_MAX1 720 #define UVC_NV12_MIN_FPS1 5#define UVC_NV12_DEF_FPS1 25#define UVC_NV12_MAX_FPS1 30#define UVC_NV12_MIN_BIT_RATE1 (((UVC_NV12_WIDTH_MAX1*UVC_NV12_HEIGHT_MAX1)*3/2)*8*UVC_NV12_MIN_FPS1)#define UVC_NV12_MAX_BIT_RATE1 (((UVC_NV12_WIDTH_MAX1*UVC_NV12_HEIGHT_MAX1)*3/2)*8*UVC_NV12_MAX_FPS1)#define UVC_NV12_MAX_FRAME_SIZE1 ((UVC_NV12_WIDTH_MAX1*UVC_NV12_HEIGHT_MAX1)*3/2)#define UVC_NV12_FRAME_DEFINTERVEL1 (10000000/UVC_NV12_DEF_FPS1)#define UVC_NV12_FRAME_MININTERVEL1 (10000000/UVC_NV12_MAX_FPS1)#define UVC_NV12_FRAME_MAXINTERVEL1 (10000000/UVC_NV12_MIN_FPS1)
#define UVC_NV12_WIDTH_MAX2 320 #define UVC_NV12_HEIGHT_MAX2 240 #define UVC_NV12_MIN_FPS2 5#define UVC_NV12_DEF_FPS2 25#define UVC_NV12_MAX_FPS2 30#define UVC_NV12_MIN_BIT_RATE2 (((UVC_NV12_WIDTH_MAX2*UVC_NV12_HEIGHT_MAX2)*3/2)*8*UVC_NV12_MIN_FPS2)#define UVC_NV12_MAX_BIT_RATE2 (((UVC_NV12_WIDTH_MAX2*UVC_NV12_HEIGHT_MAX2)*3/2)*8*UVC_NV12_MAX_FPS2)#define UVC_NV12_MAX_FRAME_SIZE2 ((UVC_NV12_WIDTH_MAX2*UVC_NV12_HEIGHT_MAX2)*3/2)#define UVC_NV12_FRAME_DEFINTERVEL2 (10000000/UVC_NV12_DEF_FPS2)#define UVC_NV12_FRAME_MININTERVEL2 (10000000/UVC_NV12_MAX_FPS2)#define UVC_NV12_FRAME_MAXINTERVEL2 (10000000/UVC_NV12_MIN_FPS2)

#define UVC_H264_WIDTH_MAX1 1280 #define UVC_H264_HEIGHT_MAX1 720 #define UVC_H264_MIN_FPS1 5#define UVC_H264_DEF_FPS1 25#define UVC_H264_MAX_FPS1 30#define UVC_H264_MIN_BIT_RATE1 (((UVC_H264_WIDTH_MAX1*UVC_H264_HEIGHT_MAX1)*3/2)*8*UVC_H264_MIN_FPS1)#define UVC_H264_MAX_BIT_RATE1 (((UVC_H264_WIDTH_MAX1*UVC_H264_HEIGHT_MAX1)*3/2)*8*UVC_H264_MAX_FPS1)#define UVC_H264_MAX_FRAME_SIZE1 ((UVC_H264_WIDTH_MAX1*UVC_H264_HEIGHT_MAX1)*3/2)#define UVC_H264_FRAME_DEFINTERVEL1 (10000000/UVC_H264_DEF_FPS1)#define UVC_H264_FRAME_MININTERVEL1 (10000000/UVC_H264_MAX_FPS1)#define UVC_H264_FRAME_MAXINTERVEL1 (10000000/UVC_H264_MIN_FPS1)
#define UVC_H264_WIDTH_MAX2 320 #define UVC_H264_HEIGHT_MAX2 240 #define UVC_H264_MIN_FPS2 5#define UVC_H264_DEF_FPS2 25#define UVC_H264_MAX_FPS2 30#define UVC_H264_MIN_BIT_RATE2 (((UVC_H264_WIDTH_MAX2*UVC_H264_HEIGHT_MAX2)*3/2)*8*UVC_H264_MIN_FPS2)#define UVC_H264_MAX_BIT_RATE2 (((UVC_H264_WIDTH_MAX2*UVC_H264_HEIGHT_MAX2)*3/2)*8*UVC_H264_MAX_FPS2)#define UVC_H264_MAX_FRAME_SIZE2 ((UVC_H264_WIDTH_MAX2*UVC_H264_HEIGHT_MAX2)*3/2)#define UVC_H264_FRAME_DEFINTERVEL2 (10000000/UVC_H264_DEF_FPS2)#define UVC_H264_FRAME_MININTERVEL2 (10000000/UVC_H264_MAX_FPS2)#define UVC_H264_FRAME_MAXINTERVEL2 (10000000/UVC_H264_MIN_FPS2)
#define UVC_MJPEG_WIDTH_MAX1 1280 #define UVC_MJPEG_HEIGHT_MAX1 720 #define UVC_MJPEG_MIN_FPS1 5#define UVC_MJPEG_DEF_FPS1 25#define UVC_MJPEG_MAX_FPS1 30#define UVC_MJPEG_MIN_BIT_RATE1 (((UVC_MJPEG_WIDTH_MAX1*UVC_MJPEG_HEIGHT_MAX1)*3/2)*8*UVC_MJPEG_MIN_FPS1)#define UVC_MJPEG_MAX_BIT_RATE1 (((UVC_MJPEG_WIDTH_MAX1*UVC_MJPEG_HEIGHT_MAX1)*3/2)*8*UVC_MJPEG_MAX_FPS1)#define UVC_MJPEG_MAX_FRAME_SIZE1 ((UVC_MJPEG_WIDTH_MAX1*UVC_MJPEG_HEIGHT_MAX1)*3/2)#define UVC_MJPEG_FRAME_DEFINTERVEL1 (10000000/UVC_MJPEG_DEF_FPS1)#define UVC_MJPEG_FRAME_MININTERVEL1 (10000000/UVC_MJPEG_MAX_FPS1)#define UVC_MJPEG_FRAME_MAXINTERVEL1 (10000000/UVC_MJPEG_MIN_FPS1)
#define UVC_MJPEG_WIDTH_MAX2 320 #define UVC_MJPEG_HEIGHT_MAX2 240 #define UVC_MJPEG_MIN_FPS2 5#define UVC_MJPEG_DEF_FPS2 25#define UVC_MJPEG_MAX_FPS2 30#define UVC_MJPEG_MIN_BIT_RATE2 (((UVC_MJPEG_WIDTH_MAX2*UVC_MJPEG_HEIGHT_MAX2)*3/2)*8*UVC_MJPEG_MIN_FPS2)#define UVC_MJPEG_MAX_BIT_RATE2 (((UVC_MJPEG_WIDTH_MAX2*UVC_MJPEG_HEIGHT_MAX2)*3/2)*8*UVC_MJPEG_MAX_FPS2)#define UVC_MJPEG_MAX_FRAME_SIZE2 ((UVC_MJPEG_WIDTH_MAX2*UVC_MJPEG_HEIGHT_MAX2)*3/2)#define UVC_MJPEG_FRAME_DEFINTERVEL2 (10000000/UVC_MJPEG_DEF_FPS2)#define UVC_MJPEG_FRAME_MININTERVEL2 (10000000/UVC_MJPEG_MAX_FPS2)#define UVC_MJPEG_FRAME_MAXINTERVEL2 (10000000/UVC_MJPEG_MIN_FPS2)
#define UVC_Y800_WIDTH_MAX1 1280 #define UVC_Y800_HEIGHT_MAX1 720 #define UVC_Y800_MIN_FPS1 5#define UVC_Y800_DEF_FPS1 25#define UVC_Y800_MAX_FPS1 30#define UVC_Y800_MIN_BIT_RATE1 (((UVC_Y800_WIDTH_MAX1*UVC_Y800_HEIGHT_MAX1)*3/2)*8*UVC_Y800_MIN_FPS1)#define UVC_Y800_MAX_BIT_RATE1 (((UVC_Y800_WIDTH_MAX1*UVC_Y800_HEIGHT_MAX1)*3/2)*8*UVC_Y800_MAX_FPS1)#define UVC_Y800_MAX_FRAME_SIZE1 ((UVC_Y800_WIDTH_MAX1*UVC_Y800_HEIGHT_MAX1)*3/2)#define UVC_Y800_FRAME_DEFINTERVEL1 (10000000/UVC_Y800_DEF_FPS1)#define UVC_Y800_FRAME_MININTERVEL1 (10000000/UVC_Y800_MAX_FPS1)#define UVC_Y800_FRAME_MAXINTERVEL1 (10000000/UVC_Y800_MIN_FPS1)
#define UVC_Y800_WIDTH_MAX2 320 #define UVC_Y800_HEIGHT_MAX2 240 #define UVC_Y800_MIN_FPS2 5#define UVC_Y800_DEF_FPS2 25#define UVC_Y800_MAX_FPS2 30#define UVC_Y800_MIN_BIT_RATE2 (((UVC_Y800_WIDTH_MAX2*UVC_Y800_HEIGHT_MAX2)*3/2)*8*UVC_Y800_MIN_FPS2)#define UVC_Y800_MAX_BIT_RATE2 (((UVC_Y800_WIDTH_MAX2*UVC_Y800_HEIGHT_MAX2)*3/2)*8*UVC_Y800_MAX_FPS2)#define UVC_Y800_MAX_FRAME_SIZE2 ((UVC_Y800_WIDTH_MAX2*UVC_Y800_HEIGHT_MAX2)*3/2)#define UVC_Y800_FRAME_DEFINTERVEL2 (10000000/UVC_Y800_DEF_FPS2)#define UVC_Y800_FRAME_MININTERVEL2 (10000000/UVC_Y800_MAX_FPS2)#define UVC_Y800_FRAME_MAXINTERVEL2 (10000000/UVC_Y800_MIN_FPS2)

如下是UsbTreeView抓到的描述符



---------------------- Device Descriptor ----------------------bLength : 0x12 (18 bytes)bDescriptorType : 0x01 (Device Descriptor)bcdUSB : 0x200 (USB Version 2.0)bDeviceClass : 0xEF (Miscellaneous)bDeviceSubClass : 0x02bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor)bMaxPacketSize0 : 0x40 (64 bytes)idVendor : 0x4C4A (Unknown Vendor)idProduct : 0x4C55bcdDevice : 0x0100iManufacturer : 0x01 (String Descriptor 1) Language 0x0409 : "xxxxx.Technology"iProduct : 0x02 (String Descriptor 2) Language 0x0409 : "USB.Video"iSerialNumber : 0x03 (String Descriptor 3) Language 0x0409 : "0.1"bNumConfigurations : 0x01 (1 Configuration)Data (HexDump) : 12 01 00 02 EF 02 01 40 4A 4C 55 4C 00 01 01 02 .......@JLUL.... 03 01 ..
------------------ Configuration Descriptor -------------------bLength : 0x09 (9 bytes)bDescriptorType : 0x02 (Configuration Descriptor)wTotalLength : 0x02D8 (728 bytes)bNumInterfaces : 0x05 (5 Interfaces)bConfigurationValue : 0x01 (Configuration 1)iConfiguration : 0x00 (No String Descriptor)bmAttributes : 0x80 D7: Reserved, set 1 : 0x01 D6: Self Powered : 0x00 (no) D5: Remote Wakeup : 0x00 (no) D4..0: Reserved, set 0 : 0x00MaxPower : 0xC8 (400 mA)Data (HexDump) : 09 02 D8 02 05 01 00 80 C8 08 0B 00 02 0E 03 00 ................ 00 09 04 00 00 00 0E 01 00 00 0D 24 01 00 01 35 ...........$...5 00 80 C3 C9 01 01 01 12 24 02 01 01 02 00 00 00 ........$....... 00 00 00 00 00 03 00 00 00 0D 24 05 02 01 00 00 ..........$..... 03 00 00 00 00 00 09 24 03 03 01 01 01 02 00 09 .......$........ 04 01 00 00 0E 02 00 00 11 24 01 04 A4 01 81 00 .........$...... 03 00 00 00 01 00 00 00 00 1B 24 04 01 02 4E 56 ..........$...NV 31 32 00 00 10 00 80 00 00 AA 00 38 9B 71 0C 01 12.........8.q.. 00 00 00 00 26 24 05 01 02 00 05 D0 02 00 C0 4B ....&$.........K 03 00 80 C6 13 00 18 15 00 80 1A 06 00 03 15 16 ................ 05 00 80 1A 06 00 80 84 1E 00 26 24 05 02 02 40 ..........&$...@ 01 F0 00 00 50 46 00 00 E0 A5 01 00 C2 01 00 80 ....PF.......... 1A 06 00 03 15 16 05 00 80 1A 06 00 80 84 1E 00 ................ 06 24 0D 01 01 04 1C 24 10 02 02 48 32 36 34 00 .$.....$...H264. 00 10 00 80 00 00 AA 00 38 9B 71 10 01 00 00 00 ........8.q..... 00 01 26 24 11 01 00 00 05 D0 02 00 C0 4B 03 00 ..&$.........K.. 80 C6 13 80 1A 06 00 03 00 00 00 00 15 16 05 00 ................ 80 1A 06 00 80 84 1E 00 26 24 11 02 00 40 01 F0 ........&$...@.. 00 00 50 46 00 00 E0 A5 01 80 1A 06 00 03 00 00 ..PF............ 00 00 15 16 05 00 80 1A 06 00 80 84 1E 00 0B 24 ...............$ 06 03 02 01 01 00 00 00 00 26 24 07 01 02 00 05 .........&$..... D0 02 00 C0 4B 03 00 80 C6 13 00 18 15 00 80 1A ....K........... 06 00 03 15 16 05 00 80 1A 06 00 80 84 1E 00 26 ...............& 24 07 02 02 40 01 F0 00 00 50 46 00 00 E0 A5 01 $...@....PF..... 00 C2 01 00 80 1A 06 00 03 15 16 05 00 80 1A 06 ................ 00 80 84 1E 00 1B 24 04 04 02 59 38 30 30 00 00 ......$...Y800.. 10 00 80 00 00 AA 00 38 9B 71 08 01 00 00 00 00 .......8.q...... 26 24 05 01 02 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 00 18 15 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 26 24 05 02 02 40 01 F0 00 00 ......&$...@.... 50 46 00 00 E0 A5 01 00 C2 01 00 80 1A 06 00 03 PF.............. 15 16 05 00 80 1A 06 00 80 84 1E 00 06 24 0D 01 .............$.. 01 04 09 04 01 01 01 0E 02 00 00 07 05 81 05 00 ................ 04 01 08 0B 02 03 01 02 00 07 09 04 02 00 00 01 ................                           01 00 07 0A 24 01 00 01 4D 00 02 03 04 0C 24 02   ....$...F.....$. 01 01 01 00 01 04 00 00 00 09 24 06 02 01 01 01 ..........$..... 02 00 09 24 03 03 02 03 00 02 00 0C 24 02 04 01 ...$........$... 02 00 01 04 00 00 00 09 24 06 05 04 01 43 00 00 ........$....C.. 07 24 05 09 01 05 00 09 24 03 06 01 01 02 09 00 .$......$....... 09 04 03 00 00 01 02 00 00 09 04 03 01 01 01 02 ................ 00 00 07 24 01 01 01 01 00 0B 24 02 01 01 02 10 ...$......$..... 01 80 3E 00 09 05 02 0D 20 00 01 00 00 07 25 01 ..>..... .....%. 00 00 00 00 09 04 04 00 00 01 02 00 00 09 04 04 ................ 01 01 01 02 00 00 07 24 01 06 01 01 00 0B 24 02 .......$......$. 01 01 02 10 01 80 3E 00 09 05 82 0D 20 00 01 00 ......>..... ... 00 07 25 01 00 00 00 00 ..%.....
------------------- IAD Descriptor --------------------bLength : 0x08 (8 bytes)bDescriptorType : 0x0B (Interface Association Descriptor)bFirstInterface : 0x00 (Interface 0)bInterfaceCount : 0x02 (2 Interfaces)bFunctionClass : 0x0E (Video)bFunctionSubClass : 0x03 (Video Interface Collection)bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED)iFunction : 0x00 (No String Descriptor)Data (HexDump) : 08 0B 00 02 0E 03 00 00 ........
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x00 (Interface 0)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x0E (Video)bInterfaceSubClass : 0x01 (Video Control)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 00 00 00 0E 01 00 00 .........
------- Video Control Interface Header Descriptor -----bLength : 0x0D (13 bytes)bDescriptorType : 0x24 (Video Control Interface)bDescriptorSubtype : 0x01 (Video Control Header)bcdUVC : 0x0100 (UVC Version 1.00)wTotalLength : 0x0035 (53 bytes)dwClockFreq : 0x01C9C380 (30 MHz)bInCollection : 0x01 (1 VideoStreaming interface)baInterfaceNr[1] : 0x01 (Interface 1)Data (HexDump) : 0D 24 01 00 01 35 00 80 C3 C9 01 01 01 .$...5.......
-------- Video Control Input Terminal Descriptor ------bLength : 0x12 (18 bytes)bDescriptorType : 0x24 (Video Control Interface)bDescriptorSubtype : 0x02 (Input Terminal)bTerminalID : 0x01 (1)wTerminalType : 0x0201 (ITT_CAMERA)bAssocTerminal : 0x00 (Not associated with an Output Terminal)iTerminal : 0x00 (No String Descriptor)Camera Input Terminal Data:wObjectiveFocalLengthMin : 0x0000wObjectiveFocalLengthMax : 0x0000wOcularFocalLength : 0x0000bControlSize : 0x03 (3 bytes)bmControls : 0x00, 0x00, 0x00 D0 : 0 no - Scanning Mode D1 : 0 no - Auto-Exposure Mode D2 : 0 no - Auto-Exposure Priority D3 : 0 no - Exposure Time (Absolute) D4 : 0 no - Exposure Time (Relative) D5 : 0 no - Focus (Absolute) D6 : 0 no - Focus (Relative) D7 : 0 no - Iris (Absolute) D8 : 0 no - Iris (Relative) D9 : 0 no - Zoom (Absolute) D10 : 0 no - Zoom (Relative) D11 : 0 no - Pan (Absolute) D12 : 0 no - Pan (Relative) D13 : 0 no - Roll (Absolute) D14 : 0 no - Roll (Relative) D15 : 0 no - Tilt (Absolute) D16 : 0 no - Tilt (Relative) D17 : 0 no - Focus Auto D18 : 0 no - Reserved D19 : 0 no - Reserved D20 : 0 no - Reserved D21 : 0 no - Reserved D22 : 0 no - Reserved D23 : 0 no - ReservedData (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 00 .$.............. 00 00 ..
-------- Video Control Processing Unit Descriptor -----bLength : 0x0D (13 bytes)bDescriptorType : 0x24 (Video Control Interface)bDescriptorSubtype : 0x05 (Processing Unit)bUnitID : 0x02 (2)bSourceID : 0x01 (1)wMaxMultiplier : 0x0000bControlSize : 0x03 (3 bytes)bmControls : 0x00, 0x00, 0x00 D0 : 0 no - Brightness D1 : 0 no - Contrast D2 : 0 no - Hue D3 : 0 no - Saturation D4 : 0 no - Sharpness D5 : 0 no - Gamma D6 : 0 no - White Balance Temperature D7 : 0 no - White Balance Component D8 : 0 no - Backlight Compensation D9 : 0 no - Gain D10 : 0 no - Power Line Frequency D11 : 0 no - Hue, Auto D12 : 0 no - White Balance Temperature, Auto D13 : 0 no - White Balance Component, Auto D14 : 0 no - Digital Multiplier D15 : 0 no - Digital Multiplier Limit D16 : 0 no - Analog Video Standard D17 : 0 no - Analog Video Lock Status D18 : 0 no - Contrast, Auto D19 : 0 no - Reserved D20 : 0 no - Reserved D21 : 0 no - Reserved D22 : 0 no - Reserved D23 : 0 no - ReservediProcessing : 0x00 (No String Descriptor)*!*ERROR: bLength of 0x0D incorrect, should be 0x0CData (HexDump) : 0D 24 05 02 01 00 00 03 00 00 00 00 00 .$...........
------- Video Control Output Terminal Descriptor ------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Video Control Interface)bDescriptorSubtype : 0x03 (Output Terminal)bTerminalID : 0x03 (3)wTerminalType : 0x0101 (TT_STREAMING)bAssocTerminal : 0x01 (Associated with Input Terminal ID=1)bSourceID : 0x02 (2)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 09 24 03 03 01 01 01 02 00 .$.......
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x01 (Interface 1)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x0E (Video)bInterfaceSubClass : 0x02 (Video Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 01 00 00 0E 02 00 00 .........
---- VC-Specific VS Video Input Header Descriptor -----bLength : 0x11 (17 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x01 (Input Header)bNumFormats : 0x04wTotalLength : 0x01A4 (420 bytes)bEndpointAddress : 0x81 (Direction=IN EndpointID=1)bmInfo : 0x00 (Dynamic Format Change not supported)bTerminalLink : 0x03 (Output Terminal ID 3)bStillCaptureMethod : 0x00 (No Still Capture)nbTriggerSupport : 0x00 (Hardware Triggering not supported)bTriggerUsage : 0x00 (Host will initiate still image capture)bControlSize : 0x01 (1 bytes each)Video Payload Format 1 : 0x00 D0 : 0 no - Key Frame Rate D1 : 0 no - P Frame Rate D2 : 0 no - Compression Quality D3 : 0 no - Compression Window Size D4 : 0 no - Generate Key Frame D5 : 0 no - Update Frame Segment D6 : 0 no - Reserved D7 : 0 no - ReservedVideo Payload Format 2 : 0x00 D0 : 0 no - Key Frame Rate D1 : 0 no - P Frame Rate D2 : 0 no - Compression Quality D3 : 0 no - Compression Window Size D4 : 0 no - Generate Key Frame D5 : 0 no - Update Frame Segment D6 : 0 no - Reserved D7 : 0 no - ReservedVideo Payload Format 3 : 0x00 D0 : 0 no - Key Frame Rate D1 : 0 no - P Frame Rate D2 : 0 no - Compression Quality D3 : 0 no - Compression Window Size D4 : 0 no - Generate Key Frame D5 : 0 no - Update Frame Segment D6 : 0 no - Reserved D7 : 0 no - ReservedVideo Payload Format 4 : 0x00 D0 : 0 no - Key Frame Rate D1 : 0 no - P Frame Rate D2 : 0 no - Compression Quality D3 : 0 no - Compression Window Size D4 : 0 no - Generate Key Frame D5 : 0 no - Update Frame Segment D6 : 0 no - Reserved D7 : 0 no - ReservedData (HexDump) : 11 24 01 04 A4 01 81 00 03 00 00 00 01 00 00 00 .$.............. 00 .
------- VS Uncompressed Format Type Descriptor --------bLength : 0x1B (27 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x04 (Uncompressed Format Type)bFormatIndex : 0x01 (1)bNumFrameDescriptors : 0x02 (2 Frame Descriptors)guidFormat : {3231564E-0000-0010-8000-00AA00389B71} (NV12)bBitsPerPixel : 0x0C (12 bits per pixel)bDefaultFrameIndex : 0x01 (Index 1)bAspectRatioX : 0x00bAspectRatioY : 0x00bmInterlaceFlags : 0x00 D0 IL stream or variable: 0 (no) D1 Fields per frame : 0 (2 fields) D2 Field 1 first : 0 (no) D3 Reserved : 0 D4..5 Field pattern : 0 (Field 1 only) D6..7 Display Mode : 0 (Bob only)bCopyProtect : 0x00 (No restrictions)Data (HexDump) : 1B 24 04 01 02 4E 56 31 32 00 00 10 00 80 00 00 .$...NV12....... AA 00 38 9B 71 0C 01 00 00 00 00 ..8.q......
-------- VS Uncompressed Frame Type Descriptor -----------> This is the Default (optimum) Frame indexbLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x05 (Uncompressed Frame Type)bFrameIndex : 0x01bmCapabilities : 0x02wWidth : 0x0500 (1280)wHeight : 0x02D0 (720)dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s)dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 05 01 02 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 00 18 15 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
-------- VS Uncompressed Frame Type Descriptor --------bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x05 (Uncompressed Frame Type)bFrameIndex : 0x02bmCapabilities : 0x02wWidth : 0x0140 (320)wHeight : 0x00F0 (240)dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s)dwMaxBitRate : 0x01A5E000 (27648000 bps -> 3.456 MB/s)dwMaxVideoFrameBufferSize: 0x0001C200 (115200 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 05 02 02 40 01 F0 00 00 50 46 00 00 E0 A5 &$...@....PF.... 01 00 C2 01 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
------- VS Color Matching Descriptor Descriptor -------bLength : 0x06 (6 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x0D (Color Matching)bColorPrimaries : 0x01 (BT.709, sRGB)bTransferCharacteristics : 0x01 (BT.709)bMatrixCoefficients : 0x04 (SMPTE 170M)Data (HexDump) : 06 24 0D 01 01 04 .$....
---- VS Frame Based Payload Format Type Descriptor ----*!*ERROR: This format is NOT ALLOWED for UVC 1.0 devicesbLength : 0x1C (28 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x10 (Frame Based Format Type)bFormatIndex : 0x02 (2)bNumFrameDescriptors : 0x02 (2)guidFormat : {34363248-0000-0010-8000-00AA00389B71} (H264)bBitsPerPixel : 0x10 (16 bits)bDefaultFrameIndex : 0x01 (1)bAspectRatioX : 0x00bAspectRatioY : 0x00bmInterlaceFlags : 0x00 D0 IL stream or variable: 0 (no) D1 Fields per frame : 0 (2 fields) D2 Field 1 first : 0 (no) D3 Reserved : 0 D4..5 Field pattern : 0 (Field 1 only) D6..7 Display Mode : 0 (Bob only)bCopyProtect : 0x00 (No restrictions)bVariableSize : 0x01 (Variable Size)*!*ERROR: no Color Matching Descriptor for this formatData (HexDump) : 1C 24 10 02 02 48 32 36 34 00 00 10 00 80 00 00 .$...H264....... AA 00 38 9B 71 10 01 00 00 00 00 01 ..8.q.......
----- VS Frame Based Payload Frame Type Descriptor ----*!*ERROR bDescriptorSubtype did not exist in UVC 1.0bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)bFrameIndex : 0x01bmCapabilities : 0x00wWidth : 0x0500 (1280)wHeight : 0x02D0 (720)dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s)dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)dwBytesPerLine : 0x00 (0 bytes)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 11 01 00 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 80 1A 06 00 03 00 00 00 00 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
----- VS Frame Based Payload Frame Type Descriptor ----*!*ERROR bDescriptorSubtype did not exist in UVC 1.0bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)bFrameIndex : 0x02bmCapabilities : 0x00wWidth : 0x0140 (320)wHeight : 0x00F0 (240)dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s)dwMaxBitRate : 0x01A5E000 (27648000 bps -> 3.456 MB/s)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)dwBytesPerLine : 0x00 (0 bytes)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 11 02 00 40 01 F0 00 00 50 46 00 00 E0 A5 &$...@....PF.... 01 80 1A 06 00 03 00 00 00 00 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
----- Video Streaming MJPEG Format Type Descriptor ----bLength : 0x0B (11 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x06 (Format MJPEG)bFormatIndex : 0x03 (3)bNumFrameDescriptors : 0x02 (2)bmFlags : 0x01 (Sample size is fixed)bDefaultFrameIndex : 0x01 (1)bAspectRatioX : 0x00bAspectRatioY : 0x00bmInterlaceFlags : 0x00 D0 IL stream or variable: 0 (no) D1 Fields per frame : 0 (2 fields) D2 Field 1 first : 0 (no) D3 Reserved : 0 D4..5 Field pattern : 0 (Field 1 only) D6..7 Display Mode : 0 (Bob only)bCopyProtect : 0x00 (No restrictions)*!*ERROR: no Color Matching Descriptor for this formatData (HexDump) : 0B 24 06 03 02 01 01 00 00 00 00 .$.........
----- Video Streaming MJPEG Frame Type Descriptor --------> This is the Default (optimum) Frame indexbLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x07 (MJPEG Frame Type)bFrameIndex : 0x01bmCapabilities : 0x02wWidth : 0x0500 (1280)wHeight : 0x02D0 (720)dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s)dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 07 01 02 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 00 18 15 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
----- Video Streaming MJPEG Frame Type Descriptor -----bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x07 (MJPEG Frame Type)bFrameIndex : 0x02bmCapabilities : 0x02wWidth : 0x0140 (320)wHeight : 0x00F0 (240)dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s)dwMaxBitRate : 0x01A5E000 (27648000 bps -> 3.456 MB/s)dwMaxVideoFrameBufferSize: 0x0001C200 (115200 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 07 02 02 40 01 F0 00 00 50 46 00 00 E0 A5 &$...@....PF.... 01 00 C2 01 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
------- VS Uncompressed Format Type Descriptor --------bLength : 0x1B (27 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x04 (Uncompressed Format Type)bFormatIndex : 0x04 (4)bNumFrameDescriptors : 0x02 (2 Frame Descriptors)guidFormat : {30303859-0000-0010-8000-00AA00389B71} (Y800)bBitsPerPixel : 0x08 (8 bits per pixel)bDefaultFrameIndex : 0x01 (Index 1)bAspectRatioX : 0x00bAspectRatioY : 0x00bmInterlaceFlags : 0x00 D0 IL stream or variable: 0 (no) D1 Fields per frame : 0 (2 fields) D2 Field 1 first : 0 (no) D3 Reserved : 0 D4..5 Field pattern : 0 (Field 1 only) D6..7 Display Mode : 0 (Bob only)bCopyProtect : 0x00 (No restrictions)Data (HexDump) : 1B 24 04 04 02 59 38 30 30 00 00 10 00 80 00 00 .$...Y800....... AA 00 38 9B 71 08 01 00 00 00 00 ..8.q......
-------- VS Uncompressed Frame Type Descriptor -----------> This is the Default (optimum) Frame indexbLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x05 (Uncompressed Frame Type)bFrameIndex : 0x01bmCapabilities : 0x02wWidth : 0x0500 (1280)wHeight : 0x02D0 (720)dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s)dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 05 01 02 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 00 18 15 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
-------- VS Uncompressed Frame Type Descriptor --------bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x05 (Uncompressed Frame Type)bFrameIndex : 0x02bmCapabilities : 0x02wWidth : 0x0140 (320)wHeight : 0x00F0 (240)dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s)dwMaxBitRate : 0x01A5E000 (27648000 bps -> 3.456 MB/s)dwMaxVideoFrameBufferSize: 0x0001C200 (115200 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 05 02 02 40 01 F0 00 00 50 46 00 00 E0 A5 &$...@....PF.... 01 00 C2 01 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
------- VS Color Matching Descriptor Descriptor -------bLength : 0x06 (6 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x0D (Color Matching)bColorPrimaries : 0x01 (BT.709, sRGB)bTransferCharacteristics : 0x01 (BT.709)bMatrixCoefficients : 0x04 (SMPTE 170M)Data (HexDump) : 06 24 0D 01 01 04 .$....
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x01 (Interface 1)bAlternateSetting : 0x01bNumEndpoints : 0x01 (1 Endpoint)bInterfaceClass : 0x0E (Video)bInterfaceSubClass : 0x02 (Video Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 01 01 01 0E 02 00 00 .........
----------------- Endpoint Descriptor -----------------bLength : 0x07 (7 bytes)bDescriptorType : 0x05 (Endpoint Descriptor)bEndpointAddress : 0x81 (Direction=IN EndpointID=1)bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data)wMaxPacketSize : 0x0400 Bits 15..13 : 0x00 (reserved, must be zero) Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) Bits 10..0 : 0x400 (1024 bytes per packet)bInterval : 0x01 (1 microframe -> 0.125 ms)Data (HexDump) : 07 05 81 05 00 04 01 .......
------------------- IAD Descriptor --------------------bLength : 0x08 (8 bytes)bDescriptorType : 0x0B (Interface Association Descriptor)bFirstInterface : 0x02 (Interface 2)bInterfaceCount : 0x03 (3 Interfaces)bFunctionClass : 0x01 (Audio)bFunctionSubClass : 0x02 (Audio Streaming)bFunctionProtocol : 0x00iFunction : 0x07 (String Descriptor 7) Language 0x0409 : "USB.Audio"Data (HexDump) : 08 0B 02 03 01 02 00 07 ........
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x02 (Interface 2)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x01 (Audio Control)bInterfaceProtocol : 0x00iInterface : 0x07 (String Descriptor 7) Language 0x0409 : "USB.Audio"Data (HexDump) : 09 04 02 00 00 01 01 00 07 .........
------ Audio Control Interface Header Descriptor ------bLength : 0x0A (10 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x01 (Header)bcdADC : 0x0100wTotalLength : 0x004D (77 bytes)bInCollection : 0x02baInterfaceNr[1] : 0x03baInterfaceNr[2] : 0x04Data (HexDump)           : 0A 24 01 00 01 4D 00 02 03 04                     .$...F....
------- Audio Control Input Terminal Descriptor -------bLength : 0x0C (12 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x02 (Input Terminal)bTerminalID : 0x01wTerminalType : 0x0101 (USB Streaming)bAssocTerminal : 0x00bNrChannels : 0x01 (1 channel)wChannelConfig : 0x0004 (C)iChannelNames : 0x00 (No String Descriptor)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 0C 24 02 01 01 01 00 01 04 00 00 00 .$..........
-------- Audio Control Feature Unit Descriptor --------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x06 (Feature Unit)bUnitID : 0x02 (2)bSourceID : 0x01 (1)bControlSize : 0x01 (1 byte per control)bmaControls[0] : 0x01 D0: Mute : 1 D1: Volume : 0 D2: Bass : 0 D3: Mid : 0 D4: Treble : 0 D5: Graphic Equalizer : 0 D6: Automatic Gain : 0 D7: Delay : 0bmaControls[1] : 0x02 D0: Mute : 0 D1: Volume : 1 D2: Bass : 0 D3: Mid : 0 D4: Treble : 0 D5: Graphic Equalizer : 0 D6: Automatic Gain : 0 D7: Delay : 0iFeature : 0x00 (No String Descriptor)Data (HexDump) : 09 24 06 02 01 01 01 02 00 .$.......
------- Audio Control Output Terminal Descriptor ------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x03 (Output Terminal)bTerminalID : 0x03wTerminalType : 0x0302 (Headphones)bAssocTerminal : 0x00 (0)bSourceID : 0x02 (2)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 09 24 03 03 02 03 00 02 00 .$.......
------- Audio Control Input Terminal Descriptor -------bLength : 0x0C (12 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x02 (Input Terminal)bTerminalID : 0x04wTerminalType : 0x0201 (Microphone)bAssocTerminal : 0x00bNrChannels : 0x01 (1 channel)wChannelConfig : 0x0004 (C)iChannelNames : 0x00 (No String Descriptor)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 0C 24 02 04 01 02 00 01 04 00 00 00 .$..........
-------- Audio Control Feature Unit Descriptor --------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x06 (Feature Unit)bUnitID : 0x05 (5)bSourceID : 0x04 (4)bControlSize : 0x01 (1 byte per control)bmaControls[0] : 0x43 D0: Mute : 1 D1: Volume : 1 D2: Bass : 0 D3: Mid : 0 D4: Treble : 0 D5: Graphic Equalizer : 0 D6: Automatic Gain : 1 D7: Delay : 0bmaControls[1] : 0x00 D0: Mute : 0 D1: Volume : 0 D2: Bass : 0 D3: Mid : 0 D4: Treble : 0 D5: Graphic Equalizer : 0 D6: Automatic Gain : 0 D7: Delay : 0iFeature : 0x00 (No String Descriptor)Data (HexDump) : 09 24 06 05 04 01 43 00 00 .$....C..
------- Audio Control Selector Unit Descriptor --------bLength : 0x07 (7 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x05 (Selector Unit)bUnitID : 0x09bNrInPins : 0x01 (1 Input Pin)baSourceID[1] : 0x05 (5)iSelector : 0x00 (No String Descriptor)Data (HexDump) : 07 24 05 09 01 05 00 .$.....
------- Audio Control Output Terminal Descriptor ------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x03 (Output Terminal)bTerminalID : 0x06wTerminalType : 0x0101 (USB Streaming)bAssocTerminal : 0x02 (2)bSourceID : 0x09 (9)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 09 24 03 06 01 01 02 09 00 .$.......
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x03 (Interface 3)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x02 (Audio Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 03 00 00 01 02 00 00 .........
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x03 (Interface 3)bAlternateSetting : 0x01bNumEndpoints : 0x01 (1 Endpoint)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x02 (Audio Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 03 01 01 01 02 00 00 .........
-------- Audio Streaming Interface Descriptor ---------bLength : 0x07 (7 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x01 (AS_GENERAL)bTerminalLink : 0x01 (Terminal ID 1)bDelay : 0x01 (1 frame)wFormatTag : 0x0001 (PCM)Data (HexDump) : 07 24 01 01 01 01 00 .$.....
------- Audio Streaming Format Type Descriptor --------bLength : 0x0B (11 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x02 (Format Type)bFormatType : 0x01 (FORMAT_TYPE_I)bNrChannels : 0x01 (1 channel)bSubframeSize : 0x02 (2 bytes per subframe)bBitResolution : 0x10 (16 bits per sample)bSamFreqType : 0x01 (supports 1 sample frequence)tSamFreq[1] : 0x03E80 (16000 Hz)Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>.
----------------- Endpoint Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x05 (Endpoint Descriptor)bEndpointAddress : 0x02 (Direction=OUT EndpointID=2)bmAttributes : 0x0D (TransferType=Isochronous SyncType=Synchronous EndpointType=Data)wMaxPacketSize : 0x0020 Bits 15..13 : 0x00 (reserved, must be zero) Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) Bits 10..0 : 0x20 (32 bytes per packet)bInterval : 0x01 (1 ms)bRefresh : 0x00bSynchAddress : 0x00Data (HexDump) : 09 05 02 0D 20 00 01 00 00 .... ....
----------- Audio Data Endpoint Descriptor ------------bLength : 0x07 (7 bytes)bDescriptorType : 0x25 (Audio Endpoint Descriptor)bDescriptorSubtype : 0x01 (General)bmAttributes : 0x00 D0 : Sampling Freq : 0x00 (not supported) D1 : Pitch : 0x00 (not supported) D6..2: Reserved : 0x00 D7 : MaxPacketsOnly : 0x00 (no)bLockDelayUnits : 0x00 (Undefined)wLockDelay : 0x0000Data (HexDump) : 07 25 01 00 00 00 00 .%.....
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x04 (Interface 4)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x02 (Audio Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 04 00 00 01 02 00 00 .........
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x04 (Interface 4)bAlternateSetting : 0x01bNumEndpoints : 0x01 (1 Endpoint)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x02 (Audio Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 04 01 01 01 02 00 00 .........
-------- Audio Streaming Interface Descriptor ---------bLength : 0x07 (7 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x01 (AS_GENERAL)bTerminalLink : 0x06 (Terminal ID 6)bDelay : 0x01 (1 frame)wFormatTag : 0x0001 (PCM)Data (HexDump) : 07 24 01 06 01 01 00 .$.....
------- Audio Streaming Format Type Descriptor --------bLength : 0x0B (11 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x02 (Format Type)bFormatType : 0x01 (FORMAT_TYPE_I)bNrChannels : 0x01 (1 channel)bSubframeSize : 0x02 (2 bytes per subframe)bBitResolution : 0x10 (16 bits per sample)bSamFreqType : 0x01 (supports 1 sample frequence)tSamFreq[1] : 0x03E80 (16000 Hz)Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>.
----------------- Endpoint Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x05 (Endpoint Descriptor)bEndpointAddress : 0x82 (Direction=IN EndpointID=2)bmAttributes : 0x0D (TransferType=Isochronous SyncType=Synchronous EndpointType=Data)wMaxPacketSize : 0x0020 Bits 15..13 : 0x00 (reserved, must be zero) Bits 12..11 : 0x00 (0 additional transactions per microframe -> allows 1..1024 bytes per packet) Bits 10..0 : 0x20 (32 bytes per packet)bInterval : 0x01 (1 ms)bRefresh : 0x00bSynchAddress : 0x00Data (HexDump) : 09 05 82 0D 20 00 01 00 00 .... ....
----------- Audio Data Endpoint Descriptor ------------bLength : 0x07 (7 bytes)bDescriptorType : 0x25 (Audio Endpoint Descriptor)bDescriptorSubtype : 0x01 (General)bmAttributes : 0x00 D0 : Sampling Freq : 0x00 (not supported) D1 : Pitch : 0x00 (not supported) D6..2: Reserved : 0x00 D7 : MaxPacketsOnly : 0x00 (no)bLockDelayUnits : 0x00 (Undefined)wLockDelay : 0x0000Data (HexDump) : 07 25 01 00 00 00 00 .%.....
--------- Device Qualifier Descriptor (for Full-Speed) --------bLength : 0x0A (10 bytes)bDescriptorType : 0x06 (Device_qualifier Descriptor)bcdUSB : 0x200 (USB Version 2.00)bDeviceClass : 0xEF (Miscellaneous)bDeviceSubClass : 0x02bDeviceProtocol : 0x01 (IAD - Interface Association Descriptor)bMaxPacketSize0 : 0x40 (64 Bytes)bNumConfigurations : 0x01 (1 other-speed configuration)bReserved : 0x00Data (HexDump) : 0A 06 00 02 EF 02 01 40 01 00 .......@..
------------------ Configuration Descriptor -------------------bLength : 0x09 (9 bytes)bDescriptorType : 0x02 (Configuration Descriptor)wTotalLength : 0x02D8 (728 bytes)bNumInterfaces : 0x05 (5 Interfaces)bConfigurationValue : 0x01 (Configuration 1)iConfiguration : 0x00 (No String Descriptor)bmAttributes : 0x80 D7: Reserved, set 1 : 0x01 D6: Self Powered : 0x00 (no) D5: Remote Wakeup : 0x00 (no) D4..0: Reserved, set 0 : 0x00MaxPower : 0xC8 (400 mA)Data (HexDump) : 09 02 D8 02 05 01 00 80 C8 08 0B 00 02 0E 03 00 ................ 00 09 04 00 00 00 0E 01 00 00 0D 24 01 00 01 35 ...........$...5 00 80 C3 C9 01 01 01 12 24 02 01 01 02 00 00 00 ........$....... 00 00 00 00 00 03 00 00 00 0D 24 05 02 01 00 00 ..........$..... 03 00 00 00 00 00 09 24 03 03 01 01 01 02 00 09 .......$........ 04 01 00 00 0E 02 00 00 11 24 01 04 A4 01 81 00 .........$...... 03 00 00 00 01 00 00 00 00 1B 24 04 01 02 4E 56 ..........$...NV 31 32 00 00 10 00 80 00 00 AA 00 38 9B 71 0C 01 12.........8.q.. 00 00 00 00 26 24 05 01 02 00 05 D0 02 00 C0 4B ....&$.........K 03 00 80 C6 13 00 18 15 00 80 1A 06 00 03 15 16 ................ 05 00 80 1A 06 00 80 84 1E 00 26 24 05 02 02 40 ..........&$...@ 01 F0 00 00 50 46 00 00 E0 A5 01 00 C2 01 00 80 ....PF.......... 1A 06 00 03 15 16 05 00 80 1A 06 00 80 84 1E 00 ................ 06 24 0D 01 01 04 1C 24 10 02 02 48 32 36 34 00 .$.....$...H264. 00 10 00 80 00 00 AA 00 38 9B 71 10 01 00 00 00 ........8.q..... 00 01 26 24 11 01 00 00 05 D0 02 00 C0 4B 03 00 ..&$.........K.. 80 C6 13 80 1A 06 00 03 00 00 00 00 15 16 05 00 ................ 80 1A 06 00 80 84 1E 00 26 24 11 02 00 40 01 F0 ........&$...@.. 00 00 50 46 00 00 E0 A5 01 80 1A 06 00 03 00 00 ..PF............ 00 00 15 16 05 00 80 1A 06 00 80 84 1E 00 0B 24 ...............$ 06 03 02 01 01 00 00 00 00 26 24 07 01 02 00 05 .........&$..... D0 02 00 C0 4B 03 00 80 C6 13 00 18 15 00 80 1A ....K........... 06 00 03 15 16 05 00 80 1A 06 00 80 84 1E 00 26 ...............& 24 07 02 02 40 01 F0 00 00 50 46 00 00 E0 A5 01 $...@....PF..... 00 C2 01 00 80 1A 06 00 03 15 16 05 00 80 1A 06 ................ 00 80 84 1E 00 1B 24 04 04 02 59 38 30 30 00 00 ......$...Y800.. 10 00 80 00 00 AA 00 38 9B 71 08 01 00 00 00 00 .......8.q...... 26 24 05 01 02 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 00 18 15 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 26 24 05 02 02 40 01 F0 00 00 ......&$...@.... 50 46 00 00 E0 A5 01 00 C2 01 00 80 1A 06 00 03 PF.............. 15 16 05 00 80 1A 06 00 80 84 1E 00 06 24 0D 01 .............$.. 01 04 09 04 01 01 01 0E 02 00 00 07 05 81 05 00 ................ 04 01 08 0B 02 03 01 02 00 07 09 04 02 00 00 01 ................                           01 00 07 0A 24 01 00 01 4D 00 02 03 04 0C 24 02   ....$...F.....$. 01 01 01 00 01 04 00 00 00 09 24 06 02 01 01 01 ..........$..... 02 00 09 24 03 03 02 03 00 02 00 0C 24 02 04 01 ...$........$... 02 00 01 04 00 00 00 09 24 06 05 04 01 43 00 00 ........$....C.. 07 24 05 09 01 05 00 09 24 03 06 01 01 02 09 00 .$......$....... 09 04 03 00 00 01 02 00 00 09 04 03 01 01 01 02 ................ 00 00 07 24 01 01 01 01 00 0B 24 02 01 01 02 10 ...$......$..... 01 80 3E 00 09 05 02 0D 20 00 01 00 00 07 25 01 ..>..... .....%. 00 00 00 00 09 04 04 00 00 01 02 00 00 09 04 04 ................ 01 01 01 02 00 00 07 24 01 06 01 01 00 0B 24 02 .......$......$. 01 01 02 10 01 80 3E 00 09 05 82 0D 20 00 01 00 ......>..... ... 00 07 25 01 00 00 00 00 ..%.....
------------------- IAD Descriptor --------------------bLength : 0x08 (8 bytes)bDescriptorType : 0x0B (Interface Association Descriptor)bFirstInterface : 0x00 (Interface 0)bInterfaceCount : 0x02 (2 Interfaces)bFunctionClass : 0x0E (Video)bFunctionSubClass : 0x03 (Video Interface Collection)bFunctionProtocol : 0x00 (PC_PROTOCOL_UNDEFINED)iFunction : 0x00 (No String Descriptor)Data (HexDump) : 08 0B 00 02 0E 03 00 00 ........
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x00 (Interface 0)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x0E (Video)bInterfaceSubClass : 0x01 (Video Control)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 00 00 00 0E 01 00 00 .........
------- Video Control Interface Header Descriptor -----bLength : 0x0D (13 bytes)bDescriptorType : 0x24 (Video Control Interface)bDescriptorSubtype : 0x01 (Video Control Header)bcdUVC : 0x0100 (UVC Version 1.00)wTotalLength : 0x0035 (53 bytes)dwClockFreq : 0x01C9C380 (30 MHz)bInCollection : 0x01 (1 VideoStreaming interface)baInterfaceNr[1] : 0x01 (Interface 1)Data (HexDump) : 0D 24 01 00 01 35 00 80 C3 C9 01 01 01 .$...5.......
-------- Video Control Input Terminal Descriptor ------bLength : 0x12 (18 bytes)bDescriptorType : 0x24 (Video Control Interface)bDescriptorSubtype : 0x02 (Input Terminal)bTerminalID : 0x01 (1)wTerminalType : 0x0201 (ITT_CAMERA)bAssocTerminal : 0x00 (Not associated with an Output Terminal)iTerminal : 0x00 (No String Descriptor)Camera Input Terminal Data:wObjectiveFocalLengthMin : 0x0000wObjectiveFocalLengthMax : 0x0000wOcularFocalLength : 0x0000bControlSize : 0x03 (3 bytes)bmControls : 0x00, 0x00, 0x00 D0 : 0 no - Scanning Mode D1 : 0 no - Auto-Exposure Mode D2 : 0 no - Auto-Exposure Priority D3 : 0 no - Exposure Time (Absolute) D4 : 0 no - Exposure Time (Relative) D5 : 0 no - Focus (Absolute) D6 : 0 no - Focus (Relative) D7 : 0 no - Iris (Absolute) D8 : 0 no - Iris (Relative) D9 : 0 no - Zoom (Absolute) D10 : 0 no - Zoom (Relative) D11 : 0 no - Pan (Absolute) D12 : 0 no - Pan (Relative) D13 : 0 no - Roll (Absolute) D14 : 0 no - Roll (Relative) D15 : 0 no - Tilt (Absolute) D16 : 0 no - Tilt (Relative) D17 : 0 no - Focus Auto D18 : 0 no - Reserved D19 : 0 no - Reserved D20 : 0 no - Reserved D21 : 0 no - Reserved D22 : 0 no - Reserved D23 : 0 no - ReservedData (HexDump) : 12 24 02 01 01 02 00 00 00 00 00 00 00 00 03 00 .$.............. 00 00 ..
-------- Video Control Processing Unit Descriptor -----bLength : 0x0D (13 bytes)bDescriptorType : 0x24 (Video Control Interface)bDescriptorSubtype : 0x05 (Processing Unit)bUnitID : 0x02 (2)bSourceID : 0x01 (1)wMaxMultiplier : 0x0000bControlSize : 0x03 (3 bytes)bmControls : 0x00, 0x00, 0x00 D0 : 0 no - Brightness D1 : 0 no - Contrast D2 : 0 no - Hue D3 : 0 no - Saturation D4 : 0 no - Sharpness D5 : 0 no - Gamma D6 : 0 no - White Balance Temperature D7 : 0 no - White Balance Component D8 : 0 no - Backlight Compensation D9 : 0 no - Gain D10 : 0 no - Power Line Frequency D11 : 0 no - Hue, Auto D12 : 0 no - White Balance Temperature, Auto D13 : 0 no - White Balance Component, Auto D14 : 0 no - Digital Multiplier D15 : 0 no - Digital Multiplier Limit D16 : 0 no - Analog Video Standard D17 : 0 no - Analog Video Lock Status D18 : 0 no - Contrast, Auto D19 : 0 no - Reserved D20 : 0 no - Reserved D21 : 0 no - Reserved D22 : 0 no - Reserved D23 : 0 no - ReservediProcessing : 0x00 (No String Descriptor)*!*ERROR: bLength of 0x0D incorrect, should be 0x0CData (HexDump) : 0D 24 05 02 01 00 00 03 00 00 00 00 00 .$...........
------- Video Control Output Terminal Descriptor ------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Video Control Interface)bDescriptorSubtype : 0x03 (Output Terminal)bTerminalID : 0x03 (3)wTerminalType : 0x0101 (TT_STREAMING)bAssocTerminal : 0x01 (Associated with Input Terminal ID=1)bSourceID : 0x02 (2)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 09 24 03 03 01 01 01 02 00 .$.......
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x01 (Interface 1)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x0E (Video)bInterfaceSubClass : 0x02 (Video Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 01 00 00 0E 02 00 00 .........
---- VC-Specific VS Video Input Header Descriptor -----bLength : 0x11 (17 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x01 (Input Header)bNumFormats : 0x04wTotalLength : 0x01A4 (420 bytes)bEndpointAddress : 0x81 (Direction=IN EndpointID=1)bmInfo : 0x00 (Dynamic Format Change not supported)bTerminalLink : 0x03 (Output Terminal ID 3)bStillCaptureMethod : 0x00 (No Still Capture)nbTriggerSupport : 0x00 (Hardware Triggering not supported)bTriggerUsage : 0x00 (Host will initiate still image capture)bControlSize : 0x01 (1 bytes each)Video Payload Format 1 : 0x00 D0 : 0 no - Key Frame Rate D1 : 0 no - P Frame Rate D2 : 0 no - Compression Quality D3 : 0 no - Compression Window Size D4 : 0 no - Generate Key Frame D5 : 0 no - Update Frame Segment D6 : 0 no - Reserved D7 : 0 no - ReservedVideo Payload Format 2 : 0x00 D0 : 0 no - Key Frame Rate D1 : 0 no - P Frame Rate D2 : 0 no - Compression Quality D3 : 0 no - Compression Window Size D4 : 0 no - Generate Key Frame D5 : 0 no - Update Frame Segment D6 : 0 no - Reserved D7 : 0 no - ReservedVideo Payload Format 3 : 0x00 D0 : 0 no - Key Frame Rate D1 : 0 no - P Frame Rate D2 : 0 no - Compression Quality D3 : 0 no - Compression Window Size D4 : 0 no - Generate Key Frame D5 : 0 no - Update Frame Segment D6 : 0 no - Reserved D7 : 0 no - ReservedVideo Payload Format 4 : 0x00 D0 : 0 no - Key Frame Rate D1 : 0 no - P Frame Rate D2 : 0 no - Compression Quality D3 : 0 no - Compression Window Size D4 : 0 no - Generate Key Frame D5 : 0 no - Update Frame Segment D6 : 0 no - Reserved D7 : 0 no - ReservedData (HexDump) : 11 24 01 04 A4 01 81 00 03 00 00 00 01 00 00 00 .$.............. 00 .
------- VS Uncompressed Format Type Descriptor --------bLength : 0x1B (27 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x04 (Uncompressed Format Type)bFormatIndex : 0x01 (1)bNumFrameDescriptors : 0x02 (2 Frame Descriptors)guidFormat : {3231564E-0000-0010-8000-00AA00389B71} (NV12)bBitsPerPixel : 0x0C (12 bits per pixel)bDefaultFrameIndex : 0x01 (Index 1)bAspectRatioX : 0x00bAspectRatioY : 0x00bmInterlaceFlags : 0x00 D0 IL stream or variable: 0 (no) D1 Fields per frame : 0 (2 fields) D2 Field 1 first : 0 (no) D3 Reserved : 0 D4..5 Field pattern : 0 (Field 1 only) D6..7 Display Mode : 0 (Bob only)bCopyProtect : 0x00 (No restrictions)Data (HexDump) : 1B 24 04 01 02 4E 56 31 32 00 00 10 00 80 00 00 .$...NV12....... AA 00 38 9B 71 0C 01 00 00 00 00 ..8.q......
-------- VS Uncompressed Frame Type Descriptor -----------> This is the Default (optimum) Frame indexbLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x05 (Uncompressed Frame Type)bFrameIndex : 0x01bmCapabilities : 0x02wWidth : 0x0500 (1280)wHeight : 0x02D0 (720)dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s)dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 05 01 02 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 00 18 15 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
-------- VS Uncompressed Frame Type Descriptor --------bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x05 (Uncompressed Frame Type)bFrameIndex : 0x02bmCapabilities : 0x02wWidth : 0x0140 (320)wHeight : 0x00F0 (240)dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s)dwMaxBitRate : 0x01A5E000 (27648000 bps -> 3.456 MB/s)dwMaxVideoFrameBufferSize: 0x0001C200 (115200 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 05 02 02 40 01 F0 00 00 50 46 00 00 E0 A5 &$...@....PF.... 01 00 C2 01 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
------- VS Color Matching Descriptor Descriptor -------bLength : 0x06 (6 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x0D (Color Matching)bColorPrimaries : 0x01 (BT.709, sRGB)bTransferCharacteristics : 0x01 (BT.709)bMatrixCoefficients : 0x04 (SMPTE 170M)Data (HexDump) : 06 24 0D 01 01 04 .$....
---- VS Frame Based Payload Format Type Descriptor ----*!*ERROR: This format is NOT ALLOWED for UVC 1.0 devicesbLength : 0x1C (28 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x10 (Frame Based Format Type)bFormatIndex : 0x02 (2)bNumFrameDescriptors : 0x02 (2)guidFormat : {34363248-0000-0010-8000-00AA00389B71} (H264)bBitsPerPixel : 0x10 (16 bits)bDefaultFrameIndex : 0x01 (1)bAspectRatioX : 0x00bAspectRatioY : 0x00bmInterlaceFlags : 0x00 D0 IL stream or variable: 0 (no) D1 Fields per frame : 0 (2 fields) D2 Field 1 first : 0 (no) D3 Reserved : 0 D4..5 Field pattern : 0 (Field 1 only) D6..7 Display Mode : 0 (Bob only)bCopyProtect : 0x00 (No restrictions)bVariableSize : 0x01 (Variable Size)*!*ERROR: no Color Matching Descriptor for this formatData (HexDump) : 1C 24 10 02 02 48 32 36 34 00 00 10 00 80 00 00 .$...H264....... AA 00 38 9B 71 10 01 00 00 00 00 01 ..8.q.......
----- VS Frame Based Payload Frame Type Descriptor ----*!*ERROR bDescriptorSubtype did not exist in UVC 1.0bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)bFrameIndex : 0x01bmCapabilities : 0x00wWidth : 0x0500 (1280)wHeight : 0x02D0 (720)dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s)dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)dwBytesPerLine : 0x00 (0 bytes)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 11 01 00 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 80 1A 06 00 03 00 00 00 00 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
----- VS Frame Based Payload Frame Type Descriptor ----*!*ERROR bDescriptorSubtype did not exist in UVC 1.0bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x11 (Frame Based Payload Frame Type)bFrameIndex : 0x02bmCapabilities : 0x00wWidth : 0x0140 (320)wHeight : 0x00F0 (240)dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s)dwMaxBitRate : 0x01A5E000 (27648000 bps -> 3.456 MB/s)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)dwBytesPerLine : 0x00 (0 bytes)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 11 02 00 40 01 F0 00 00 50 46 00 00 E0 A5 &$...@....PF.... 01 80 1A 06 00 03 00 00 00 00 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
----- Video Streaming MJPEG Format Type Descriptor ----bLength : 0x0B (11 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x06 (Format MJPEG)bFormatIndex : 0x03 (3)bNumFrameDescriptors : 0x02 (2)bmFlags : 0x01 (Sample size is fixed)bDefaultFrameIndex : 0x01 (1)bAspectRatioX : 0x00bAspectRatioY : 0x00bmInterlaceFlags : 0x00 D0 IL stream or variable: 0 (no) D1 Fields per frame : 0 (2 fields) D2 Field 1 first : 0 (no) D3 Reserved : 0 D4..5 Field pattern : 0 (Field 1 only) D6..7 Display Mode : 0 (Bob only)bCopyProtect : 0x00 (No restrictions)*!*ERROR: no Color Matching Descriptor for this formatData (HexDump) : 0B 24 06 03 02 01 01 00 00 00 00 .$.........
----- Video Streaming MJPEG Frame Type Descriptor --------> This is the Default (optimum) Frame indexbLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x07 (MJPEG Frame Type)bFrameIndex : 0x01bmCapabilities : 0x02wWidth : 0x0500 (1280)wHeight : 0x02D0 (720)dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s)dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 07 01 02 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 00 18 15 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
----- Video Streaming MJPEG Frame Type Descriptor -----bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x07 (MJPEG Frame Type)bFrameIndex : 0x02bmCapabilities : 0x02wWidth : 0x0140 (320)wHeight : 0x00F0 (240)dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s)dwMaxBitRate : 0x01A5E000 (27648000 bps -> 3.456 MB/s)dwMaxVideoFrameBufferSize: 0x0001C200 (115200 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 07 02 02 40 01 F0 00 00 50 46 00 00 E0 A5 &$...@....PF.... 01 00 C2 01 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
------- VS Uncompressed Format Type Descriptor --------bLength : 0x1B (27 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x04 (Uncompressed Format Type)bFormatIndex : 0x04 (4)bNumFrameDescriptors : 0x02 (2 Frame Descriptors)guidFormat : {30303859-0000-0010-8000-00AA00389B71} (Y800)bBitsPerPixel : 0x08 (8 bits per pixel)bDefaultFrameIndex : 0x01 (Index 1)bAspectRatioX : 0x00bAspectRatioY : 0x00bmInterlaceFlags : 0x00 D0 IL stream or variable: 0 (no) D1 Fields per frame : 0 (2 fields) D2 Field 1 first : 0 (no) D3 Reserved : 0 D4..5 Field pattern : 0 (Field 1 only) D6..7 Display Mode : 0 (Bob only)bCopyProtect : 0x00 (No restrictions)Data (HexDump) : 1B 24 04 04 02 59 38 30 30 00 00 10 00 80 00 00 .$...Y800....... AA 00 38 9B 71 08 01 00 00 00 00 ..8.q......
-------- VS Uncompressed Frame Type Descriptor -----------> This is the Default (optimum) Frame indexbLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x05 (Uncompressed Frame Type)bFrameIndex : 0x01bmCapabilities : 0x02wWidth : 0x0500 (1280)wHeight : 0x02D0 (720)dwMinBitRate : 0x034BC000 (55296000 bps -> 6.912 MB/s)dwMaxBitRate : 0x13C68000 (331776000 bps -> 41.472 MB/s)dwMaxVideoFrameBufferSize: 0x00151800 (1382400 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 05 01 02 00 05 D0 02 00 C0 4B 03 00 80 C6 &$.........K.... 13 00 18 15 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
-------- VS Uncompressed Frame Type Descriptor --------bLength : 0x26 (38 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x05 (Uncompressed Frame Type)bFrameIndex : 0x02bmCapabilities : 0x02wWidth : 0x0140 (320)wHeight : 0x00F0 (240)dwMinBitRate : 0x00465000 (4608000 bps -> 576 KB/s)dwMaxBitRate : 0x01A5E000 (27648000 bps -> 3.456 MB/s)dwMaxVideoFrameBufferSize: 0x0001C200 (115200 bytes)dwDefaultFrameInterval : 0x00061A80 (40.0000 ms -> 25.0000 fps)bFrameIntervalType : 0x03 (3 discrete frame intervals supported)adwFrameInterval[1] : 0x00051615 (33.3333 ms -> 30.0000 fps)adwFrameInterval[2] : 0x00061A80 (40.0000 ms -> 25.0000 fps)adwFrameInterval[3] : 0x001E8480 (200.0000 ms -> 5.0000 fps)Data (HexDump) : 26 24 05 02 02 40 01 F0 00 00 50 46 00 00 E0 A5 &$...@....PF.... 01 00 C2 01 00 80 1A 06 00 03 15 16 05 00 80 1A ................ 06 00 80 84 1E 00 ......
------- VS Color Matching Descriptor Descriptor -------bLength : 0x06 (6 bytes)bDescriptorType : 0x24 (Video Streaming Interface)bDescriptorSubtype : 0x0D (Color Matching)bColorPrimaries : 0x01 (BT.709, sRGB)bTransferCharacteristics : 0x01 (BT.709)bMatrixCoefficients : 0x04 (SMPTE 170M)Data (HexDump) : 06 24 0D 01 01 04 .$....
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x01 (Interface 1)bAlternateSetting : 0x01bNumEndpoints : 0x01 (1 Endpoint)bInterfaceClass : 0x0E (Video)bInterfaceSubClass : 0x02 (Video Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 01 01 01 0E 02 00 00 .........
----------------- Endpoint Descriptor -----------------bLength : 0x07 (7 bytes)bDescriptorType : 0x05 (Endpoint Descriptor)bEndpointAddress : 0x81 (Direction=IN EndpointID=1)bmAttributes : 0x05 (TransferType=Isochronous SyncType=Asynchronous EndpointType=Data)wMaxPacketSize : 0x0400 (1024 bytes)bInterval : 0x01 (1 ms)Data (HexDump) : 07 05 81 05 00 04 01 .......
------------------- IAD Descriptor --------------------bLength : 0x08 (8 bytes)bDescriptorType : 0x0B (Interface Association Descriptor)bFirstInterface : 0x02 (Interface 2)bInterfaceCount : 0x03 (3 Interfaces)bFunctionClass : 0x01 (Audio)bFunctionSubClass : 0x02 (Audio Streaming)bFunctionProtocol : 0x00iFunction : 0x07 (String Descriptor 7) Language 0x0409 : "USB.Audio"Data (HexDump) : 08 0B 02 03 01 02 00 07 ........
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x02 (Interface 2)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x01 (Audio Control)bInterfaceProtocol : 0x00iInterface : 0x07 (String Descriptor 7) Language 0x0409 : "USB.Audio"Data (HexDump) : 09 04 02 00 00 01 01 00 07 .........
------ Audio Control Interface Header Descriptor ------bLength : 0x0A (10 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x01 (Header)bcdADC : 0x0100wTotalLength             : 0x004D (77 bytes)bInCollection : 0x02baInterfaceNr[1] : 0x03baInterfaceNr[2] : 0x04Data (HexDump)           : 0A 24 01 00 01 4D 00 02 03 04                     .$...F....
------- Audio Control Input Terminal Descriptor -------bLength : 0x0C (12 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x02 (Input Terminal)bTerminalID : 0x01wTerminalType : 0x0101 (USB Streaming)bAssocTerminal : 0x00bNrChannels : 0x01 (1 channel)wChannelConfig : 0x0004 (C)iChannelNames : 0x00 (No String Descriptor)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 0C 24 02 01 01 01 00 01 04 00 00 00 .$..........
-------- Audio Control Feature Unit Descriptor --------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x06 (Feature Unit)bUnitID : 0x02 (2)bSourceID : 0x01 (1)bControlSize : 0x01 (1 byte per control)bmaControls[0] : 0x01 D0: Mute : 1 D1: Volume : 0 D2: Bass : 0 D3: Mid : 0 D4: Treble : 0 D5: Graphic Equalizer : 0 D6: Automatic Gain : 0 D7: Delay : 0bmaControls[1] : 0x02 D0: Mute : 0 D1: Volume : 1 D2: Bass : 0 D3: Mid : 0 D4: Treble : 0 D5: Graphic Equalizer : 0 D6: Automatic Gain : 0 D7: Delay : 0iFeature : 0x00 (No String Descriptor)Data (HexDump) : 09 24 06 02 01 01 01 02 00 .$.......
------- Audio Control Output Terminal Descriptor ------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x03 (Output Terminal)bTerminalID : 0x03wTerminalType : 0x0302 (Headphones)bAssocTerminal : 0x00 (0)bSourceID : 0x02 (2)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 09 24 03 03 02 03 00 02 00 .$.......
------- Audio Control Input Terminal Descriptor -------bLength : 0x0C (12 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x02 (Input Terminal)bTerminalID : 0x04wTerminalType : 0x0201 (Microphone)bAssocTerminal : 0x00bNrChannels : 0x01 (1 channel)wChannelConfig : 0x0004 (C)iChannelNames : 0x00 (No String Descriptor)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 0C 24 02 04 01 02 00 01 04 00 00 00 .$..........
-------- Audio Control Feature Unit Descriptor --------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x06 (Feature Unit)bUnitID : 0x05 (5)bSourceID : 0x04 (4)bControlSize : 0x01 (1 byte per control)bmaControls[0] : 0x43 D0: Mute : 1 D1: Volume : 1 D2: Bass : 0 D3: Mid : 0 D4: Treble : 0 D5: Graphic Equalizer : 0 D6: Automatic Gain : 1 D7: Delay : 0bmaControls[1] : 0x00 D0: Mute : 0 D1: Volume : 0 D2: Bass : 0 D3: Mid : 0 D4: Treble : 0 D5: Graphic Equalizer : 0 D6: Automatic Gain : 0 D7: Delay : 0iFeature : 0x00 (No String Descriptor)Data (HexDump) : 09 24 06 05 04 01 43 00 00 .$....C..
------- Audio Control Selector Unit Descriptor --------bLength : 0x07 (7 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x05 (Selector Unit)bUnitID : 0x09bNrInPins : 0x01 (1 Input Pin)baSourceID[1] : 0x05 (5)iSelector : 0x00 (No String Descriptor)Data (HexDump) : 07 24 05 09 01 05 00 .$.....
------- Audio Control Output Terminal Descriptor ------bLength : 0x09 (9 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x03 (Output Terminal)bTerminalID : 0x06wTerminalType : 0x0101 (USB Streaming)bAssocTerminal : 0x02 (2)bSourceID : 0x09 (9)iTerminal : 0x00 (No String Descriptor)Data (HexDump) : 09 24 03 06 01 01 02 09 00 .$.......
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x03 (Interface 3)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x02 (Audio Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 03 00 00 01 02 00 00 .........
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x03 (Interface 3)bAlternateSetting : 0x01bNumEndpoints : 0x01 (1 Endpoint)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x02 (Audio Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 03 01 01 01 02 00 00 .........
-------- Audio Streaming Interface Descriptor ---------bLength : 0x07 (7 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x01 (AS_GENERAL)bTerminalLink : 0x01 (Terminal ID 1)bDelay : 0x01 (1 frame)wFormatTag : 0x0001 (PCM)Data (HexDump) : 07 24 01 01 01 01 00 .$.....
------- Audio Streaming Format Type Descriptor --------bLength : 0x0B (11 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x02 (Format Type)bFormatType : 0x01 (FORMAT_TYPE_I)bNrChannels : 0x01 (1 channel)bSubframeSize : 0x02 (2 bytes per subframe)bBitResolution : 0x10 (16 bits per sample)bSamFreqType : 0x01 (supports 1 sample frequence)tSamFreq[1] : 0x03E80 (16000 Hz)Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>.
----------------- Endpoint Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x05 (Endpoint Descriptor)bEndpointAddress : 0x02 (Direction=OUT EndpointID=2)bmAttributes : 0x0D (TransferType=Isochronous SyncType=Synchronous EndpointType=Data)wMaxPacketSize : 0x0020 (32 bytes)bInterval : 0x01 (1 ms)bRefresh : 0x00bSynchAddress : 0x00Data (HexDump) : 09 05 02 0D 20 00 01 00 00 .... ....
----------- Audio Data Endpoint Descriptor ------------bLength : 0x07 (7 bytes)bDescriptorType : 0x25 (Audio Endpoint Descriptor)bDescriptorSubtype : 0x01 (General)bmAttributes : 0x00 D0 : Sampling Freq : 0x00 (not supported) D1 : Pitch : 0x00 (not supported) D6..2: Reserved : 0x00 D7 : MaxPacketsOnly : 0x00 (no)bLockDelayUnits : 0x00 (Undefined)wLockDelay : 0x0000Data (HexDump) : 07 25 01 00 00 00 00 .%.....
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x04 (Interface 4)bAlternateSetting : 0x00bNumEndpoints : 0x00 (Default Control Pipe only)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x02 (Audio Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 04 00 00 01 02 00 00 .........
---------------- Interface Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x04 (Interface Descriptor)bInterfaceNumber : 0x04 (Interface 4)bAlternateSetting : 0x01bNumEndpoints : 0x01 (1 Endpoint)bInterfaceClass : 0x01 (Audio)bInterfaceSubClass : 0x02 (Audio Streaming)bInterfaceProtocol : 0x00iInterface : 0x00 (No String Descriptor)Data (HexDump) : 09 04 04 01 01 01 02 00 00 .........
-------- Audio Streaming Interface Descriptor ---------bLength : 0x07 (7 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x01 (AS_GENERAL)bTerminalLink : 0x06 (Terminal ID 6)bDelay : 0x01 (1 frame)wFormatTag : 0x0001 (PCM)Data (HexDump) : 07 24 01 06 01 01 00 .$.....
------- Audio Streaming Format Type Descriptor --------bLength : 0x0B (11 bytes)bDescriptorType : 0x24 (Audio Interface Descriptor)bDescriptorSubtype : 0x02 (Format Type)bFormatType : 0x01 (FORMAT_TYPE_I)bNrChannels : 0x01 (1 channel)bSubframeSize : 0x02 (2 bytes per subframe)bBitResolution : 0x10 (16 bits per sample)bSamFreqType : 0x01 (supports 1 sample frequence)tSamFreq[1] : 0x03E80 (16000 Hz)Data (HexDump) : 0B 24 02 01 01 02 10 01 80 3E 00 .$.......>.
----------------- Endpoint Descriptor -----------------bLength : 0x09 (9 bytes)bDescriptorType : 0x05 (Endpoint Descriptor)bEndpointAddress : 0x82 (Direction=IN EndpointID=2)bmAttributes : 0x0D (TransferType=Isochronous SyncType=Synchronous EndpointType=Data)wMaxPacketSize : 0x0020 (32 bytes)bInterval : 0x01 (1 ms)bRefresh : 0x00bSynchAddress : 0x00Data (HexDump) : 09 05 82 0D 20 00 01 00 00 .... ....
----------- Audio Data Endpoint Descriptor ------------bLength : 0x07 (7 bytes)bDescriptorType : 0x25 (Audio Endpoint Descriptor)bDescriptorSubtype : 0x01 (General)bmAttributes : 0x00 D0 : Sampling Freq : 0x00 (not supported) D1 : Pitch : 0x00 (not supported) D6..2: Reserved : 0x00 D7 : MaxPacketsOnly : 0x00 (no)bLockDelayUnits : 0x00 (Undefined)wLockDelay : 0x0000Data (HexDump) : 07 25 01 00 00 00 00 .%.....
-------------------- String Descriptors ------------------- ------ String Descriptor 0 ------bLength : 0x04 (4 bytes)bDescriptorType : 0x03 (String Descriptor)Language ID[0] : 0x0409 (English - United States)Data (HexDump) : 04 03 09 04 .... ------ String Descriptor 1 ------bLength : 0x22 (34 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "xxxxx.Technology"Data (HexDump) : 22 03 78 00 78 00 78 00 78 00 78 00 2E 00 54 00 ".x.x.x.x.x...T. 65 00 63 00 68 00 6E 00 6F 00 6C 00 6F 00 67 00 e.c.h.n.o.l.o.g. 79 00 y. ------ String Descriptor 2 ------bLength : 0x14 (20 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "USB.Video"Data (HexDump) : 14 03 55 00 53 00 42 00 2E 00 56 00 69 00 64 00 ..U.S.B...V.i.d. 65 00 6F 00 e.o. ------ String Descriptor 3 ------bLength : 0x08 (8 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "0.1"Data (HexDump) : 08 03 30 00 2E 00 31 00 ..0...1. ------ String Descriptor 4 ------bLength : 0x1C (28 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "Configuration"Data (HexDump) : 1C 03 43 00 6F 00 6E 00 66 00 69 00 67 00 75 00 ..C.o.n.f.i.g.u. 72 00 61 00 74 00 69 00 6F 00 6E 00 r.a.t.i.o.n. ------ String Descriptor 5 ------bLength : 0x14 (20 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "USB.Video"Data (HexDump) : 14 03 55 00 53 00 42 00 2E 00 56 00 69 00 64 00 ..U.S.B...V.i.d. 65 00 6F 00 e.o. ------ String Descriptor 6 ------bLength : 0x14 (20 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "USB.Audio"Data (HexDump) : 14 03 55 00 53 00 42 00 2E 00 41 00 75 00 64 00 ..U.S.B...A.u.d. 69 00 6F 00 i.o. ------ String Descriptor 7 ------bLength : 0x14 (20 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "USB.Audio"Data (HexDump) : 14 03 55 00 53 00 42 00 2E 00 41 00 75 00 64 00 ..U.S.B...A.u.d. 69 00 6F 00 i.o. ------ String Descriptor 8 ------bLength : 0x08 (8 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "XXX"Data (HexDump) : 08 03 58 00 58 00 58 00 ..X.X.X. ------ String Descriptor 9 ------bLength : 0x08 (8 bytes)bDescriptorType : 0x03 (String Descriptor)Language 0x0409 : "XXX"Data (HexDump) : 08 03 58 00 58 00 58 00 ..X.X.X.

四. 枚举过程

见五.抓包文件分享,不再赘述

.抓包文件分享

UVC_UAC_SPK_MIC.upv

可以使用USB Packet Viewer这个软件回放,方便查看枚举和数据传输过程。

链接:https://pan.baidu.com/s/1DanwiGhXX3W9kwL9naSVUQ?pwd=wb6n

提取码:wb6n

.总结

以上分享了一个完整的UVC+UAC的扬声器+麦克风的实例,描述符可以直接使用,其他参考单独的UVC和扬声器和麦克风的实现即可。USB描述符的正确是能顺利枚举的首要条件,枚举完成了,基本就成功了一半了。有时候描述符一丁点不对就会导致枚举失败,所以有时候这些问题会困扰很久,有一个正确的描述符作为参考显得很有价值。故特分享此案例。


评论
  • 这篇内容主要讨论三个基本问题,硅电容是什么,为什么要使用硅电容,如何正确使用硅电容?1.  硅电容是什么首先我们需要了解电容是什么?物理学上电容的概念指的是给定电位差下自由电荷的储藏量,记为C,单位是F,指的是容纳电荷的能力,C=εS/d=ε0εrS/4πkd(真空)=Q/U。百度百科上电容器的概念指的是两个相互靠近的导体,中间夹一层不导电的绝缘介质。通过观察电容本身的定义公式中可以看到,在各个变量中比较能够改变的就是εr,S和d,也就是介质的介电常数,金属板有效相对面积以及距离。当前
    知白 2025-01-06 12:04 167浏览
  • 根据Global Info Research项目团队最新调研,预计2030年全球封闭式电机产值达到1425百万美元,2024-2030年期间年复合增长率CAGR为3.4%。 封闭式电机是一种电动机,其外壳设计为密闭结构,通常用于要求较高的防护等级的应用场合。封闭式电机可以有效防止外部灰尘、水分和其他污染物进入内部,从而保护电机的内部组件,延长其使用寿命。 环洋市场咨询机构出版的调研分析报告【全球封闭式电机行业总体规模、主要厂商及IPO上市调研报告,2025-2031】研究全球封闭式电机总体规
    GIRtina 2025-01-06 11:10 103浏览
  • PLC组态方式主要有三种,每种都有其独特的特点和适用场景。下面来简单说说: 1. 硬件组态   定义:硬件组态指的是选择适合的PLC型号、I/O模块、通信模块等硬件组件,并按照实际需求进行连接和配置。    灵活性:这种方式允许用户根据项目需求自由搭配硬件组件,具有较高的灵活性。    成本:可能需要额外的硬件购买成本,适用于对系统性能和扩展性有较高要求的场合。 2. 软件组态   定义:软件组态主要是通过PLC
    丙丁先生 2025-01-06 09:23 83浏览
  • 光耦合器,也称为光隔离器,是一种利用光在两个隔离电路之间传输电信号的组件。在医疗领域,确保患者安全和设备可靠性至关重要。在众多有助于医疗设备安全性和效率的组件中,光耦合器起着至关重要的作用。这些紧凑型设备经常被忽视,但对于隔离高压和防止敏感医疗设备中的电气危害却是必不可少的。本文深入探讨了光耦合器的功能、其在医疗应用中的重要性以及其实际使用示例。什么是光耦合器?它通常由以下部分组成:LED(发光二极管):将电信号转换为光。光电探测器(例如光电晶体管):检测光并将其转换回电信号。这种布置确保输入和
    腾恩科技-彭工 2025-01-03 16:27 180浏览
  • 大模型的赋能是指利用大型机器学习模型(如深度学习模型)来增强或改进各种应用和服务。这种技术在许多领域都显示出了巨大的潜力,包括但不限于以下几个方面: 1. 企业服务:大模型可以用于构建智能客服系统、知识库问答系统等,提升企业的服务质量和运营效率。 2. 教育服务:在教育领域,大模型被应用于个性化学习、智能辅导、作业批改等,帮助教师减轻工作负担,提高教学质量。 3. 工业智能化:大模型有助于解决工业领域的复杂性和不确定性问题,尽管在认知能力方面尚未完全具备专家级的复杂决策能力。 4. 消费
    丙丁先生 2025-01-07 09:25 77浏览
  • 本文介绍Linux系统更换开机logo方法教程,通用RK3566、RK3568、RK3588、RK3576等开发板,触觉智能RK3562开发板演示,搭载4核A53处理器,主频高达2.0GHz;内置独立1Tops算力NPU,可应用于物联网网关、平板电脑、智能家居、教育电子、工业显示与控制等行业。制作图片开机logo图片制作注意事项(1)图片必须为bmp格式;(2)图片大小不能大于4MB;(3)BMP位深最大是32,建议设置为8;(4)图片名称为logo.bmp和logo_kernel.bmp;开机
    Industio_触觉智能 2025-01-06 10:43 87浏览
  • 彼得·德鲁克被誉为“现代管理学之父”,他的管理思想影响了无数企业和管理者。然而,关于他的书籍分类,一种流行的说法令人感到困惑:德鲁克一生写了39本书,其中15本是关于管理的,而其中“专门写工商企业或为企业管理者写的”只有两本——《为成果而管理》和《创新与企业家精神》。这样的表述广为流传,但深入探讨后却发现并不完全准确。让我们一起重新审视这一说法,解析其中的矛盾与根源,进而重新认识德鲁克的管理思想及其著作的真正价值。从《创新与企业家精神》看德鲁克的视角《创新与企业家精神》通常被认为是一本专为企业管
    优思学院 2025-01-06 12:03 113浏览
  • By Toradex 秦海1). 简介嵌入式平台设备基于Yocto Linux 在开发后期量产前期,为了安全以及提高启动速度等考虑,希望将 ARM 处理器平台的 Debug Console 输出关闭,本文就基于 NXP i.MX8MP ARM 处理器平台来演示相关流程。 本文所示例的平台来自于 Toradex Verdin i.MX8MP 嵌入式平台。  2. 准备a). Verdin i.MX8MP ARM核心版配合Dahlia载板并
    hai.qin_651820742 2025-01-07 14:52 38浏览
  •     为控制片内设备并且查询其工作状态,MCU内部总是有一组特殊功能寄存器(SFR,Special Function Register)。    使用Eclipse环境调试MCU程序时,可以利用 Peripheral Registers Viewer来查看SFR。这个小工具是怎样知道某个型号的MCU有怎样的寄存器定义呢?它使用一种描述性的文本文件——SVD文件。这个文件存储在下面红色字体的路径下。    例:南京沁恒  &n
    电子知识打边炉 2025-01-04 20:04 98浏览
  • 自动化已成为现代制造业的基石,而驱动隔离器作为关键组件,在提升效率、精度和可靠性方面起到了不可或缺的作用。随着工业技术不断革新,驱动隔离器正助力自动化生产设备适应新兴趋势,并推动行业未来的发展。本文将探讨自动化的核心趋势及驱动隔离器在其中的重要角色。自动化领域的新兴趋势智能工厂的崛起智能工厂已成为自动化生产的新标杆。通过结合物联网(IoT)、人工智能(AI)和机器学习(ML),智能工厂实现了实时监控和动态决策。驱动隔离器在其中至关重要,它确保了传感器、执行器和控制单元之间的信号完整性,同时提供高
    腾恩科技-彭工 2025-01-03 16:28 170浏览
  • 每日可见的315MHz和433MHz遥控模块,你能分清楚吗?众所周知,一套遥控设备主要由发射部分和接收部分组成,发射器可以将控制者的控制按键经过编码,调制到射频信号上面,然后经天线发射出无线信号。而接收器是将天线接收到的无线信号进行解码,从而得到与控制按键相对应的信号,然后再去控制相应的设备工作。当前,常见的遥控设备主要分为红外遥控与无线电遥控两大类,其主要区别为所采用的载波频率及其应用场景不一致。红外遥控设备所采用的射频信号频率一般为38kHz,通常应用在电视、投影仪等设备中;而无线电遥控设备
    华普微HOPERF 2025-01-06 15:29 125浏览
  • 在智能家居领域中,Wi-Fi、蓝牙、Zigbee、Thread与Z-Wave等无线通信协议是构建短距物联局域网的关键手段,它们常在实际应用中交叉运用,以满足智能家居生态系统多样化的功能需求。然而,这些协议之间并未遵循统一的互通标准,缺乏直接的互操作性,在进行组网时需要引入额外的网关作为“翻译桥梁”,极大地增加了系统的复杂性。 同时,Apple HomeKit、SamSung SmartThings、Amazon Alexa、Google Home等主流智能家居平台为了提升市占率与消费者
    华普微HOPERF 2025-01-06 17:23 141浏览
  • 随着市场需求不断的变化,各行各业对CPU的要求越来越高,特别是近几年流行的 AIOT,为了有更好的用户体验,CPU的算力就要求更高了。今天为大家推荐由米尔基于瑞芯微RK3576处理器推出的MYC-LR3576核心板及开发板。关于RK3576处理器国产CPU,是这些年的骄傲,华为手机全国产化,国人一片呼声,再也不用卡脖子了。RK3576处理器,就是一款由国产是厂商瑞芯微,今年第二季推出的全新通用型的高性能SOC芯片,这款CPU到底有多么的高性能,下面看看它的几个特性:8核心6 TOPS超强算力双千
    米尔电子嵌入式 2025-01-03 17:04 55浏览
  • 根据环洋市场咨询(Global Info Research)项目团队最新调研,预计2030年全球无人机锂电池产值达到2457百万美元,2024-2030年期间年复合增长率CAGR为9.6%。 无人机锂电池是无人机动力系统中存储并释放能量的部分。无人机使用的动力电池,大多数是锂聚合物电池,相较其他电池,锂聚合物电池具有较高的能量密度,较长寿命,同时也具有良好的放电特性和安全性。 全球无人机锂电池核心厂商有宁德新能源科技、欣旺达、鹏辉能源、深圳格瑞普和EaglePicher等,前五大厂商占有全球
    GIRtina 2025-01-07 11:02 61浏览
  • 村田是目前全球量产硅电容的领先企业,其在2016年收购了法国IPDiA头部硅电容器公司,并于2023年6月宣布投资约100亿日元将硅电容产能提升两倍。以下内容主要来自村田官网信息整理,村田高密度硅电容器采用半导体MOS工艺开发,并使用3D结构来大幅增加电极表面,因此在给定的占位面积内增加了静电容量。村田的硅技术以嵌入非结晶基板的单片结构为基础(单层MIM和多层MIM—MIM是指金属 / 绝缘体/ 金属) 村田硅电容采用先进3D拓扑结构在100um内,使开发的有效静电容量面积相当于80个
    知白 2025-01-07 15:02 65浏览
我要评论
0
点击右上角,分享到朋友圈 我知道啦
请使用浏览器分享功能 我知道啦