HI All,
I am developing a usb high speed test device that resembles a Headphone set with microphone.There r 2 interfaces in my devices with one endpoint in each.
Interface1 has ISOCHRONOUS OUT endpoint and associated descriptors
interface2 has ISOCHRONOUS IN endpoint and associated descriptors
When I change the bInterval settings of ISOC IN endpoint (interface2, Audio data desc) to 1 and try to do ISOC IN transfer host comes up with an error 87 or
(USBD error)C0000B00. if the setting is set to 4 it works fine. let me know the solution for this problem.
Also only very first transaction is going on the bus and the other results in error C0000011i.e. If ISOC IN is done first it succeeds and ISOC OUT after IN fails. If OUT first and IN second, OUT succeeds and IN fails.
Please let me know solutions to the above problems. the following are the descriptor settings I have used. Let me know if something is wrong with them.
The descriptor settings are as follows
AUDIO_CONFIGURATION Audio_HS_Configuration =
{
// Configuration when connected to a High Speed Host
{ // Configuration Descriptor
sizeof(CONFIG_DESC), // 0x00 bLength: Length of this descriptor
0x02,
sizeof(AUDIO_CONFIGURATION), // 0x02 wTotalLengthLo: Total length for this configuration (LSB)
// 0x03 wTotalLengthHi: Total length for this configuration (MSB)
0x03, // 0x04 bNumInterfaces: Number of Interfaces
0x01, // 0x05 bConfigurationValue: Number of this configuration
0x00, // 0x06 iConfiguration: Index of string descriptor describing this configuration
0x80, // 0x07 bmAttributes: 7:AlwaysSet|6:SelfPowered|5:RemoteWakeup
0x20, // 0x08 bMaxPower: Max USB power (in 2mA units)
},
{ // Interface Descriptor
sizeof(IF_DESC),
// 0x00 Size of this descriptor
GETDESC_IF, // 0x04 Type
0x00, // 0x02 Number of this interface
0x00, // 0x03 Alternate interface
0x00, // 0x04 Number of endpoints in this interface (without EP0)
DEVICE_CLASS_AUDIO, // 0x05 Class Code
AUDIO_CONTROL, // 0x06 Sub Class Code
0x00, // 0x07 Device Protocol
0x00, // 0x08 Index of string descriptor describing this interface
},
{ // USB Audio Class-Specific AC Interface header Descriptor
sizeof(AC_INTERFACE_HEADER_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
HEADER, // bDescriptorSubtype
ADC_VERSION, // bcdADC - Audio Class 1.0
(sizeof(AC_INTERFACE_HEADER_DESCRIPTOR) + // wTotalLength
sizeof(INPUT_TERMINAL_DESCRIPTOR) +
sizeof(OUTPUT_TERMINAL_DESCRIPTOR)+
sizeof(INPUT_TERMINAL_DESCRIPTOR) +
sizeof(OUTPUT_TERMINAL_DESCRIPTOR)),
0x02, // bInCollection
0x01, // baInterfaceNr1
0x02, // baInterfaceNr2
},
{ // USB Audio Input Terminal Descriptor – Speaker
sizeof(INPUT_TERMINAL_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
INPUT_TERMINAL, // bDescriptorSubtype
0x03, // bTerminalId
USB_STREAMING, // wTerminalType (Streaming)
0x04, // bAssocTerminal
0x01, // bNrChannels
0x0000, // wChannelConfig
0x00, // iChannelNames
0x00, // iTerminal
},
{ // USB Audio Output Terminal Descriptor-- Speaker
sizeof(OUTPUT_TERMINAL_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
OUTPUT_TERMINAL, // bDescriptorSubtype
0x04, // bTerminalId
SPEAKER, // wTerminalType (Speaker)
0x03, // bAssocTerminal
0x03, // bSourceId
0x00, // iTerminal
},
{ // USB Audio Input Terminal Descriptor – Microphone
sizeof(INPUT_TERMINAL_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
INPUT_TERMINAL, // bDescriptorSubtype
0x01, // bTerminalId
MICROPHONE, // wTerminalType (MicroPhone)
0x02, // bAssocTerminal
0x01, // bNrChannels
0x0000, // wChannelConfig
0x00, // iChannelNames
0x00, // iTerminal
},
{ // USB Audio Output Terminal Descriptor-- Microphone
sizeof(OUTPUT_TERMINAL_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
OUTPUT_TERMINAL, // bDescriptorSubtype
0x02, // bTerminalId
USB_STREAMING, // wTerminalType (Streaming)
0x01, // bAssocTerminal
0x01, // bSourceId
0x00 // iTerminal
},
{ // USB Audio Standard AS Interface Descriptor (Alt. Set. 0)
sizeof(IF_DESC), // bLength
GETDESC_IF, // bDescriptorType
AUDIO_STREAMING_INTERFACE_NUM, // bInterfaceNumber
0x00, // bAlternateSetting
0x00, // bNumEndpoints
DEVICE_CLASS_AUDIO, // bInterfaceClass
AUDIO_STREAMING, // bInterfaceSubclass
0x00, // bInterfaceProtocol
0x00 // iInterface
},
{ // USB Audio Standard AS Interface Descriptor (Alt. Set. 1)
sizeof(IF_DESC), // bLength
GETDESC_IF, // bDescriptorType
AUDIO_STREAMING_INTERFACE_NUM, // bInterfaceNumber
0x01, // bAlternateSetting
0x01, // bNumEndpoints
DEVICE_CLASS_AUDIO, // bInterfaceClass
AUDIO_STREAMING, // bInterfaceSubclass
0x00, // bInterfaceProtocol
0x00, // iInterface
},
{ // USB Audio Class-Specific AS General Interface Descriptor
sizeof(AS_GENERAL_INTERFACE_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
AS_GENERAL, // bDescriptorSubtype
0x04, // bTerminalLink
0x01, // bDelay
PCM_FORMAT, // wFormatTag
},
{ // USB Audio Type 1 Format Type Descriptor
sizeof(TYPE1_FORMAT_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
FORMAT_TYPE, // bDescriptorSubtype
FORMAT_TYPE_I, // bFormatType
0x01, // bNrChannels
0x02, // bSubFrameSize
0x10, // bBitResolution
0x00, // bSamFreqType
0x44, // tSamFreq = 0x0AC44 (44.1kHz)
0xAC,
0x00,
},
{
sizeof(CLASS_EP_DESC), // BYTE bLength
GETDESC_EP, // BYTE bDescriptorType
EP2, // BYTE bEndpointAddress
EP_TYPE_ISOC, // BYTE bmAttributes
MAXP_SIZE_1024BYTE, // BYTE wMaxPacketSize
0x04, // BYTE bInterval
0x00, // BYTE bRefresh
0x00, // BYTE bSyncAddress
},
{ // USB Audio Class-Specific Isoc. Audio Data Endpoint Descriptor
sizeof(AUDIO_DATA_ENDPOINT_DESCRIPTOR), // bLength
CS_ENDPOINT, // bDescriptorType
EP_GENERAL, // bDescriptorSubtype
0x00, // bmAttributes
0x00, // bLockDelayUnits
0x0000, // wLockDelay
},
{ // USB Audio Standard AS Interface Descriptor (Alt. Set. 0)
sizeof(IF_DESC), // bLength
GETDESC_IF, // bDescriptorType
0x02, // bInterfaceNumber
0x00, // bAlternateSetting
0x00, // bNumEndpoints
DEVICE_CLASS_AUDIO, // bInterfaceClass
AUDIO_STREAMING, // bInterfaceSubclass
0x00, // bInterfaceProtocol
0x00 // iInterface
},
{ // USB Audio Standard AS Interface Descriptor (Alt. Set. 1)
sizeof(IF_DESC), // bLength
GETDESC_IF, // bDescriptorType
0x02, // bInterfaceNumber
0x01, // bAlternateSetting
0x01, // bNumEndpoints
DEVICE_CLASS_AUDIO, // bInterfaceClass
AUDIO_STREAMING, // bInterfaceSubclass
0x00, // bInterfaceProtocol
0x00, // iInterface
},
{ // USB Audio Class-Specific AS General Interface Descriptor
sizeof(AS_GENERAL_INTERFACE_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
AS_GENERAL, // bDescriptorSubtype
0x02, // bTerminalLink
0x01, // bDelay
PCM_FORMAT, // wFormatTag
},
{ // USB Audio Type 1 Format Type Descriptor
sizeof(TYPE1_FORMAT_DESCRIPTOR), // bLength
CS_INTERFACE, // bDescriptorType
FORMAT_TYPE, // bDescriptorSubtype
FORMAT_TYPE_I, // bFormatType
0x01, // bNrChannels
0x01, // bSubFrameSize
0x10, // bBitResolution
0x01, // bSamFreqType
0x80, // tSamFreq = 0x00BB80 (48.1kHz)
0xBB,
0x00,
},
{
sizeof(CLASS_EP_DESC), /* BYTE bLength; */
GETDESC_EP, /* BYTE bDescriptorType; */
(EP_DIR_IN | EP1), /* BYTE bEndpointAddress; */
EP_TYPE_ISOC, /* BYTE bmAttributes; */
MAXP_SIZE_1024BYTE | THREE_TRANSACTIONS,/* BYTE wMaxPacketSize; */
0x01, /* BYTE bInterval; */
0x00, /* BYTE bRefresh */
0x00, /* BYTE bSyncAddress */
},
{ // USB Audio Class-Specific Isoc. Audio Data Endpoint Descriptor
sizeof(AUDIO_DATA_ENDPOINT_DESCRIPTOR), // bLength
CS_ENDPOINT, // bDescriptorType
EP_GENERAL, // bDescriptorSubtype
0x00, // bmAttributes
0x00, // bLockDelayUnits
0x0000, // wLockDelay
},
Thanks
Ravi
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping