高级会员
- 积分
- 770
- 金钱
- 770
- 注册时间
- 2018-5-3
- 在线时间
- 192 小时
|
/* Configuration 1 */
0x09, /* bLength */
0x02, /* bDescriptorType */
LOBYTE(AUDIO_CONFIG_DESC_SIZE), /* wTotalLength 109 bytes*/
HIBYTE(AUDIO_CONFIG_DESC_SIZE),
0x03, /* bNumInterfaces */
0x01, /* bConfigurationValue */
0x00, /* iConfiguration */
0xC0, /* bmAttributes BUS Powred*/
0x32, /* bMaxPower = 100 mA*/
/* 09 byte*/
/* USB Speaker Standard interface descriptor */
0x09, /* bLength */
0x04, /* bDescriptorType */
0x00, /* bInterfaceNumber */
0x00, /* bAlternateSetting */
0x00, /* bNumEndpoints */
0x01, /* bInterfaceClass */
0x01, /* bInterfaceSubClass */
0x00, /* bInterfaceProtocol */
0x00, /* iInterface */
/* 09 byte*/
//
/* USB Speaker Class-specific AC Interface Descriptor */
0x0a, /* bLength */
0x24, /* bDescriptorType */
0x01, /* bDescriptorSubtype */
0x00, /* 1.00 */ /* bcdADC */
0x01,
0x46, /* wTotalLength = 0x27*/
0x00,
0x02, //0x02 /* bInCollection */
0x02, //0x02 /* baInterfaceNr */
0x01, //0x01
/* 0x0a byte*/
/* USB Speaker Input Terminal Descriptor */
0x0c, /* bLength */
0x24, /* bDescriptorType */
0x02, /* bDescriptorSubtype */
0x01, /* bTerminalID */
0x01, /* wTerminalType AUDIO_TERMINAL_USB_STREAMING 0x0101 */
0x01,
0x00, /* bAssocTerminal */
0x01, /* bNrChannels */
0x00, /* wChannelConfig 0x0000 Mono */
0x00,
0x00, /* iChannelNames */
0x00, /* iTerminal */
/* 12 byte*/
/* USB Speaker Audio Feature Unit Descriptor */
0x09, /* bLength */
0x24, /* bDescriptorType */
0x06, /* bDescriptorSubtype */
0x02, /* bUnitID */
0x01, /* bSourceID */
0x01, /* bControlSize */
0x0001, /* bmaControls(0) */
0x00, /* bmaControls(1) */
0x00, /* iTerminal */
/* 09 byte*/
/*USB Speaker Output Terminal Descriptor */
0x09, /* bLength */
0x24, /* bDescriptorType */
0x03, /* bDescriptorSubtype */
0x03, /* bTerminalID */
0x01, /* wTerminalType 0x0301*/
0x03,
0x00, /* bAssocTerminal */
0x02, /* bSourceID */
0x00, /* iTerminal */
/* 09 byte*/
/* USB Microphone Input Terminal Descriptor */
0x0c, /* bLength */
0x24, /* bDescriptorType */
0x02, /* bDescriptorSubtype */
0x05, /* bTerminalID */
0x01, /* wTerminalType : Microphone 0x0201 */
0x02,
0x00, /* bAssocTerminal */
0x02, /* bNrChannels í¨μàêyÄ¿*/
0x00, /* wChannelConfig : Mono sets no position bits */
0x00,
0x00, /* iChannelNames */
0x00, /* iTerminal */
/* 12 byte*/
/* USB Microphone Audio Feature Unit Descriptor */
0x09, /* bLength */
0x24, /* bDescriptorType */
0x06, /* bDescriptorSubtype */
0x06, /* bUnitID */
0x05, /* bSourceID */
0x01, /* bControlSize */
0x02, /* bmaControls(0) Mute & Volume */
0x00, /* ?? bmaControls(1) / iTerminal */
0x00,
/* 9 byte*/
/*USB Microphone Output Terminal Descriptor */
0x09, /* bLength */
0x24, /* bDescriptorType */
0x03, /* bDescriptorSubtype */
0x07, /* bTerminalID */
0x01, /* wTerminalType : USB Streaming */
0x01,
0x00, /* bAssocTerminal */
0x06, /* bSourceID */
0x00, /* iTerminal */
/* 09 byte*/
/* USB Speaker Standard AS Interface Descriptor - Audio Streaming Zero Bandwith */
/* Interface 1, Alternate Setting 0 */
AUDIO_INTERFACE_DESC_SIZE, /* bLength */
0x04, /* bDescriptorType */
0x01, /* bInterfaceNumber */
0x00, /* bAlternateSetting */
0x00, /* bNumEndpoints */
0x01, /* bInterfaceClass */
0x02, /* bInterfaceSubClass */
0x00, /* bInterfaceProtocol */
0x00, /* iInterface */
/* 09 byte*/
/* USB Speaker Standard AS Interface Descriptor - Audio Streaming Operational */
/* Interface 1, Alternate Setting 1 */
AUDIO_INTERFACE_DESC_SIZE, /* bLength */
0x04, /* bDescriptorType */
0x01, /* bInterfaceNumber */
0x01, /* bAlternateSetting */
0x01, /* bNumEndpoints CCCCCCCCCCC*/
0x01, /* bInterfaceClass */
0x02, /* bInterfaceSubClass */
0x00, /* bInterfaceProtocol */
0x00, /* iInterface */
/* 09 byte*/
/* USB Speaker Audio Streaming Interface Descriptor */
AUDIO_STREAMING_INTERFACE_DESC_SIZE, /* bLength */
0x24, /* bDescriptorType */
0x01, /* bDescriptorSubtype */
0x01, /* bTerminalLink */
0x01, /* bDelay */
0x01, /* wFormatTag AUDIO_FORMAT_PCM 0x0001*/
0x00,
/* 07 byte*/
/* USB Speaker Audio Type III Format Interface Descriptor */
0x0B, /* bLength */
0x24, /* bDescriptorType */
0x02, /* bDescriptorSubtype */
0x01, /* bFormatType */
0x02, /* bNrChannels */
0x02, /* bSubFrameSize : 2 Bytes per frame (16bits) */
16, /* bBitResolution (16-bits per sample) */
0x01, /* bSamFreqType only one frequency supported */
SAMPLE_FREQ(96000), /* Audio sampling frequency coded on 3 bytes */
/* 11 byte*/
/* Endpoint 1 - Standard Descriptor */
AUDIO_STANDARD_ENDPOINT_DESC_SIZE, /* bLength */
0x05, /* bDescriptorType */
0x01, /* bEndpointAddress 1 out endpoint*/
//USB_ENDPOINT_TYPE_ISOCHRONOUS, /* bmAttributes CCCCCCC*/
0x01,
LOBYTE(AUDIO_OUT_PACKET), /* wMaxPacketSize in Bytes (Freq(Samples)*2(Stereo)*2(HalfWord)) */
HIBYTE(AUDIO_OUT_PACKET),
0x01, /* bInterval */
0x00, /* bRefresh */
0x00, /* bSynchAddress */
/* 09 byte*/
/* Endpoint - Audio Streaming Descriptor*/
AUDIO_STREAMING_ENDPOINT_DESC_SIZE, /* bLength */
0x25, /* bDescriptorType */
0x01, /* bDescriptor */
0x00, /* bmAttributes */
0x00, /* bLockDelayUnits */
0x00, /* wLockDelay */
0x00,
/* 07 byte*/
//
/* USB Microphone Standard AS Interface Descriptor - Audio Streaming Zero Bandwith */
/* Interface 2, Alternate Setting 0 */
0x09, /* bLength */
0x04, /* bDescriptorType */
0x02, /* bInterfaceNumber */
0x00, /* bAlternateSetting */
0x00, /* bNumEndpoints */
0x01, /* bInterfaceClass */
0x02, /* bInterfaceSubClass */
0x00, /* bInterfaceProtocol */
0x00, /* iInterface */
/* 09 byte*/
/* USB Microphone Standard AS Interface Descriptor - Audio Streaming Operational */
/* Interface 2, Alternate Setting 1 */
0x09, /* bLength */
0x04, /* bDescriptorType */
0x02, /* bInterfaceNumber */
0x01, /* bAlternateSetting */
0x01, /* bNumEndpoints */
0x01, /* bInterfaceClass */
0x02, /* bInterfaceSubClass */
0x00, /* bInterfaceProtocol */
0x00, /* iInterface */
/* 09 byte*/
/* USB Microphone Audio Streaming Class-Specific Interface Descriptor */
0x07, /* bLength */
0x24, /* bDescriptorType */
0x01, /* bDescriptorSubtype */
0x07, /* bTerminalLink : Unit ID of the Output Terminal*/
0x01, /* bDelay */
0x02, /* wFormatTag : AUDIO_FORMAT_PCM */
0x00,
/* 07 byte*/
/* USB Microphone Audio Type I Format Interface Descriptor */
0x0B+12, /* bLength */
0x24, /* bDescriptorType */
0x02, /* bDescriptorSubtype */
0x01, /* bFormatType */
0x02, /* bNrChannels í¨μàêyÄ¿ */
0x03, /* bSubFrameSize : 2 Bytes per audio subframe */
0x18, /* bBitResolution : 16 bits per sample */
0x05, /* bSamFreqType only one frequency supported */
SAMPLE_FREQ(96000),
SAMPLE_FREQ(48000),
SAMPLE_FREQ(44100),
SAMPLE_FREQ(32000),
SAMPLE_FREQ(16000),/* Audio sampling frequency coded on 3 bytes */
/* 8 + 3*N byte*/
/* USB Microphone Streaming Standard Endpoint Descriptor */
0x09, /* bLength */
0x05, /* bDescriptorType */
0x81, /* bEndpointAddress : IN endpoint 1 */
0x05, /* bmAttributes ?????? */
LOBYTE(AUDIO_IN_PACKET), /* wMaxPacketSize */
HIBYTE(AUDIO_IN_PACKET),
0x01, /* bInterval : one packet per frame */
0x00, /* bRefresh */
0x00, /* bSynchAddress */
/* 09 byte*/
/* USB Microphone Class-specific Isoc. Audio Data Endpoint Descriptor */
0x07, /* bLength */
0x25, /* bDescriptorType */
0x01, /* bDescriptor */
0x01, /* bmAttributes */
0x00, /* bLockDelayUnits */
0x00, /* wLockDelay */
0x00,
/* 07 byte*/
} ;
配置的USB声卡的描述符,把16位的描述符改成24位的,描述符里面配置的是多频的,但是在电脑上面显示是单个的,而且下拉框也无法打开。
|
|