UAC麦克风音频控制的接口描述符
2021-07-22
794
0
UAC麦克风包含一个音频控制接口,其以接口描述符为起始描述符。
描述符的关系如下:
- 接口描述符 //音频控制接口
- 类特定音频流接口描述符
- 输入终端描棕符
- 输出终端描述符
- 类特定音频流接口描述符
接口描述符的内容详见:USB接口描述符 http://www.usbzh.com/article/detail-64.html
/* USB_DT_INTERFACE: Interface descriptor */
struct usb_interface_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bInterfaceNumber;
__u8 bAlternateSetting;
__u8 bNumEndpoints;
__u8 bInterfaceClass;
__u8 bInterfaceSubClass;
__u8 bInterfaceProtocol;
__u8 iInterface;
}
__attribute__((packed));#
数据结构配置如下:
define USB_DT_INTERFACE_SIZE 9
static struct usb_interface_descriptor uac1_interface_desc = {
.bLength = USB_DT_INTERFACE_SIZE,
.bDescriptorType = USB_DT_INTERFACE,
.bInterfaceNumber = 2,
.bNumEndpoints =0,
.bInterfaceClass =USB_CLASS_AUDIO,
.bInterfaceSubClass =USB_SUBCLASS_AUDIOCONTROL, //
.iInterface= 4
};
使用Free Device Monitoring Studio 抓取信息:
- descriptors[1] = “Interface Descriptor”
- bLength = 9
- bDescriptorType = USB_INTERFACE_DESCRIPTOR_TYPE (4)
- bInterfaceNumber = 0
- bAlternateSetting = 0
- bNumEndpoints = 0
- bInterfaceClass = UsbAudio (1)
- bInterfaceSubClass = 1
- bInterfaceProtocol = 0
- iInterface = 5
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936