Home > other >  Help: usb audio hid device configuration descriptor is invalid: four interfaces, 1 AC, 2 AS, one hid
Help: usb audio hid device configuration descriptor is invalid: four interfaces, 1 AC, 2 AS, one hid

Time:09-21

Four interface, 1 AC, 2 AS a HID, play is a dual channel, the recording is single channel, originally also dual channel configuration descriptor in the recording, the code is also no problem, I now instead of single channel, there is a problem, protocol is: usb1.1 version, version of the usb audio1.0
Recording topology is: IT4 - FU5 - OT2 - Endpoint2 (such as endpoint 2 is when input endpoint)
Const uint8_t gu8ConfigDescriptor []=
{
LEN_CONFIG,
DESC_CONFIG,
0 XDB, 0 x00,
0 x04, bNumInterfaces/* */
0 x01, bConfigurationValue/* */
0 x00, iConfiguration/* */
0 x80, bmAttributes/* */
0 x20, Max power *//*

/* Standard AC inteface */
0 x09,
0 x04,
0 x00,
0 x00,
0 x00,
0 x01,
0 x01,
0 x00,
0 x00,

/* Class - spec AC interface descriptor */
0 x0a,
0 x24,
0 x01,/* bDescriptorSubType: HEADER */
0 x00 to 0 x01, 1.0 *//* bcdADC:
WTotalLength x47 0, 0 x00,/* */
0 x02, bInCollection/* */
0 x01,/* baInterfaceNr (1) the out audiostreaming interface */
0 x02,/* baInterfaceNr (n) */

/* dar 1: Input for usb streaming */
0 x0c, bLength/* */
0 x24,/* bDescriptorType: CS_INTERFACE */
0 x02, bDescriptorSubType/* */
0 x01, bTerminalID/* */
0 x01, 0 x01,/* wTerminalType: 0 x0101 usb streaming */
0 x00, bAssocTerminal/* */
BNrChannels PLAY_CHANNELS,/* */
WChannelConfig PLAY_CH_CFG, 0 x00,/* */
0 x00, iChannelNames/* */
0 x00, iTerminal/* */

/* the UNIT ID 5: Feature UNIT */
0 x09, bLength/* */
0 x24, bDescriptorType/* */
0 x06, bDescriptorSubType/* */
BUnitID REC_FEATURE_UNITID,/* */
0 x04, bSourceID/* */
0 x01, bControlSize/* */
0 x01,/* bmaControls (0) */
0 x02,/* bmaControls (0) */
//0 x02,/* bmaControls (0) */
0 x00, iFeature/* */

/* TID 2: the Output Terminal for usb streaming */
0 x09, bLength/* */
0 x24,/* bDescriptorType: CS_INTERFACE */
0 x03,/* bDescriptorSubType: OUTPUT_TERMINAL */
0 x02, bTerminalID/* */
0 x01, 0 x01,/* wTerminalType: 0 x0101 usb streaming */
0 x00, bAssocTerminal/* */
BSourceID REC_FEATURE_UNITID,/* */
0 x00, iTerminal/* */

/* the UNIT ID 6: Feature UNIT */
0 x0a,
0 x24,
0 x06,
BUnitID PLAY_FEATURE_UNITID,/* */
0 x01,
0 x01,
0 x01,/* bmaControls (0) */
0 x02,/* bmaControls (0) */
0 x02,/* bmaControls (0) */
0 x00, iFeature/* */

/* dar 3: the Output for speaker */
0 x09, bLength/* */
0 x24,/* bDescriptorType: CS_INTERFACE */
0 x03,/* bDescriptorSubType: OUTPUT_TERMINAL */
0 x03, bTerminalID/* */
0 x01, 0 x03,/* wTerminalType: 0 x0301 speaker */
0 x00, bAssocTerminal/* */
0 x06, bSourceID/* */
0 x00, iTerminal/* */

/* dar 4: Input Terminal for microphone */
0 x0c, bLength/* */
0 x24,/* bDescriptorType: CS_INTERFACE */
0 x02,/* bDescriptorSubType: INPUT_TERMINAL */
0 x04, bTerminalID/* */
0 x01, 0 x02,/* wTerminalType: 0 x0201 microphone */
0 x00, bAssocTerminal/* */
BNrChannels REC_CHANNELS,/* */
WChannelConfig REC_CH_CFG, 0 x00,/* */
0 x00, iChannelNames/* */
0 x00, iTerminal/* */

/* Standard AS interface 1, alternate 0 */
0 x09, bLength/* */
0 x04, bDescriptorType/* */
0 x01, bInterfaceNumber/* */
0 x00, bAlternateSetting/* */
0 x00, bNumEndpoints/* */
0 x01,/* bInterfaceClass: AUDIO */
BInterfaceSubClass: 0 x02,/* AUDIOSTREAMING */
0 x00, bInterfaceProtocol/* */
0 x00, iInterface/* */

/* Standard AS interface 1, alternate 1 */
0 x09, bLength/* */
0 x04, bDescriptorType/* */
0 x01, bInterfaceNumber/* */
0 x01, bAlternateSetting/* */
0 x01, bNumEndpoints/* */
0 x01,/* bInterfaceClass: AUDIO */
BInterfaceSubClass: 0 x02,/* AUDIOSTREAMING */
0 x00, bInterfaceProtocol/* */
0 x00, iInterface/* */

/* Class - the spec AS interface, this interface 's endpoint connect to dar 0 x02 */
0 x07, bLength/* */
0 x24,/* bDescriptorType: CS_INTERFACE */
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related