UAC麦克风输出终端描述符
2021-07-23
557
0
输出终端描述符在UAC规范的拓扑图中表示音频数据的输出端,该数据即将通过UAC的同步传输端点上报给主机。
输出终端描述符的数据配置如下:
输出终端描述符各字段的详解见:http://www.usbzh.com/article/detail-237.html
C语言结构体和初始化代码如下:
/* 4.3.2.2 Output Terminal Descriptor */
struct uac1_output_terminal_descriptor {
__u8 bLength; /* in bytes: 9 */
__u8 bDescriptorType; /* CS_INTERFACE descriptor type */
__u8 bDescriptorSubtype; /* OUTPUT_TERMINAL descriptor subtype */
__u8 bTerminalID; /* Constant uniquely terminal ID */
__le16 wTerminalType; /* USB Audio Terminal Types */
__u8 bAssocTerminal; /* ID of the Input Terminal associated */
__u8 bSourceID; /* ID of the connected Unit or Terminal*/
__u8 iTerminal;
}
__attribute__((packed));
static struct uac1_output_terminal_descriptor microphone_output_terminal_desc = {
.bLength = UAC_DT_OUTPUT_TERMINAL_SIZE,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubtype = UAC_OUTPUT_TERMINAL,
.bTerminalID = MICROPHONE_OUTPUT_TERMINAL_ID,
.wTerminalType = UAC_TERMINAL_STREAMING,
.bAssocTerminal = MICROPHONE_INPUT_TERMINAL_ID,
.bSourceID = MICROPHONE_INPUT_TERMINAL_ID,
};
通过模拟设备信息(Free Device Monitoring Studio 抓取:
- descriptors[4] = “Class-Specific Interface Descriptor”
- bLength = 9
- bDescriptorType = CS_INTERFACE (36)
- bDescriptorSubtype = 3
- ac_interface =
- output_terminal =
- bTerminalID = 2
- wTerminalType = 257
- bAssocTerminal = 1
- bSourceID = 1
- bCSourceID = 0
- bmChannelConfig = 66569
- iChannelNames = 0
- bmControls = 513
- terminal_control =
- terminal =
- CopyProtect = 0
- ConnectorControl = 0
- OverloadControl = 0
- ClusterControl = 0
- UnderflowControl = 0
- OverflowControl = 0
- Reserved = 0
- bmControls = 0000000000000000
- iTerminal = 9
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936