UAC麦克风输入终端描述符
2021-07-23
751
0
输入终端描述符在拓扑结构中表示数据的来源端。
该UAC麦克风输入终端描述符的数据配置如下:
关于输入终端描述符的解释见:http://www.usbzh.com/article/detail-180.html
输入终端描述符结构体和数据初始化代码如下:
/* 4.3.2.1 Input Terminal Descriptor */
struct uac_input_terminal_descriptor {
__u8 bLength; /* in bytes: 12 */
__u8 bDescriptorType; /* CS_INTERFACE descriptor type */
__u8 bDescriptorSubtype; /* INPUT_TERMINAL descriptor subtype */
__u8 bTerminalID; /* Constant uniquely terminal ID */
__le16 wTerminalType; /* USB Audio Terminal Types */
__u8 bAssocTerminal; /* ID of the Output Terminal associated */
__u8 bNrChannels; /* Number of logical output channels */
__le16 wChannelConfig;
__u8 iChannelNames;
__u8 iTerminal;
}
__attribute__((packed));
static struct uac_input_terminal_descriptor microphone_input_terminal_desc = {.bLength = UAC_DT_INPUT_TERMINAL_SIZE,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubtype = UAC_INPUT_TERMINAL,
.bTerminalID = MICROPHONE_INPUT_TERMINAL_ID,
.wTerminalType = UAC_INPUT_TERMINAL_MICROPHONE,
.bAssocTerminal = MICROPHONE_OUTPUT_TERMINAL_ID,
.bNrChannels = 1,
.wChannelConfig = 0x3,
};
通过Free Device Monitoring Studio抓取该设备的输入终端描述符信息:
- descriptors[3] = “Class-Specific Interface Descriptor”
- bLength = 12
- bDescriptorType = CS_INTERFACE (36)
- bDescriptorSubtype = 2
- ac_interface =
- input_terminal =
- bTerminalID = 1
- wTerminalType = 513
- bAssocTerminal = 2
- bCSourceID = 1
- bNrChannels = 3
- bmChannelConfig = 150994944
- iChannelNames = 36
- terminal_control =
- terminal =
- CopyProtect = 3
- ConnectorControl = 0
- OverloadControl = 0
- ClusterControl = 0
- UnderflowControl = 2
- OverflowControl = 0
- Reserved = 0
- bmControls = 0000001000000011
- iTerminal = 1
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936