linux uac 设备,Linux UAC2 功能的设备描述符

UAC2 descriptor

Device Descriptor:

bLength 18

bDescriptorType 1

bcdUSB 2.00

bDeviceClass 0 (Defined at Interface level)

bDeviceSubClass 0

bDeviceProtocol 0

bMaxPacketSize0 64

idVendor 0x2207

idProduct 0x0019

bcdDevice 2.00

iManufacturer 1 rockchip

iProduct 2 USB Audio Device

iSerial 3 0123456789ABCDEF

bNumConfigurations 1

Configuration Descriptor: //配置描述符,置描述符之后紧接着就是接口描述符,接口描述符指明了接口的类型,对应的端点的数量

bLength 9

bDescriptorType 2

wTotalLength 219

bNumInterfaces 3

bConfigurationValue 1

iConfiguration 4 audio

bmAttributes 0x80

(Bus Powered)

MaxPower 500mA

Interface Association: USB复合设备一般用Interface Association Descriptor(IAD)实现,就是在要合并的接口前加上IAD描述符

bLength 8

bDescriptorType 11 //IAD描述符类型

bFirstInterface 0 //起始接口

bInterfaceCount 3 //接口数

bFunctionClass 1 Audio //类型代码

bFunctionSubClass 0 //子类型代码

bFunctionProtocol 32 //协议代码

iFunction 5 Source/Sink //描述符字符串索引

Interface Descriptor:

bLength 9

bDescriptorType 4 //描述符类型

bInterfaceNumber 0 //接口数

bAlternateSetting 0 //bAlternateSetting用于在同一个接口中的多个描述符中进行切换

bNumEndpoints 0 //端点数

bInterfaceClass 1 Audio

bInterfaceSubClass 1 Control Device

bInterfaceProtocol 32

iInterface 6 Topology Control

AudioControl Interface Descriptor: //音频设备接口标题中要包含类特定的AC接口头描述符,用于定义接口的其他功能端口。类特定的AC接口头描述符(AC接口头)

bLength 9

bDescriptorType 36 //恒定配置法定类型 USB_DTYPE_CS_INTERFACE

bDescriptorSubtype 1 (HEADER) //数字AC接口头

bcdADC 2.00 //数字音频设备发行码

bCategory 8

wTotalLength 83 //数字连接长度总长度,包括标准接口长度

bmControl 0x00

AudioControl Interface Descriptor: //音频设备频率描述/* Clock source for IN traffic */

bLength 8

bDescriptorType 36

bDescriptorSubtype 10 (CLOCK_SOURCE)

bClockID 6 //bClockID号

bmAttributes 0x01 Internal fixed Clock

bmControls 0x01

Clock Frequency Control (read-only)

bAssocTerminal 0 //恒定对应输出端口ID

iClockSource 7 48000Hz

AudioControl Interface Descriptor: //音频设备频率描述 Clock source for OUT traffic

bLength 8

bDescriptorType 36

bDescriptorSubtype 10 (CLOCK_SOURCE)

bClockID 5 //bClockID号

bmAttributes 0x01 Internal fixed Clock

bmControls 0x01

Clock Frequency Control (read-only)

bAssocTerminal 0

iClockSource 8 64000Hz

AudioControl Interface Descriptor: //音频设备的输入端口描述符, Input Terminal for USB_OUT

bLength 17

bDescriptorType 36

bDescriptorSubtype 2 (INPUT_TERMINAL)

bTerminalID 1 //端口号ID

wTerminalType 0x0101 USB Streaming

bAssocTerminal 0 //恒定对应输出端口ID

bCSourceID 5

bNrChannels 2 //通道数

bmChannelConfig 0x00000003 //数字通道配置

Front Left (FL)

Front Right (FR)

bmControls 0x0003

Copy Protect Control (read/write)

iChannelNames 0

iTerminal 9 USBH Out

AudioControl Interface Descriptor: //Input Terminal for I/O-In

bLength 17

bDescriptorType 36

bDescriptorSubtype 2 (INPUT_TERMINAL)

bTerminalID 2

wTerminalType 0x0201 Microphone

bAssocTerminal 0

bCSourceID 6

bNrChannels 2

bmChannelConfig 0x00000003

Front Left (FL)

Front Right (FR)

bmControls 0x0003

Copy Protect Control (read/write)

iChannelNames 0

iTerminal 10 USBD Out

AudioControl Interface Descriptor: //Ouput Terminal for USB_IN

bLength 12

bDescriptorType 36

bDescriptorSubtype 3 (OUTPUT_TERMINAL)

bTerminalID 4

wTerminalType 0x0101 USB Streaming

bAssocTerminal 0

bSourceID 2

bCSourceID 6

bmControls 0x0003

Copy Protect Control (read/write)

iTerminal 11 USBH In

AudioControl Interface Descriptor: //Ouput Terminal for I/O-Out

bLength 12

bDescriptorType 36

bDescriptorSubtype 3 (OUTPUT_TERMINAL)

bTerminalID 3

wTerminalType 0x0301 Speaker

bAssocTerminal 0

bSourceID 1

bCSourceID 5

bmControls 0x0003

Copy Protect Control (read/write)

iTerminal 12 USBD In

Interface Descriptor: //Audio Streaming OUT Interface - Alt0

bLength 9

bDescriptorType 4

bInterfaceNumber 1

bAlternateSetting 0

bNumEndpoints 0

bInterfaceClass 1 Audio

bInterfaceSubClass 2 Streaming

bInterfaceProtocol 32

iInterface 13 Playback Inactive

Interface Descriptor: //Audio Streaming OUT Interface - Alt1

bLength 9

bDescriptorType 4

bInterfaceNumber 1

bAlternateSetting 1

bNumEndpoints 1

bInterfaceClass 1 Audio

bInterfaceSubClass 2 Streaming

bInterfaceProtocol 32

iInterface 14 Playback Active

AudioStreaming Interface Descriptor: //Audio Stream OUT Intface Desc

bLength 16

bDescriptorType 36

bDescriptorSubtype 1 (AS_GENERAL)

bTerminalLink 1

bmControls 0x00

bFormatType 1

bmFormats 0x00000001

PCM

bNrChannels 2

bmChannelConfig 0x00000003

Front Left (FL)

Front Right (FR)

iChannelNames 0

AudioStreaming Interface Descriptor: /* Audio USB_OUT Format */

bLength 6

bDescriptorType 36

bDescriptorSubtype 2 (FORMAT_TYPE)

bFormatType 1 (FORMAT_TYPE_I)

bSubslotSize 2

bBitResolution 16

Endpoint Descriptor: /* STD AS ISO OUT Endpoint */

bLength 7

bDescriptorType 5

bEndpointAddress 0x00 EP 2 OUT

bmAttributes 9

Transfer Type Isochronous

Synch Type Adaptive

Usage Type Data

wMaxPacketSize 0x0100 1x 256 bytes

bInterval 1

AudioControl Endpoint Descriptor: /* CS AS ISO OUT Endpoint */

bLength 8

bDescriptorType 37

bDescriptorSubtype 1 (EP_GENERAL)

bmAttributes 0x00

bmControls 0x00

bLockDelayUnits 0 Undefined

wLockDelay 0

Interface Descriptor: /* Audio Streaming IN Interface - Alt0 */

bLength 9

bDescriptorType 4

bInterfaceNumber 2

bAlternateSetting 0

bNumEndpoints 0

bInterfaceClass 1 Audio

bInterfaceSubClass 2 Streaming

bInterfaceProtocol 32

iInterface 15 Capture Inactive

Interface Descriptor: /* Audio Streaming IN Interface - Alt1 */

bLength 9

bDescriptorType 4

bInterfaceNumber 2

bAlternateSetting 1

bNumEndpoints 1

bInterfaceClass 1 Audio

bInterfaceSubClass 2 Streaming

bInterfaceProtocol 32

iInterface 16 Capture Active

AudioStreaming Interface Descriptor: /* Audio Stream IN Intface Desc */

bLength 16

bDescriptorType 36

bDescriptorSubtype 1 (AS_GENERAL)

bTerminalLink 4

bmControls 0x00

bFormatType 1

bmFormats 0x00000001

PCM

bNrChannels 2

bmChannelConfig 0x00000003

Front Left (FL)

Front Right (FR)

iChannelNames 0

AudioStreaming Interface Descriptor: /* Audio USB_IN Format */

bLength 6

bDescriptorType 36

bDescriptorSubtype 2 (FORMAT_TYPE)

bFormatType 1 (FORMAT_TYPE_I)

bSubslotSize 2

bBitResolution 16

Endpoint Descriptor: /* STD AS ISO IN Endpoint */

bLength 7

bDescriptorType 5

bEndpointAddress 0x80 EP 1 IN

bmAttributes 13

Transfer Type Isochronous

Synch Type Synchronous

Usage Type Data

wMaxPacketSize 0x00c0 1x 192 bytes

bInterval 1

AudioControl Endpoint Descriptor: /* CS AS ISO IN Endpoint */

bLength 8

bDescriptorType 37

bDescriptorSubtype 1 (EP_GENERAL)

bmAttributes 0x00

bmControls 0x00

bLockDelayUnits 0 Undefined

wLockDelay 0

Device Qualifier (for other device speed):

bLength 10

bDescriptorType 6

bcdUSB 2.00

bDeviceClass 0 (Defined at Interface level)

bDeviceSubClass 0

bDeviceProtocol 0

bMaxPacketSize0 64

bNumConfigurations 1

Device Status: 0x0000

(Bus Powered)

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值