- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi :
I want to implemented a UVC( USB video class) board using 68013a, so I can use the USBvideo.sys driver by Windows XP;
According to UVC hardware spec, several changes needed to be done with the device and configure descriptors,
My change is done with a reference of the below code:
/* Standard High Speed Configuration Descriptor */
const uint8_t CyFxUSBHSConfigDscr[] =
{
/* Configuration descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_CONFIG_DESCR, /* Configuration descriptor type */
0xBD,0x00, /* Length of this descriptor and all sub descriptors */
0x02, /* Number of interfaces */
0x01, /* Configuration number */
0x00, /* COnfiguration string index */
0x80, /* Config characteristics - bus powered */
0xFA, /* Max power consumption of device (in 2mA unit) : 500mA */
/* Interface association descriptor */
0x08, /* Descriptor size */
CY_FX_INTF_ASSN_DSCR_TYPE, /* Interface association descr type */
0x00, /* I/f number of first video control i/f */
0x02, /* Number of video streaming i/f */
0x0E, /* CC_VIDEO : Video i/f class code */
0x03, /* SC_VIDEO_INTERFACE_COLLECTION : subclass code */
0x00, /* Protocol : not used */
0x00, /* String desc index for interface */
/* Standard video control interface descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_INTRFC_DESCR, /* Interface descriptor type */
0x00, /* Interface number */
0x00, /* Alternate setting number */
0x01, /* Number of end points */
0x0E, /* CC_VIDEO : Interface class */
0x01, /* CC_VIDEOCONTROL : Interface sub class */
0x00, /* Interface protocol code */
0x00, /* Interface descriptor string index */
/* Class specific VC interface header descriptor */
0x0D, /* Descriptor size */
0x24, /* Class Specific I/f header descriptor type */
0x01, /* Descriptor sub type : VC_HEADER */
0x00,0x01, /* Revision of class spec : 1.0 */
0x50,0x00, /* Total size of class specific descriptors (till output terminal) */
0x00,0x6C,0xDC,0x02, /* Clock frequency : 48MHz */
0x01, /* Number of streaming interfaces */
0x01, /* Video streaming I/f 1 belongs to VC i/f */
/* Input (camera) terminal descriptor */
0x12, /* Descriptor size */
0x24, /* Class specific interface desc type */
0x02, /* Input Terminal Descriptor type */
0x01, /* ID of this terminal */
0x01,0x02, /* Camera terminal type */
0x00, /* No association terminal */
0x00, /* String desc index : not used */
0x00,0x00, /* No optical zoom supported */
0x00,0x00, /* No optical zoom supported */
0x00,0x00, /* No optical zoom supported */
0x03, /* Size of controls field for this terminal : 3 bytes */
0x00,0x00,0x00, /* No controls supported */
/* Processing unit descriptor */
0x0C, /* Descriptor size */
0x24, /* Class specific interface desc type */
0x05, /* Processing unit descriptor type */
0x02, /* ID of this terminal */
0x01, /* Source ID : 1 : conencted to input terminal */
0x00,0x40, /* Digital multiplier */
0x03, /* Size of controls field for this terminal : 3 bytes */
0x00,0x00,0x00, /* No controls supported */
0x00, /* String desc index : not used */
/* Extension unit descriptor */
0x1C, /* Descriptor size */
0x24, /* Class specific interface desc type */
0x06, /* Extension unit descriptor type */
0x03, /* ID of this terminal */
0xFF,0xFF,0xFF,0xFF, /* 16 byte GUID */
0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,
0x00, /* Number of controls in this terminal */
0x01, /* Number of input pins in this terminal */
0x02, /* Source ID : 2 : connected to proc unit */
0x03, /* Size of controls field for this terminal : 3 bytes */
0x00,0x00,0x00, /* No controls supported */
0x00, /* String desc index : not used */
/* Output terminal descriptor */
0x09, /* Descriptor size */
0x24, /* Class specific interface desc type */
0x03, /* Output terminal descriptor type */
0x04, /* ID of this terminal */
0x01,0x01, /* USB Streaming terminal type */
0x00, /* No association terminal */
0x03, /* Source ID : 3 : connected to extn unit */
0x00, /* String desc index : not used */
/* Video control status interrupt endpoint descriptor */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type */
CY_FX_EP_CONTROL_STATUS, /* Endpoint address and description */
CY_U3P_USB_EP_INTR, /* Interrupt end point type */
0x40,0x00, /* Max packet size = 64 bytes */
0x08, /* Servicing interval : 8ms */
/* Class specific interrupt endpoint descriptor */
0x05, /* Descriptor size */
0x25, /* Class specific endpoint descriptor type */
CY_U3P_USB_EP_INTR, /* End point sub type */
0x40,0x00, /* Max packet size = 64 bytes */
/* Standard video streaming interface descriptor (alternate setting 0) */
0x09, /* Descriptor size */
CY_U3P_USB_INTRFC_DESCR, /* Interface descriptor type */
0x01, /* Interface number */
0x00, /* Alternate setting number */
0x01, /* Number of end points : zero bandwidth */
0x0E, /* Interface class : CC_VIDEO */
0x02, /* Interface sub class : CC_VIDEOSTREAMING */
0x00, /* Interface protocol code : undefined */
0x00, /* Interface descriptor string index */
/* Endpoint descriptor for streaming video data */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type */
CY_FX_EP_BULK_VIDEO, /* Endpoint address and description */
CY_U3P_USB_EP_BULK, /* Bulk Endpoint */
0x00, 0x02, /* 512 Bytes Maximum Packet Size. */
0x00, /* Servicing interval for data transfers */
/* Class-specific video streaming input header descriptor */
0x0E, /* Descriptor size */
0x24, /* Class-specific VS i/f type */
0x01, /* Descriptotor subtype : input header */
0x01, /* 1 format desciptor follows */
0x19,0x00, /* Total size of class specific VS descr */
CY_FX_EP_BULK_VIDEO, /* EP address for BULK video data */
0x00, /* No dynamic format change supported */
0x04, /* Output terminal ID : 4 */
0x01, /* Still image capture method 1 supported */
0x01, /* Hardware trigger supported for still image */
0x00, /* Hardware to initiate still image capture */
0x01, /* Size of controls field : 1 byte */
0x00, /* D2 : Compression quality supported */
/* Class specific VS format descriptor */
0x0B, /* Descriptor size */
0x24, /* Class-specific VS i/f type */
0x06, /* Descriptotor subtype : VS_FORMAT_MJPEG */
0x01, /* Format desciptor index */
0x01, /* 1 Frame desciptor follows */
0x01, /* Uses fixed size samples */
0x01, /* Default frame index is 1 */
0x00, /* Non interlaced stream not reqd. */
0x00, /* Non interlaced stream not reqd. */
0x00, /* Non interlaced stream */
0x00, /* CopyProtect: duplication unrestricted */
/* Class specific VS frame descriptor */
0x1E, /* Descriptor size */
0x24, /* Class-specific VS I/f Type */
0x07, /* Descriptotor subtype : VS_FRAME_MJPEG */
0x01, /* Frame desciptor index */
0x00, /* Still image capture method not supported */
0xB0,0x00, /* Width of the frame : 176 */
0x90,0x00, /* Height of the frame : 144 */
0x00,0xC0,0x5D,0x00, /* Min bit rate bits/s */
0x00,0xC0,0x5D,0x00, /* Min bit rate bits/s */
0x00,0x58,0x02,0x00, /* Maximum video or still frame size in bytes */
0x2A,0x2C,0x0A,0x00, /* Default frame interval */
0x01, /* Frame interval type : No of discrete intervals */
0x2A,0x2C,0x0A,0x00 /* Frame interval 3 */
};
The results shows that the driver is not correctly setup at WIndows, it shows" USB composite device" in the device manager with yellow "!";
my question is :
how to correctly change the configure descriptors and other codes in the fireware so that Windows can recognize the device as UVC ; Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try with the Descriptors present in the attached text file.