UAC麦克风实例分析
+ -

UAC麦克风输入终端描述符

2021-07-23 595 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   

0 篇笔记 写笔记

UVC 输入终端描述符
输入终端描述符用于向主机报告视频数据输入终端的相关信息。输入终端描述符使用bTerminalID描述输入终端的ID,且这个ID是惟一的。输入终端描述符位于视频控制接口中。输入终端描述符结构体定义如下:// Input Terminal Descriptortypedef struct _USB......
UAC 输入终端描述符
UAC输入终端描述符全称:Input Terminal Descriptor,简称ITD.输入终端描述符用于向主机提供输入终端的相关信息,这个概念和UVC摄像头的输入终端描述符类似。UAC输入终端描述符定义-UAC1.0typedef struct _USB_AC_IT_DESCRIPTOR{......
UAC麦克风输入终端描述符
输入终端描述符在拓扑结构中表示数据的来源端。该UAC麦克风输入终端描述符的数据配置如下:关于输入终端描述符的解释见:http://www.usbzh.com/article/detail-180.html输入终端描述符结构体和数据初始化代码如下:/* 4.3.2.1 Input Termina......
关注公众号
取消
感谢您的支持,我会继续努力的!
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

您的支持,是我们前进的动力!