UAC 双向终端类型设备(Bi-directional Terminal Types)
2022-02-22
712
1
在UAC的终端描述符里除了常见的输入终端和输出终端,也存在一些看起来很高级的类型,如双向终端类型设备(Bi-directional Terminal Types)、电话终端类型(Telephony Terminal Types)和额外扩展的终端类型(External Terminal Types)。
关于这几个比较高级的终端类型,具体的应用,我也没有仔细的研究过,不过最近说为了过一个认证,需要将MIC的设备类型该为这些高级终端类型中的一个,所以本人也试了一下,看一下效果。
这里本人将虚拟的UAC设备的输入终端类型从Microphone 0x0201改为了 Headset 0x0402。这里在设备管理器中的效果对比如下:
原始的数据配置如下:
USB_AC_IT_DESCRIPTOR* pACITDesc = (USB_AC_IT_DESCRIPTOR*)((char*)pACHeaderDesc + pACHeaderDesc->bLength);
pACITDesc->bLength = 0x0C;
pACITDesc->bDescriptorType = 0x24;
pACITDesc->bDescriptorSubtype = 0x02;
pACITDesc->bTerminalID = 0x01;
pACITDesc->wTerminalType = 0x0201;
pACITDesc->bAssocTerminal = 0x00;
pACITDesc->bNrChannels = 0x02; // XXX: 0x01
pACITDesc->wChannelConfig = 0x03; // XXX: 0x0000
pACITDesc->iChannelNames = 0x00;
pACITDesc->iTerminal = 0x00;
// Output Terminal Descriptor
USB_AC_OT_DESCRIPTOR* pACOTDesc = (USB_AC_OT_DESCRIPTOR*)((char*)pACITDesc + pACITDesc->bLength);
pACOTDesc->bLength = 0x09;
pACOTDesc->bDescriptorType = 0x24;
pACOTDesc->bDescriptorSubtype = 0x03;
pACOTDesc->bTerminalID = 0x03;
pACOTDesc->wTerminalType = 0x0101;
pACOTDesc->bAssocTerminal = 0x00;
pACOTDesc->bSourceID = 0x01;
pACOTDesc->iTerminal = 0x00;
改为0X0402后:
USB_AC_IT_DESCRIPTOR* pACITDesc = (USB_AC_IT_DESCRIPTOR*)((char*)pACHeaderDesc + pACHeaderDesc->bLength);
pACITDesc->bLength = 0x0C;
pACITDesc->bDescriptorType = 0x24;
pACITDesc->bDescriptorSubtype = 0x02;
pACITDesc->bTerminalID = 0x01;
pACITDesc->wTerminalType = 0x0402;
pACITDesc->bAssocTerminal = 0x00;
pACITDesc->bNrChannels = 0x02; // XXX: 0x01
pACITDesc->wChannelConfig = 0x03; // XXX: 0x0000
pACITDesc->iChannelNames = 0x00;
pACITDesc->iTerminal = 0x00;
// Output Terminal Descriptor
USB_AC_OT_DESCRIPTOR* pACOTDesc = (USB_AC_OT_DESCRIPTOR*)((char*)pACITDesc + pACITDesc->bLength);
pACOTDesc->bLength = 0x09;
pACOTDesc->bDescriptorType = 0x24;
pACOTDesc->bDescriptorSubtype = 0x03;
pACOTDesc->bTerminalID = 0x03;
pACOTDesc->wTerminalType = 0x0101;
pACOTDesc->bAssocTerminal = 0x00;
pACOTDesc->bSourceID = 0x01;
pACOTDesc->iTerminal = 0x00;
从效果上来看,就好像图标变了,别的具体还有什么变化,没在仔细的研究,不过测试了一下,也可以用。
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936