UAC设备示例
+ -

USB扬声器UAC设备示例

2021-12-19 1298 0

一个简单的USB扬声器,没有其它的功能,比较简单,其设备管理器中的信息如下:

USB扬声器UAC设备示例

USBTreeView中的描述符如下:

  1. =========================== USB Port10 ===========================
  2. Connection Status : 0x01 (Device is connected)
  3. Port Chain : 2-10
  4. Properties : 0x01
  5. IsUserConnectable : yes
  6. PortIsDebugCapable : no
  7. PortHasMultiCompanions : no
  8. PortConnectorIsTypeC : no
  9. ConnectionIndex : 10
  10. ======================== USB Device ========================
  11. +++++++++++++++++ Device Information ++++++++++++++++++
  12. Device Description : USB Composite Device
  13. Device Path : \\?\USB#VID_1908&PID_2070#20130100ph0#{a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE)
  14. Kernel Name : \Device\USBPDO-4
  15. Device ID : USB\VID_1908&PID_2070\20130100PH0
  16. Hardware IDs : USB\VID_1908&PID_2070&REV_0100 USB\VID_1908&PID_2070
  17. Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0005 (GUID_DEVCLASS_USB)
  18. Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.14393.1794 Date: 2017-10-09)
  19. Driver Inf : C:\Windows\inf\usb.inf
  20. Legacy BusType : PNPBus
  21. Class : USB
  22. Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB)
  23. Service : usbccgp
  24. Enumerator : USB
  25. Location Info : Port_#0010.Hub_#0001
  26. Location IDs : PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(10), ACPI(_SB_)#ACPI(PCI0)#ACPI(XHC_)#ACPI(RHUB)#ACPI(HS10)
  27. Container ID : {20f273cf-3d2d-50f1-9056-ed8c50532203}
  28. Manufacturer Info : (标准 USB 主控制器)
  29. Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK)
  30. Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
  31. Problem Code : 0
  32. Address : 10
  33. HcDisableSelectiveSuspend: 0
  34. EnableSelectiveSuspend : 0
  35. SelectiveSuspendEnabled : 0
  36. EnhancedPowerMgmtEnabled : 0
  37. IdleInWorkingState : 0
  38. WakeFromSleepState : 0
  39. Power State : D0 (supported: D0, D3, wake from D0)
  40. Child Device 1 : USB2.0 Device (USB Audio Device)
  41. Device Path 1 : \\?\USB#VID_1908&PID_2070&MI_00#6&1181b5ec&0&0000#{65e8773e-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_RENDER)
  42. Device Path 2 : \\?\USB#VID_1908&PID_2070&MI_00#6&1181b5ec&0&0000#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_AUDIO)
  43. Kernel Name : \Device\0000005b
  44. Device ID : USB\VID_1908&PID_2070&MI_00\6&1181B5EC&0&0000
  45. Class : MEDIA
  46. Driver KeyName : {4d36e96c-e325-11ce-bfc1-08002be10318}\0013 (GUID_DEVCLASS_MEDIA)
  47. Service : usbaudio
  48. Child Device 1 : 扬声器 (USB2.0 Device) (音频端点)
  49. Device Path : \\?\SWD#MMDEVAPI#{0.0.0.00000000}.{3159594e-82fd-44ec-8904-747ff7a4d8ff}#{e6327cad-dcec-4949-ae8a-991e976a79d2} (DEVINTERFACE_AUDIO_RENDER)
  50. Kernel Name : \Device\00000064
  51. Device ID : SWD\MMDEVAPI\{0.0.0.00000000}.{3159594E-82FD-44EC-8904-747FF7A4D8FF}
  52. Class : AudioEndpoint
  53. Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0010 (AUDIOENDPOINT_CLASS_UUID)
  54. +++++++++++++++++ Registry USB Flags +++++++++++++++++
  55. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\190820700100
  56. NewInterfaceUsage : REG_DWORD 00000000 (0)
  57. ---------------- Connection Information ---------------
  58. Connection Index : 0x0A (10)
  59. Connection Status : 0x01 (DeviceConnected)
  60. Current Config Value : 0x01
  61. Device Address : 0x01 (1)
  62. Is Hub : 0x00 (no)
  63. Device Bus Speed : 0x01 (Full-Speed)
  64. Number Of Open Pipes : 0x00 (0 pipes to data endpoints)
  65. Data (HexDump) : 0A 00 00 00 12 01 10 01 00 00 00 40 08 19 70 20 ...........@..p
  66. 00 01 01 02 03 01 01 01 00 01 00 00 00 00 00 01 ................
  67. 00 00 00 ...
  68. --------------- Connection Information V2 -------------
  69. Connection Index : 0x0A (10)
  70. Length : 0x10 (16 bytes)
  71. SupportedUsbProtocols : 0x03
  72. Usb110 : 1 (yes)
  73. Usb200 : 1 (yes)
  74. Usb300 : 0 (no)
  75. ReservedMBZ : 0x00
  76. Flags : 0x00
  77. DevIsOpAtSsOrHigher : 0 (Is not operating at SuperSpeed or higher)
  78. DevIsSsCapOrHigher : 0 (Is not SuperSpeed capable or higher)
  79. DevIsOpAtSsPlusOrHigher : 0 (Is not operating at SuperSpeedPlus or higher)
  80. DevIsSsPlusCapOrHigher : 0 (Is not SuperSpeedPlus capable or higher)
  81. ReservedMBZ : 0x00
  82. Data (HexDump) : 0A 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................
  83. ---------------------- Device Descriptor ----------------------
  84. bLength : 0x12 (18 bytes)
  85. bDescriptorType : 0x01 (Device Descriptor)
  86. bcdUSB : 0x110 (USB Version 1.10)
  87. bDeviceClass : 0x00 (defined by the interface descriptors)
  88. bDeviceSubClass : 0x00
  89. bDeviceProtocol : 0x00
  90. bMaxPacketSize0 : 0x40 (64 bytes)
  91. idVendor : 0x1908 (APPOTECH LIMITED)
  92. idProduct : 0x2070
  93. bcdDevice : 0x0100
  94. iManufacturer : 0x01 (String Descriptor 1)
  95. Language 0x0409 : "Generic"
  96. iProduct : 0x02 (String Descriptor 2)
  97. Language 0x0409 : "USB2.0 Device"
  98. iSerialNumber : 0x03 (String Descriptor 3)
  99. Language 0x0409 : "20130100ph0"
  100. bNumConfigurations : 0x01 (1 Configuration)
  101. Data (HexDump) : 12 01 10 01 00 00 00 40 08 19 70 20 00 01 01 02 .......@..p ....
  102. 03 01 ..
  103. ------------------ Configuration Descriptor -------------------
  104. bLength : 0x09 (9 bytes)
  105. bDescriptorType : 0x02 (Configuration Descriptor)
  106. wTotalLength : 0x006E (110 bytes)
  107. bNumInterfaces : 0x02 (2 Interfaces)
  108. bConfigurationValue : 0x01 (Configuration 1)
  109. iConfiguration : 0x00 (No String Descriptor)
  110. bmAttributes : 0x80
  111. D7: Reserved, set 1 : 0x01
  112. D6: Self Powered : 0x00 (no)
  113. D5: Remote Wakeup : 0x00 (no)
  114. D4..0: Reserved, set 0 : 0x00
  115. MaxPower : 0xC8 (400 mA)
  116. Data (HexDump) : 09 02 6E 00 02 01 00 80 C8 09 04 00 00 00 01 01 ..n.............
  117. 00 00 09 24 01 00 01 28 00 01 01 0C 24 02 01 01 ...$...(....$...
  118. 01 00 02 03 00 00 00 0A 24 06 02 01 01 03 00 00 ........$.......
  119. 00 09 24 03 03 01 03 00 02 00 09 04 01 00 00 01 ..$.............
  120. 02 00 00 09 04 01 01 01 01 02 00 00 07 24 01 01 .............$..
  121. 01 01 00 0B 24 02 01 02 02 10 01 80 BB 00 09 05 ....$...........
  122. 02 09 C0 00 01 00 00 07 25 01 01 01 01 00 ........%.....
  123. ---------------- Interface Descriptor -----------------
  124. bLength : 0x09 (9 bytes)
  125. bDescriptorType : 0x04 (Interface Descriptor)
  126. bInterfaceNumber : 0x00
  127. bAlternateSetting : 0x00
  128. bNumEndpoints : 0x00 (Default Control Pipe only)
  129. bInterfaceClass : 0x01 (Audio)
  130. bInterfaceSubClass : 0x01 (Audio Control)
  131. bInterfaceProtocol : 0x00
  132. iInterface : 0x00 (No String Descriptor)
  133. Data (HexDump) : 09 04 00 00 00 01 01 00 00 .........
  134. ------ Audio Control Interface Header Descriptor ------
  135. bLength : 0x09 (9 bytes)
  136. bDescriptorType : 0x24 (Audio Interface Descriptor)
  137. bDescriptorSubtype : 0x01 (Header)
  138. bcdADC : 0x0100
  139. wTotalLength : 0x0028 (40 bytes)
  140. bInCollection : 0x01
  141. baInterfaceNr[1] : 0x01
  142. Data (HexDump) : 09 24 01 00 01 28 00 01 01 .$...(...
  143. ------- Audio Control Input Terminal Descriptor -------
  144. bLength : 0x0C (12 bytes)
  145. bDescriptorType : 0x24 (Audio Interface Descriptor)
  146. bDescriptorSubtype : 0x02 (Input Terminal)
  147. bTerminalID : 0x01
  148. wTerminalType : 0x0101 (USB streaming)
  149. bAssocTerminal : 0x00
  150. bNrChannels : 0x02 (2 channels)
  151. wChannelConfig : 0x0003 (L, R)
  152. iChannelNames : 0x00 (No String Descriptor)
  153. iTerminal : 0x00 (No String Descriptor)
  154. Data (HexDump) : 0C 24 02 01 01 01 00 02 03 00 00 00 .$..........
  155. -------- Audio Control Feature Unit Descriptor --------
  156. bLength : 0x0A (10 bytes)
  157. bDescriptorType : 0x24 (Audio Interface Descriptor)
  158. bDescriptorSubtype : 0x06 (Feature Unit)
  159. bUnitID : 0x02 (2)
  160. bSourceID : 0x01 (1)
  161. bControlSize : 0x01 (1 byte per control)
  162. bmaControls[0] : 0x03
  163. D0: Mute : 1
  164. D1: Volume : 1
  165. D2: Bass : 0
  166. D3: Mid : 0
  167. D4: Treble : 0
  168. D5: Graphic Equalizer : 0
  169. D6: Automatic Gain : 0
  170. D7: Delay : 0
  171. bmaControls[1] : 0x00
  172. D0: Mute : 0
  173. D1: Volume : 0
  174. D2: Bass : 0
  175. D3: Mid : 0
  176. D4: Treble : 0
  177. D5: Graphic Equalizer : 0
  178. D6: Automatic Gain : 0
  179. D7: Delay : 0
  180. bmaControls[2] : 0x00
  181. D0: Mute : 0
  182. D1: Volume : 0
  183. D2: Bass : 0
  184. D3: Mid : 0
  185. D4: Treble : 0
  186. D5: Graphic Equalizer : 0
  187. D6: Automatic Gain : 0
  188. D7: Delay : 0
  189. iFeature : 0x00 (No String Descriptor)
  190. Data (HexDump) : 0A 24 06 02 01 01 03 00 00 00 .$........
  191. ------- Audio Control Output Terminal Descriptor ------
  192. bLength : 0x09 (9 bytes)
  193. bDescriptorType : 0x24 (Audio Interface Descriptor)
  194. bDescriptorSubtype : 0x03 (Output Terminal)
  195. bTerminalID : 0x03
  196. wTerminalType : 0x0301 (Speaker)
  197. bAssocTerminal : 0x00 (0)
  198. bSourceID : 0x02 (2)
  199. iTerminal : 0x00 (No String Descriptor)
  200. Data (HexDump) : 09 24 03 03 01 03 00 02 00 .$.......
  201. ---------------- Interface Descriptor -----------------
  202. bLength : 0x09 (9 bytes)
  203. bDescriptorType : 0x04 (Interface Descriptor)
  204. bInterfaceNumber : 0x01
  205. bAlternateSetting : 0x00
  206. bNumEndpoints : 0x00 (Default Control Pipe only)
  207. bInterfaceClass : 0x01 (Audio)
  208. bInterfaceSubClass : 0x02 (Audio Streaming)
  209. bInterfaceProtocol : 0x00
  210. iInterface : 0x00 (No String Descriptor)
  211. Data (HexDump) : 09 04 01 00 00 01 02 00 00 .........
  212. ---------------- Interface Descriptor -----------------
  213. bLength : 0x09 (9 bytes)
  214. bDescriptorType : 0x04 (Interface Descriptor)
  215. bInterfaceNumber : 0x01
  216. bAlternateSetting : 0x01
  217. bNumEndpoints : 0x01 (1 Endpoint)
  218. bInterfaceClass : 0x01 (Audio)
  219. bInterfaceSubClass : 0x02 (Audio Streaming)
  220. bInterfaceProtocol : 0x00
  221. iInterface : 0x00 (No String Descriptor)
  222. Data (HexDump) : 09 04 01 01 01 01 02 00 00 .........
  223. -------- Audio Streaming Interface Descriptor ---------
  224. bLength : 0x07 (7 bytes)
  225. bDescriptorType : 0x24 (Audio Interface Descriptor)
  226. bDescriptorSubtype : 0x01
  227. bTerminalLink : 0x01
  228. bDelay : 0x01
  229. wFormatTag : 0x0001 (PCM)
  230. Data (HexDump) : 07 24 01 01 01 01 00 .$.....
  231. ------- Audio Streaming Format Type Descriptor --------
  232. bLength : 0x0B (11 bytes)
  233. bDescriptorType : 0x24 (Audio Interface Descriptor)
  234. bDescriptorSubtype : 0x02 (Format Type)
  235. bFormatType : 0x01 (FORMAT_TYPE_I)
  236. bNrChannels : 0x02 (2 channels)
  237. bSubframeSize : 0x02 (2 bytes per subframe)
  238. bBitResolution : 0x10 (16 bits per sample)
  239. bSamFreqType : 0x01 (supports 1 sample frequence)
  240. tSamFreq[1] : 0x0BB80 (48000 Hz)
  241. Data (HexDump) : 0B 24 02 01 02 02 10 01 80 BB 00 .$.........
  242. ----------------- Endpoint Descriptor -----------------
  243. bLength : 0x09 (9 bytes)
  244. bDescriptorType : 0x05 (Endpoint Descriptor)
  245. bEndpointAddress : 0x02 (Direction=OUT EndpointID=2)
  246. bmAttributes : 0x09 (TransferType=Isochronous SyncType=Adaptive EndpointType=Data)
  247. wMaxPacketSize : 0x00C0 (192 bytes)
  248. bInterval : 0x01 (1 ms)
  249. bRefresh : 0x00
  250. bSynchAddress : 0x00
  251. Data (HexDump) : 09 05 02 09 C0 00 01 00 00 .........
  252. ----------- Audio Data Endpoint Descriptor ------------
  253. bLength : 0x07 (7 bytes)
  254. bDescriptorType : 0x25 (Audio Endpoint Descriptor)
  255. bDescriptorSubtype : 0x01 (General)
  256. bmAttributes : 0x01
  257. D0 : Sampling Freq : 0x01 (supported)
  258. D1 : Pitch : 0x00 (not supported)
  259. D6..2: Reserved : 0x00
  260. D7 : MaxPacketsOnly : 0x00 (no)
  261. bLockDelayUnits : 0x01 (Milliseconds)
  262. wLockDelay : 0x0001 (1 ms)
  263. Data (HexDump) : 07 25 01 01 01 01 00 .%.....
  264. -------------------- String Descriptors -------------------
  265. ------ String Descriptor 0 ------
  266. bLength : 0x04 (4 bytes)
  267. bDescriptorType : 0x03 (String Descriptor)
  268. Language ID[0] : 0x0409 (English - United States)
  269. Data (HexDump) : 04 03 09 04 ....
  270. ------ String Descriptor 1 ------
  271. bLength : 0x10 (16 bytes)
  272. bDescriptorType : 0x03 (String Descriptor)
  273. Language 0x0409 : "Generic"
  274. Data (HexDump) : 10 03 47 00 65 00 6E 00 65 00 72 00 69 00 63 00 ..G.e.n.e.r.i.c.
  275. ------ String Descriptor 2 ------
  276. bLength : 0x1C (28 bytes)
  277. bDescriptorType : 0x03 (String Descriptor)
  278. Language 0x0409 : "USB2.0 Device"
  279. Data (HexDump) : 1C 03 55 00 53 00 42 00 32 00 2E 00 30 00 20 00 ..U.S.B.2...0. .
  280. 44 00 65 00 76 00 69 00 63 00 65 00 D.e.v.i.c.e.
  281. ------ String Descriptor 3 ------
  282. bLength : 0x18 (24 bytes)
  283. bDescriptorType : 0x03 (String Descriptor)
  284. Language 0x0409 : "20130100ph0"
  285. Data (HexDump) : 18 03 32 00 30 00 31 00 33 00 30 00 31 00 30 00 ..2.0.1.3.0.1.0.
  286. 30 00 70 00 68 00 30 00 0.p.h.0.
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 篇笔记 写笔记

USB-UAC麦克风 音频控制接口
音频控制接口描述符描述了设备的结构(拓扑结构),并通过特定类请求对音频的控制。UAC麦克风 音频控制接口描述符偏移地址字段长度值描述0bLength10x09接口描术符的长度1bDescriptorType10x04描述符的类型接口描述符2bInterfaceNumber10x00接口ID号3bA......
USB音箱 UAC设备描述符分析
这里看到,USB规范采用的是USB1.1版本,不过字符串中又显示的是”USB2.0 Device”,所以这里就有点迷~关于设备描述符各字段的详细解释,详见USB规范中设备描述符一节。从bDeviceClass,bDeviceSubClass和bDeviceSubClass都被置为0来看,这是一个典......
UAC 类特定音频控制接口头描述符
UAC类特定音频控制头接口描述符这个名字有点绕,其实这个描述符是前接标准的音频控制接口描述符,后续关于音频控制的所有相关描述符,起着承上起下的作用。当然也可以认为是音频控制相关描述符的前导。这是因为UAC类特定音频控制接口描述符含有一个关键的字段wTotalLength,用于包含音频控制所有接口描述......
华为UAC耳机 音频控制接口
音频控制接口占用接口ID=0,音频控制接口的描述符结构布局如下:USB标准接口描述符UAC音频控制接口头描述符IDSId描述    音频控制输入终端描述符1USB Streaming   ......
华为UAC耳机的工作过程数据分析
华为UAC耳机工作时,首先需要打开设备,然后读取数据,播放过程后,需要关闭设备。这里我们使用BusHound抓包(省略掉重复的数据包:由于这些特定类请求是发给UAC音频控制终端/实体或接口的,所以我们先回顾一下UAC音频控制单元的一些ID,然后对照其选择子进行分析。UAC音频控制接口头描述符ID描述......
UAC 文档下载
UAC规范1.0文档下载地址:https://www.usb.org/sites/default/files/audio10.pdfUAC规范2.0文档下载地址:https://www.usb.org/sites/default/files/Audio2.0_final.zipUAC规范3.0及3.......
UAC 音频数据格式FORMAT_TYPE_3
下面来介绍USB Audio Data Formats 的第一类音频数格式 FORMAT_TYPE_III = 0x03Audio Data Format Type III Codes 其下又分为5种,分别为:NamewFormatTagTYPE_III_UNDEFINED0x2000IEC1937......
UAC 音频控制
一个USB设备可能包含多个配置。像手机一样,当手机通过USB线缆接入PC机后,会弹出一个选择对话框:让用户选择。当然一个USB设备只能工作在一种配置描述符下。对于每一个USB配置描述符,可能含有多个USB接口描述描述符,同时这些接口描述符可能每个接口描述符又包含多个转换接口描述符。这些接口描述符可能......
USB音箱 UAC Speaker 概述
手头有一个USB Speaker,插入电脑后在设备管理器中如下:从设备管理器中来看,这是一个单一功能的Usb Speaker。其硬件设备ID如下:USBVID_1908&PID_2070&REV_0100(USB Composite Device)USBVID_1908&......
USB音箱 UAC配置描述符分析
该USB音箱的配置描述符和普通USB设备描述符结构体一致,并无特别区别。该配置描述符的总长度(包括后续的所有其它描述符)为110字节,这里相对华为耳机的要少了很多,这是因为少了像麦克风和HID。从配置描述符的字段bmAttributes来看,并不支持远程唤醒功能。 ------------......
华为UAC耳机 配置描述符
配置描述符的大小其实不光包括配置描述符自身,也包括后续的所有描述符。这里我们只先介绍一下配置描述符,后续的接口描述符和其它UAC相关描述符在后续一节介绍。配置描述符的内容如下: ------------------ Configuration Descriptor --------------......
UAC 其它速率配置描述符
UAC规范中,并没有定义特别的其它速率配置描述符,故UAC音频设备的其它速率描述符应符合USB规范中的其它速率配置描述符。......
UAC Feedback端点
下面转一段对USB feedback的理解:这段时间一直在做USB Audio Device(UAC)设备的开发工作。由于UAC采用的是isochronous endpoint来传输数据,对时钟的要求较高。但无奈我们的嵌入式平台的时钟并不准,数据同步就成了问题。经过研究,发现只能使用异步模式来解决这......
USB-UAC麦克风 配置描述符
UAC麦克风采用的配置描述符结构和USB配置描述符的结构一致.偏移地址字段长度值描述0bLength10x09配置描述符的长度1bDescriptorType10x02描述符类型,配置描述符类型2wTotalLength20x0064配置描述符的总长度(包括后续的UAC音频控制和UAC音频流接口描述......
华为UAC麦克风的工作过程数据分析
看完了耳机的数据分析,再来分析麦克风,就相对来说很简单了,这是因为:第一:麦克风没有音频控制特效单元描述符,所以少了很多特定类请求。第二:麦克风只有一个音频流转换接口,且只支持采样率为48000HZ 16位。具体的过程见下:Length Phase Data-------- --......
关注公众号
  • HID人机交互
  • Linux&USB
  • UAC音频
  • TYPE-C
  • USB规范
  • USB大容量存储
  • USB百科
  • USB周边
  • UVC摄像头
  • Windows系统USB
  • 音视频博客
  • 取消
    感谢您的支持,我会继续努力的!
    扫码支持
    扫码打赏,你说多少就多少

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

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