华为UAC耳机 音频控制接口
2021-02-08
2151
0
音频控制接口占用接口ID=0,音频控制接口的描述符结构布局如下:
USB标准接口描述符 | |||
---|---|---|---|
UAC音频控制接口头描述符 | ID | SId | 描述 |
音频控制输入终端描述符 | 1 | USB Streaming | |
音频控制特效单元描述符 | 2 | 1 | Audio Control Feature Unit |
音频控制输出终端描述符 | 3 | 2 | HeadPhone |
音频控制输入终端描述符 | 4 | MicroPhone | |
音频控制输出终端描述符 | 5 | 4 | USB Streaming |
耳机(HeadPhone)
其中ID为1,2,3是用于耳机(HeadPhone),其逻辑拓扑结构如下:
HeadPhone3 <== [Audio Control Feature Unit]2 <==[USB Streaming]1 <=== [USB BUS] <=== [PC]
在其音频控制特效单元描述符中,支持静音(Mute)和音量的控制(volume)。
麦克风(MicroPhone)
ID为 4和5有用于麦克风(MicroPhone),其逻辑拓扑结构如下:
Microphone4 ====> [USB Streaming]5 ===> [USB Bus] ===> [PC]
---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x00
bAlternateSetting : 0x00
bNumEndpoints : 0x00 (Default Control Pipe only)
bInterfaceClass : 0x01 (Audio)
bInterfaceSubClass : 0x01 (Audio Control)
bInterfaceProtocol : 0x00
iInterface : 0x00 (No String Descriptor)
Data (HexDump) : 09 04 00 00 00 01 01 00 00 .........
------ Audio Control Interface Header Descriptor ------
bLength : 0x0A (10 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x01 (Header)
bcdADC : 0x0100
wTotalLength : 0x0041 (65 bytes)
bInCollection : 0x02
baInterfaceNr[1] : 0x01
baInterfaceNr[2] : 0x02
Data (HexDump) : 0A 24 01 00 01 41 00 02 01 02 .$...A....
------- Audio Control Input Terminal Descriptor ------- 耳机,输入是流,输出是HeadPhone
bLength : 0x0C (12 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x02 (Input Terminal)
bTerminalID : 0x01
wTerminalType : 0x0101 (USB streaming)
bAssocTerminal : 0x00
bNrChannels : 0x02 (2 channels)
wChannelConfig : 0x0003 (L, R)
iChannelNames : 0x00 (No String Descriptor)
iTerminal : 0x00 (No String Descriptor)
Data (HexDump) : 0C 24 02 01 01 01 00 02 03 00 00 00 .$..........
-------- Audio Control Feature Unit Descriptor --------
bLength : 0x0D (13 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x06 (Feature Unit)
bUnitID : 0x02 (2)
bSourceID : 0x01 (1)
bControlSize : 0x02 (2 bytes per control)
bmaControls[0] : 0x03, 0x00
D0: Mute : 1
D1: Volume : 1
D2: Bass : 0
D3: Mid : 0
D4: Treble : 0
D5: Graphic Equalizer : 0
D6: Automatic Gain : 0
D7: Delay : 0
D8: Bass Boost : 0
D9: Loudness : 0
D10: Reserved : 0
D11: Reserved : 0
D12: Reserved : 0
D13: Reserved : 0
D14: Reserved : 0
D15: Reserved : 0
bmaControls[1] : 0x00, 0x00
D0: Mute : 0
D1: Volume : 0
D2: Bass : 0
D3: Mid : 0
D4: Treble : 0
D5: Graphic Equalizer : 0
D6: Automatic Gain : 0
D7: Delay : 0
D8: Bass Boost : 0
D9: Loudness : 0
D10: Reserved : 0
D11: Reserved : 0
D12: Reserved : 0
D13: Reserved : 0
D14: Reserved : 0
D15: Reserved : 0
bmaControls[2] : 0x00, 0x00
D0: Mute : 0
D1: Volume : 0
D2: Bass : 0
D3: Mid : 0
D4: Treble : 0
D5: Graphic Equalizer : 0
D6: Automatic Gain : 0
D7: Delay : 0
D8: Bass Boost : 0
D9: Loudness : 0
D10: Reserved : 0
D11: Reserved : 0
D12: Reserved : 0
D13: Reserved : 0
D14: Reserved : 0
D15: Reserved : 0
iFeature : 0x00 (No String Descriptor)
Data (HexDump) : 0D 24 06 02 01 02 03 00 00 00 00 00 00 .$...........
------- Audio Control Output Terminal Descriptor ------ 耳机
bLength : 0x09 (9 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x03 (Output Terminal)
bTerminalID : 0x03
wTerminalType : 0x0302 (Headphones)
bAssocTerminal : 0x00 (0)
bSourceID : 0x02 (2)
iTerminal : 0x00 (No String Descriptor)
Data (HexDump) : 09 24 03 03 02 03 00 02 00 .$.......
------- Audio Control Input Terminal Descriptor ------- 麦克风 输入是MicroPhone,输出是USB streaming
bLength : 0x0C (12 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x02 (Input Terminal)
bTerminalID : 0x04
wTerminalType : 0x0201 (Microphone)
bAssocTerminal : 0x00
bNrChannels : 0x02 (2 channels)
wChannelConfig : 0x0003 (L, R)
iChannelNames : 0x00 (No String Descriptor)
iTerminal : 0x00 (No String Descriptor)
Data (HexDump) : 0C 24 02 04 01 02 00 02 03 00 00 00 .$..........
------- Audio Control Output Terminal Descriptor ------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x03 (Output Terminal)
bTerminalID : 0x05
wTerminalType : 0x0101 (USB streaming)
bAssocTerminal : 0x00 (0)
bSourceID : 0x04 (4)
iTerminal : 0x00 (No String Descriptor)
Data (HexDump) : 09 24 03 05 01 01 00 04 00
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936