USB扬声器UAC设备示例
2021-12-19
1178
0
一个简单的USB扬声器,没有其它的功能,比较简单,其设备管理器中的信息如下:
USBTreeView中的描述符如下:
=========================== USB Port10 ===========================
Connection Status : 0x01 (Device is connected)
Port Chain : 2-10
Properties : 0x01
IsUserConnectable : yes
PortIsDebugCapable : no
PortHasMultiCompanions : no
PortConnectorIsTypeC : no
ConnectionIndex : 10
======================== USB Device ========================
+++++++++++++++++ Device Information ++++++++++++++++++
Device Description : USB Composite Device
Device Path : \\?\USB#VID_1908&PID_2070#20130100ph0#{a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE)
Kernel Name : \Device\USBPDO-4
Device ID : USB\VID_1908&PID_2070\20130100PH0
Hardware IDs : USB\VID_1908&PID_2070&REV_0100 USB\VID_1908&PID_2070
Driver KeyName : {36fc9e60-c465-11cf-8056-444553540000}\0005 (GUID_DEVCLASS_USB)
Driver : \SystemRoot\System32\drivers\usbccgp.sys (Version: 10.0.14393.1794 Date: 2017-10-09)
Driver Inf : C:\Windows\inf\usb.inf
Legacy BusType : PNPBus
Class : USB
Class GUID : {36fc9e60-c465-11cf-8056-444553540000} (GUID_DEVCLASS_USB)
Service : usbccgp
Enumerator : USB
Location Info : Port_#0010.Hub_#0001
Location IDs : PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(10), ACPI(_SB_)#ACPI(PCI0)#ACPI(XHC_)#ACPI(RHUB)#ACPI(HS10)
Container ID : {20f273cf-3d2d-50f1-9056-ed8c50532203}
Manufacturer Info : (标准 USB 主控制器)
Capabilities : 0x94 (Removable, UniqueID, SurpriseRemovalOK)
Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
Problem Code : 0
Address : 10
HcDisableSelectiveSuspend: 0
EnableSelectiveSuspend : 0
SelectiveSuspendEnabled : 0
EnhancedPowerMgmtEnabled : 0
IdleInWorkingState : 0
WakeFromSleepState : 0
Power State : D0 (supported: D0, D3, wake from D0)
Child Device 1 : USB2.0 Device (USB Audio Device)
Device Path 1 : \\?\USB#VID_1908&PID_2070&MI_00#6&1181b5ec&0&0000#{65e8773e-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_RENDER)
Device Path 2 : \\?\USB#VID_1908&PID_2070&MI_00#6&1181b5ec&0&0000#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_AUDIO)
Kernel Name : \Device\0000005b
Device ID : USB\VID_1908&PID_2070&MI_00\6&1181B5EC&0&0000
Class : MEDIA
Driver KeyName : {4d36e96c-e325-11ce-bfc1-08002be10318}\0013 (GUID_DEVCLASS_MEDIA)
Service : usbaudio
Child Device 1 : 扬声器 (USB2.0 Device) (音频端点)
Device Path : \\?\SWD#MMDEVAPI#{0.0.0.00000000}.{3159594e-82fd-44ec-8904-747ff7a4d8ff}#{e6327cad-dcec-4949-ae8a-991e976a79d2} (DEVINTERFACE_AUDIO_RENDER)
Kernel Name : \Device\00000064
Device ID : SWD\MMDEVAPI\{0.0.0.00000000}.{3159594E-82FD-44EC-8904-747FF7A4D8FF}
Class : AudioEndpoint
Driver KeyName : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0010 (AUDIOENDPOINT_CLASS_UUID)
+++++++++++++++++ Registry USB Flags +++++++++++++++++
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\190820700100
NewInterfaceUsage : REG_DWORD 00000000 (0)
---------------- Connection Information ---------------
Connection Index : 0x0A (10)
Connection Status : 0x01 (DeviceConnected)
Current Config Value : 0x01
Device Address : 0x01 (1)
Is Hub : 0x00 (no)
Device Bus Speed : 0x01 (Full-Speed)
Number Of Open Pipes : 0x00 (0 pipes to data endpoints)
Data (HexDump) : 0A 00 00 00 12 01 10 01 00 00 00 40 08 19 70 20 ...........@..p
00 01 01 02 03 01 01 01 00 01 00 00 00 00 00 01 ................
00 00 00 ...
--------------- Connection Information V2 -------------
Connection Index : 0x0A (10)
Length : 0x10 (16 bytes)
SupportedUsbProtocols : 0x03
Usb110 : 1 (yes)
Usb200 : 1 (yes)
Usb300 : 0 (no)
ReservedMBZ : 0x00
Flags : 0x00
DevIsOpAtSsOrHigher : 0 (Is not operating at SuperSpeed or higher)
DevIsSsCapOrHigher : 0 (Is not SuperSpeed capable or higher)
DevIsOpAtSsPlusOrHigher : 0 (Is not operating at SuperSpeedPlus or higher)
DevIsSsPlusCapOrHigher : 0 (Is not SuperSpeedPlus capable or higher)
ReservedMBZ : 0x00
Data (HexDump) : 0A 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 ................
---------------------- Device Descriptor ----------------------
bLength : 0x12 (18 bytes)
bDescriptorType : 0x01 (Device Descriptor)
bcdUSB : 0x110 (USB Version 1.10)
bDeviceClass : 0x00 (defined by the interface descriptors)
bDeviceSubClass : 0x00
bDeviceProtocol : 0x00
bMaxPacketSize0 : 0x40 (64 bytes)
idVendor : 0x1908 (APPOTECH LIMITED)
idProduct : 0x2070
bcdDevice : 0x0100
iManufacturer : 0x01 (String Descriptor 1)
Language 0x0409 : "Generic"
iProduct : 0x02 (String Descriptor 2)
Language 0x0409 : "USB2.0 Device"
iSerialNumber : 0x03 (String Descriptor 3)
Language 0x0409 : "20130100ph0"
bNumConfigurations : 0x01 (1 Configuration)
Data (HexDump) : 12 01 10 01 00 00 00 40 08 19 70 20 00 01 01 02 .......@..p ....
03 01 ..
------------------ Configuration Descriptor -------------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x006E (110 bytes)
bNumInterfaces : 0x02 (2 Interfaces)
bConfigurationValue : 0x01 (Configuration 1)
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0x80
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x00 (no)
D5: Remote Wakeup : 0x00 (no)
D4..0: Reserved, set 0 : 0x00
MaxPower : 0xC8 (400 mA)
Data (HexDump) : 09 02 6E 00 02 01 00 80 C8 09 04 00 00 00 01 01 ..n.............
00 00 09 24 01 00 01 28 00 01 01 0C 24 02 01 01 ...$...(....$...
01 00 02 03 00 00 00 0A 24 06 02 01 01 03 00 00 ........$.......
00 09 24 03 03 01 03 00 02 00 09 04 01 00 00 01 ..$.............
02 00 00 09 04 01 01 01 01 02 00 00 07 24 01 01 .............$..
01 01 00 0B 24 02 01 02 02 10 01 80 BB 00 09 05 ....$...........
02 09 C0 00 01 00 00 07 25 01 01 01 01 00 ........%.....
---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x00
bAlternateSetting : 0x00
bNumEndpoints : 0x00 (Default Control Pipe only)
bInterfaceClass : 0x01 (Audio)
bInterfaceSubClass : 0x01 (Audio Control)
bInterfaceProtocol : 0x00
iInterface : 0x00 (No String Descriptor)
Data (HexDump) : 09 04 00 00 00 01 01 00 00 .........
------ Audio Control Interface Header Descriptor ------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x01 (Header)
bcdADC : 0x0100
wTotalLength : 0x0028 (40 bytes)
bInCollection : 0x01
baInterfaceNr[1] : 0x01
Data (HexDump) : 09 24 01 00 01 28 00 01 01 .$...(...
------- Audio Control Input Terminal Descriptor -------
bLength : 0x0C (12 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x02 (Input Terminal)
bTerminalID : 0x01
wTerminalType : 0x0101 (USB streaming)
bAssocTerminal : 0x00
bNrChannels : 0x02 (2 channels)
wChannelConfig : 0x0003 (L, R)
iChannelNames : 0x00 (No String Descriptor)
iTerminal : 0x00 (No String Descriptor)
Data (HexDump) : 0C 24 02 01 01 01 00 02 03 00 00 00 .$..........
-------- Audio Control Feature Unit Descriptor --------
bLength : 0x0A (10 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x06 (Feature Unit)
bUnitID : 0x02 (2)
bSourceID : 0x01 (1)
bControlSize : 0x01 (1 byte per control)
bmaControls[0] : 0x03
D0: Mute : 1
D1: Volume : 1
D2: Bass : 0
D3: Mid : 0
D4: Treble : 0
D5: Graphic Equalizer : 0
D6: Automatic Gain : 0
D7: Delay : 0
bmaControls[1] : 0x00
D0: Mute : 0
D1: Volume : 0
D2: Bass : 0
D3: Mid : 0
D4: Treble : 0
D5: Graphic Equalizer : 0
D6: Automatic Gain : 0
D7: Delay : 0
bmaControls[2] : 0x00
D0: Mute : 0
D1: Volume : 0
D2: Bass : 0
D3: Mid : 0
D4: Treble : 0
D5: Graphic Equalizer : 0
D6: Automatic Gain : 0
D7: Delay : 0
iFeature : 0x00 (No String Descriptor)
Data (HexDump) : 0A 24 06 02 01 01 03 00 00 00 .$........
------- Audio Control Output Terminal Descriptor ------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x03 (Output Terminal)
bTerminalID : 0x03
wTerminalType : 0x0301 (Speaker)
bAssocTerminal : 0x00 (0)
bSourceID : 0x02 (2)
iTerminal : 0x00 (No String Descriptor)
Data (HexDump) : 09 24 03 03 01 03 00 02 00 .$.......
---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x01
bAlternateSetting : 0x00
bNumEndpoints : 0x00 (Default Control Pipe only)
bInterfaceClass : 0x01 (Audio)
bInterfaceSubClass : 0x02 (Audio Streaming)
bInterfaceProtocol : 0x00
iInterface : 0x00 (No String Descriptor)
Data (HexDump) : 09 04 01 00 00 01 02 00 00 .........
---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x01
bAlternateSetting : 0x01
bNumEndpoints : 0x01 (1 Endpoint)
bInterfaceClass : 0x01 (Audio)
bInterfaceSubClass : 0x02 (Audio Streaming)
bInterfaceProtocol : 0x00
iInterface : 0x00 (No String Descriptor)
Data (HexDump) : 09 04 01 01 01 01 02 00 00 .........
-------- Audio Streaming Interface Descriptor ---------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x01
bTerminalLink : 0x01
bDelay : 0x01
wFormatTag : 0x0001 (PCM)
Data (HexDump) : 07 24 01 01 01 01 00 .$.....
------- Audio Streaming Format Type Descriptor --------
bLength : 0x0B (11 bytes)
bDescriptorType : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype : 0x02 (Format Type)
bFormatType : 0x01 (FORMAT_TYPE_I)
bNrChannels : 0x02 (2 channels)
bSubframeSize : 0x02 (2 bytes per subframe)
bBitResolution : 0x10 (16 bits per sample)
bSamFreqType : 0x01 (supports 1 sample frequence)
tSamFreq[1] : 0x0BB80 (48000 Hz)
Data (HexDump) : 0B 24 02 01 02 02 10 01 80 BB 00 .$.........
----------------- Endpoint Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x02 (Direction=OUT EndpointID=2)
bmAttributes : 0x09 (TransferType=Isochronous SyncType=Adaptive EndpointType=Data)
wMaxPacketSize : 0x00C0 (192 bytes)
bInterval : 0x01 (1 ms)
bRefresh : 0x00
bSynchAddress : 0x00
Data (HexDump) : 09 05 02 09 C0 00 01 00 00 .........
----------- Audio Data Endpoint Descriptor ------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x25 (Audio Endpoint Descriptor)
bDescriptorSubtype : 0x01 (General)
bmAttributes : 0x01
D0 : Sampling Freq : 0x01 (supported)
D1 : Pitch : 0x00 (not supported)
D6..2: Reserved : 0x00
D7 : MaxPacketsOnly : 0x00 (no)
bLockDelayUnits : 0x01 (Milliseconds)
wLockDelay : 0x0001 (1 ms)
Data (HexDump) : 07 25 01 01 01 01 00 .%.....
-------------------- String Descriptors -------------------
------ String Descriptor 0 ------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language ID[0] : 0x0409 (English - United States)
Data (HexDump) : 04 03 09 04 ....
------ String Descriptor 1 ------
bLength : 0x10 (16 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "Generic"
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.
------ String Descriptor 2 ------
bLength : 0x1C (28 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "USB2.0 Device"
Data (HexDump) : 1C 03 55 00 53 00 42 00 32 00 2E 00 30 00 20 00 ..U.S.B.2...0. .
44 00 65 00 76 00 69 00 63 00 65 00 D.e.v.i.c.e.
------ String Descriptor 3 ------
bLength : 0x18 (24 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "20130100ph0"
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.
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