UAC设备示例
+ -

UAC复合设备(麦克风,扬声器,HID设备)的示例

2021-12-19 2919 2

UAC符合设备(麦克风,扬声器,HID设备)在设备管理器中如下图所示:

设备管理器设备树

在BUSHOUND下如下图所示:
BUSHOUND

UAC音频设备

UAC音频设备包括扬声器和麦克风。
其中USB Pnp Audio Device使用了接口0,1,2,分别用于控制接口,扬声器和麦克风。

HID音量控制设备

USB输入设备用于音频的控制,使用的是HID方式,其抓包内容如下:

Device  Length    Phase  Data                                     
------  --------  -----  ----------------------------  ----------
  24.3         4  IN     01 01 00 00                   ....      
  25           5  IN     00 01 01 00  00               .....     
  25           5  IN     00 01 01 00  00               .....     
  23.0            CTL    21 01 01 02  00 31 02 00      SET CUR   
  23.0         2  OUT    d3 f3                         ..        
  23.0            CTL    21 01 02 02  00 31 02 00      SET CUR   
  23.0         2  OUT    d3 f3                         ..        
  24.3         4  IN     00 00 00 00                   ....      
  25           5  IN     00 00 00 00  00               .....     
  25           5  IN     00 00 00 00  00               .....     
  24.3         4  IN     02 02 00 00                   ....      
  25           5  IN     00 02 02 00  00               .....     
  25           5  IN     00 02 02 00  00               .....     
  23.0            CTL    21 01 01 02  00 31 02 00      SET CUR   
  23.0         2  OUT    24 f3                         $.        
  23.0            CTL    21 01 02 02  00 31 02 00      SET CUR   
  23.0         2  OUT    24 f3                         $.        
  24.3         4  IN     00 00 00 00                   ....      
  25           5  IN     00 00 00 00  00               .....     
  25           5  IN     00 00 00 00  00               .....

而其报告描述符内容如下:

24.0            CTL    81 06 00 22  03 00 7e 00                                                                                GET DESCRIPTOR  
24.0        62  IN     05 0c 09 01  a1 01 15 00  25 01 09 e9  09 ea 09 b5  09 b6 75 01  95 04 81 02  09 e2 09 b7  09 cd 95 03  ........%.......
                       81 02 05 0b  09 20 95 01  81 06 05 0c  26 ff 00 09  00 75 08 95  03 81 02 09  00 95 04 91  02 c0        ..... ......&...

HID报告描述符的解析如下:
报告描述符的解析

完整的USB描述符

完全的设备描述符如下:


    =========================== USB Port7 ===========================

Connection Status        : 0x01 (Device is connected)
Port Chain               : 2-7
Properties               : 0x01
 IsUserConnectable       : yes
 PortIsDebugCapable      : no
 PortHasMultiCompanions  : no
 PortConnectorIsTypeC    : no
ConnectionIndex          : 7
CompanionIndex           : 0
 CompanionHubSymLnk      : USB#ROOT_HUB30#4&186df573&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
 CompanionPortNumber     : 23
 -> CompanionPortChain   : 2-23

      ======================== USB Device ========================

        +++++++++++++++++ Device Information ++++++++++++++++++
Device Description       : USB Composite Device
Device Path              : \\?\USB#VID_0C76&PID_1721#5&1e7d8db7&0&7#{a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE)
Kernel Name              : \Device\USBPDO-1
Device ID                : USB\VID_0C76&PID_1721\5&1E7D8DB7&0&7
Hardware IDs             : USB\VID_0C76&PID_1721&REV_0100 USB\VID_0C76&PID_1721
Driver KeyName           : {36fc9e60-c465-11cf-8056-444553540000}\0002 (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_#0007.Hub_#0001
Location IDs             : PCIROOT(0)#PCI(1400)#USBROOT(0)#USB(7), ACPI(_SB_)#ACPI(PCI0)#ACPI(XHC_)#ACPI(RHUB)#ACPI(HS07)
Container ID             : {68804bfe-5c2a-11ec-a94b-0c9d92c27dc6}
Manufacturer Info        : (标准 USB 主控制器)
Capabilities             : 0x84 (Removable, SurpriseRemovalOK)
Status                   : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
Problem Code             : 0
Address                  : 7
HcDisableSelectiveSuspend: 0
EnableSelectiveSuspend   : 0
SelectiveSuspendEnabled  : 0
EnhancedPowerMgmtEnabled : 0
IdleInWorkingState       : 0
WakeFromSleepState       : 0
Power State              : D0 (supported: D0, D3, wake from D0)
 Child Device 1          : USB 输入设备
  Device ID              : USB\VID_0C76&PID_1721&MI_03\6&1EBC42E5&0&0003
  Class                  : HIDClass
  Driver KeyName         : {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0000 (GUID_DEVCLASS_HIDCLASS)
  Service                : HidUsb
   Child Device 1        : 符合 HID 标准的用户控制设备
    Device Path          : \\?\HID#VID_0C76&PID_1721&MI_03#7&bb8fd64&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} (GUID_DEVINTERFACE_HID)
    Kernel Name          : \Device\000000e7
    Device ID            : HID\VID_0C76&PID_1721&MI_03\7&BB8FD64&0&0000
    Class                : HIDClass
    Driver KeyName       : {745a17a0-74d3-11d0-b6fe-00a0c90f57da}\0001 (GUID_DEVCLASS_HIDCLASS)
 Child Device 2          : USB PnP Audio Device (USB Audio Device)
  Device Path 1          : \\?\USB#VID_0C76&PID_1721&MI_00#6&1ebc42e5&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_CAPTURE)
  Device Path 2          : \\?\USB#VID_0C76&PID_1721&MI_00#6&1ebc42e5&0&0000#{65e8773e-8f56-11d0-a3b9-00a0c9223196}\global (AM_KSCATEGORY_RENDER)
  Device Path 3          : \\?\USB#VID_0C76&PID_1721&MI_00#6&1ebc42e5&0&0000#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\global (AM_KSCATEGORY_AUDIO)
  Kernel Name            : \Device\000000dd
  Device ID              : USB\VID_0C76&PID_1721&MI_00\6&1EBC42E5&0&0000
  Class                  : MEDIA
  Driver KeyName         : {4d36e96c-e325-11ce-bfc1-08002be10318}\0002 (GUID_DEVCLASS_MEDIA)
  Service                : usbaudio
   Child Device 1        : 麦克风 (USB PnP Audio Device) (音频端点)
    Device Path          : \\?\SWD#MMDEVAPI#{0.0.1.00000000}.{0dd57387-fce2-4d09-8d98-1de630e0d714}#{2eef81be-33fa-4800-9670-1cd474972c3f} (DEVINTERFACE_AUDIO_CAPTURE)
    Kernel Name          : \Device\000000ea
    Device ID            : SWD\MMDEVAPI\{0.0.1.00000000}.{0DD57387-FCE2-4D09-8D98-1DE630E0D714}
    Class                : AudioEndpoint
    Driver KeyName       : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0003 (AUDIOENDPOINT_CLASS_UUID)
   Child Device 2        : 扬声器 (USB PnP Audio Device) (音频端点)
    Device Path          : \\?\SWD#MMDEVAPI#{0.0.0.00000000}.{0f44df20-c0cd-4c11-9331-1b0ed6f690b9}#{e6327cad-dcec-4949-ae8a-991e976a79d2} (DEVINTERFACE_AUDIO_RENDER)
    Kernel Name          : \Device\000000e9
    Device ID            : SWD\MMDEVAPI\{0.0.0.00000000}.{0F44DF20-C0CD-4C11-9331-1B0ED6F690B9}
    Class                : AudioEndpoint
    Driver KeyName       : {c166523c-fe0c-4a94-a586-f1a80cfbbf3e}\0002 (AUDIOENDPOINT_CLASS_UUID)

        ---------------- Connection Information ---------------
Connection Index         : 0x07 (7)
Connection Status        : 0x01 (DeviceConnected)
Current Config Value     : 0x01
Device Address           : 0x07 (7)
Is Hub                   : 0x00 (no)
Device Bus Speed         : 0x01 (Full-Speed)
Number Of Open Pipes     : 0x02 (2 pipes to data endpoints)
Pipe[0]                  : EndpointID=3  Direction=IN   ScheduleOffset=0  Type=Interrupt
Pipe[1]                  : EndpointID=1  Direction=OUT  ScheduleOffset=0  Type=Isochronous
Data (HexDump)           : 07 00 00 00 12 01 10 01 00 00 00 40 76 0C 21 17   ...........@v.!.
                           00 01 00 01 00 01 01 01 00 07 00 02 00 00 00 01   ................
                           00 00 00 07 05 83 03 04 00 20 00 00 00 00 09 05   ......... ......
                           01 0D C0 00 01 00 00 00 00                        .........

        --------------- Connection Information V2 -------------
Connection Index         : 0x07 (7)
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)           : 07 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                 : 0x0C76 (Solid State System Co., Ltd.)
idProduct                : 0x1721
bcdDevice                : 0x0100
iManufacturer            : 0x00 (No String Descriptor)
iProduct                 : 0x01 (String Descriptor 1)
 Language 0x0409         : "USB PnP Audio Device°°°°°°°°"
iSerialNumber            : 0x00 (No String Descriptor)
bNumConfigurations       : 0x01 (1 Configuration)
Data (HexDump)           : 12 01 10 01 00 00 00 40 76 0C 21 17 00 01 00 01   .......@v.!.....
                           00 01                                             ..

    ------------------ Configuration Descriptor -------------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x02 (Configuration Descriptor)
wTotalLength             : 0x012E (302 bytes)
bNumInterfaces           : 0x04 (4 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                 : 0x32 (100 mA)
Data (HexDump)           : 09 02 2E 01 04 01 00 80 32 09 04 00 00 00 01 01   ........2.......
                           00 00 0A 24 01 00 01 64 00 02 01 02 0C 24 02 01   ...$...d.....$..
                           01 01 00 02 03 00 00 00 0C 24 02 02 01 02 00 01   .........$......
                           00 00 00 00 09 24 03 11 01 03 00 31 00 09 24 03   .....$.....1..$.
                           12 01 01 02 21 00 07 24 05 21 01 32 00 0A 24 06   ....!..$.!.2..$.
                           31 41 01 01 02 02 00 09 24 06 32 02 01 03 00 00   1A......$.2.....
                           09 24 06 33 02 01 03 00 00 0D 24 04 41 02 01 33   .$.3......$.A..3
                           02 03 00 00 00 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 01 0D C0 00   $...............
                           01 00 00 07 25 01 01 01 01 00 09 04 02 00 00 01   ....%...........
                           02 00 00 09 04 02 01 01 01 02 00 00 07 24 01 12   .............$..
                           01 01 00 11 24 02 01 01 02 10 03 80 BB 00 00 EE   ....$...........
                           02 00 77 01 09 05 82 05 80 01 01 00 00 07 25 01   ..w...........%.
                           01 00 00 00 09 04 02 02 01 01 02 00 00 07 24 01   ..............$.
                           12 01 01 00 11 24 02 01 01 03 18 03 80 BB 00 00   .....$..........
                           EE 02 00 77 01 09 05 82 05 40 02 01 00 00 07 25   ...w.....@.....%
                           01 01 00 00 00 09 04 03 00 01 03 00 00 00 09 21   ...............!
                           00 01 00 01 22 3E 00 07 05 83 03 04 00 20         ....">....... 

        ---------------- 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                  : 0x0A (10 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x01 (Header)
bcdADC                   : 0x0100
wTotalLength             : 0x0064 (100 bytes)
bInCollection            : 0x02
baInterfaceNr[1]         : 0x01
baInterfaceNr[2]         : 0x02
Data (HexDump)           : 0A 24 01 00 01 64 00 02 01 02                     .$...d....

        ------- 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 Input Terminal Descriptor -------
bLength                  : 0x0C (12 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x02 (Input Terminal)
bTerminalID              : 0x02
wTerminalType            : 0x0201 (Microphone)
bAssocTerminal           : 0x00
bNrChannels              : 0x01 (1 channel)
wChannelConfig           : 0x0000 (-)
iChannelNames            : 0x00 (No String Descriptor)
iTerminal                : 0x00 (No String Descriptor)
Data (HexDump)           : 0C 24 02 02 01 02 00 01 00 00 00 00               .$..........

        ------- Audio Control Output Terminal Descriptor ------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x03 (Output Terminal)
bTerminalID              : 0x11
wTerminalType            : 0x0301 (Speaker)
bAssocTerminal           : 0x00 (0)
bSourceID                : 0x31 (49)
iTerminal                : 0x00 (No String Descriptor)
Data (HexDump)           : 09 24 03 11 01 03 00 31 00                        .$.....1.

        ------- Audio Control Output Terminal Descriptor ------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x03 (Output Terminal)
bTerminalID              : 0x12
wTerminalType            : 0x0101 (USB streaming)
bAssocTerminal           : 0x02 (2)
bSourceID                : 0x21 (33)
iTerminal                : 0x00 (No String Descriptor)
Data (HexDump)           : 09 24 03 12 01 01 02 21 00                        .$.....!.

        ------- Audio Control Selector Unit Descriptor --------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x05 (Selector Unit)
bUnitID                  : 0x21
bNrInPins                : 0x01 (1 pins)
baSourceID[1]            : 0x32
iSelector                : 0x00 (No String Descriptor)
Data (HexDump)           : 07 24 05 21 01 32 00                              .$.!.2.

        -------- Audio Control Feature Unit Descriptor --------
bLength                  : 0x0A (10 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x06 (Feature Unit)
bUnitID                  : 0x31 (49)
bSourceID                : 0x41 (65)
bControlSize             : 0x01 (1 byte per control)
bmaControls[0]           : 0x01
 D0: Mute                : 1
 D1: Volume              : 0
 D2: Bass                : 0
 D3: Mid                 : 0
 D4: Treble              : 0
 D5: Graphic Equalizer   : 0
 D6: Automatic Gain      : 0
 D7: Delay               : 0
bmaControls[1]           : 0x02
 D0: Mute                : 0
 D1: Volume              : 1
 D2: Bass                : 0
 D3: Mid                 : 0
 D4: Treble              : 0
 D5: Graphic Equalizer   : 0
 D6: Automatic Gain      : 0
 D7: Delay               : 0
bmaControls[2]           : 0x02
 D0: Mute                : 0
 D1: Volume              : 1
 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 31 41 01 01 02 02 00                     .$.1A.....

        -------- Audio Control Feature Unit Descriptor --------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x06 (Feature Unit)
bUnitID                  : 0x32 (50)
bSourceID                : 0x02 (2)
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
iFeature                 : 0x00 (No String Descriptor)
Data (HexDump)           : 09 24 06 32 02 01 03 00 00                        .$.2.....

        -------- Audio Control Feature Unit Descriptor --------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x06 (Feature Unit)
bUnitID                  : 0x33 (51)
bSourceID                : 0x02 (2)
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
iFeature                 : 0x00 (No String Descriptor)
Data (HexDump)           : 09 24 06 33 02 01 03 00 00                        .$.3.....

        --------- Audio Control Mixer Unit Descriptor ---------
bLength                  : 0x0D (13 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x04 (Mixer Unit)
bUnitID                  : 0x41
bNrInPins                : 0x02 (2 pins)
baSourceID[1]            : 0x01
baSourceID[2]            : 0x33
bNrChannels              : 0x02 (2 channels)
wChannelConfig           : 0x0003 (R)
iChannelNames            : 0x00 (No String Descriptor)
bmControls (HexDump)     : 00                                                .
iMixer                   : 0x00 (No String Descriptor)
Data (HexDump)           : 0D 24 04 41 02 01 33 02 03 00 00 00 00            .$.A..3......

        ---------------- 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         : 0x01 (Direction=OUT EndpointID=1)
bmAttributes             : 0x0D (TransferType=Isochronous  SyncType=Synchronous  EndpointType=Data)
wMaxPacketSize           : 0x00C0 (192 bytes)
bInterval                : 0x01 (1 ms)
bRefresh                 : 0x00
bSynchAddress            : 0x00
Data (HexDump)           : 09 05 01 0D 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                              .%.....

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x02
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 02 00 00 01 02 00 00                        .........

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x02
bAlternateSetting        : 0x01
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x01 (Audio)
bInterfaceSubClass       : 0x02 (Audio Streaming)
bInterfaceProtocol       : 0x00
iInterface               : 0x00 (No String Descriptor)
Data (HexDump)           : 09 04 02 01 01 01 02 00 00                        .........

        -------- Audio Streaming Interface Descriptor ---------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x01
bTerminalLink            : 0x12
bDelay                   : 0x01
wFormatTag               : 0x0001 (PCM)
Data (HexDump)           : 07 24 01 12 01 01 00                              .$.....

        ------- Audio Streaming Format Type Descriptor --------
bLength                  : 0x11 (17 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x02 (Format Type)
bFormatType              : 0x01 (FORMAT_TYPE_I)
bNrChannels              : 0x01 (1 channel)
bSubframeSize            : 0x02 (2 bytes per subframe)
bBitResolution           : 0x10 (16 bits per sample)
bSamFreqType             : 0x03 (supports 3 sample frequencies)
tSamFreq[1]              : 0x0BB80 (48000 Hz)
tSamFreq[2]              : 0x2EE00 (192000 Hz)
tSamFreq[3]              : 0x17700 (96000 Hz)
Data (HexDump)           : 11 24 02 01 01 02 10 03 80 BB 00 00 EE 02 00 77   .$.............w
                           01                                                .

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x82 (Direction=IN EndpointID=2)
bmAttributes             : 0x05 (TransferType=Isochronous  SyncType=Asynchronous  EndpointType=Data)
wMaxPacketSize           : 0x0180 (384 bytes)
bInterval                : 0x01 (1 ms)
bRefresh                 : 0x00
bSynchAddress            : 0x00
Data (HexDump)           : 09 05 82 05 80 01 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          : 0x00 (Undefined)
wLockDelay               : 0x0000
Data (HexDump)           : 07 25 01 01 00 00 00                              .%.....

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x02
bAlternateSetting        : 0x02
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x01 (Audio)
bInterfaceSubClass       : 0x02 (Audio Streaming)
bInterfaceProtocol       : 0x00
iInterface               : 0x00 (No String Descriptor)
Data (HexDump)           : 09 04 02 02 01 01 02 00 00                        .........

        -------- Audio Streaming Interface Descriptor ---------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x01
bTerminalLink            : 0x12
bDelay                   : 0x01
wFormatTag               : 0x0001 (PCM)
Data (HexDump)           : 07 24 01 12 01 01 00                              .$.....

        ------- Audio Streaming Format Type Descriptor --------
bLength                  : 0x11 (17 bytes)
bDescriptorType          : 0x24 (Audio Interface Descriptor)
bDescriptorSubtype       : 0x02 (Format Type)
bFormatType              : 0x01 (FORMAT_TYPE_I)
bNrChannels              : 0x01 (1 channel)
bSubframeSize            : 0x03 (3 bytes per subframe)
bBitResolution           : 0x18 (24 bits per sample)
bSamFreqType             : 0x03 (supports 3 sample frequencies)
tSamFreq[1]              : 0x0BB80 (48000 Hz)
tSamFreq[2]              : 0x2EE00 (192000 Hz)
tSamFreq[3]              : 0x17700 (96000 Hz)
Data (HexDump)           : 11 24 02 01 01 03 18 03 80 BB 00 00 EE 02 00 77   .$.............w
                           01                                                .

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x82 (Direction=IN EndpointID=2)
bmAttributes             : 0x05 (TransferType=Isochronous  SyncType=Asynchronous  EndpointType=Data)
wMaxPacketSize           : 0x0240 (576 bytes)
bInterval                : 0x01 (1 ms)
bRefresh                 : 0x00
bSynchAddress            : 0x00
Data (HexDump)           : 09 05 82 05 40 02 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          : 0x00 (Undefined)
wLockDelay               : 0x0000
Data (HexDump)           : 07 25 01 01 00 00 00                              .%.....

        ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x03
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x03 (HID - Human Interface Device)
bInterfaceSubClass       : 0x00 (None)
bInterfaceProtocol       : 0x00 (None)
iInterface               : 0x00 (No String Descriptor)
Data (HexDump)           : 09 04 03 00 01 03 00 00 00                        .........

        ------------------- HID Descriptor --------------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x21 (HID Descriptor)
bcdHID                   : 0x0100 (HID Version 1.00)
bCountryCode             : 0x00 (00 = not localized)
bNumDescriptors          : 0x01
Data (HexDump)           : 09 21 00 01 00 01 22 3E 00                        .!....">.
Descriptor 1:
bDescriptorType          : 0x22 (Class=Report)
wDescriptorLength        : 0x003E (62 bytes)
Error reading descriptor : ERROR_INVALID_PARAMETER

        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x83 (Direction=IN EndpointID=3)
bmAttributes             : 0x03 (TransferType=Interrupt)
wMaxPacketSize           : 0x0004 (4 bytes)
bInterval                : 0x20 (32 ms)
Data (HexDump)           : 07 05 83 03 04 00 20                              ...... 

      -------------------- 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                  : 0x3A (58 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language 0x0409          : "USB PnP Audio Device°°°°°°°°"  *!*ERROR  contains 8 NULL characters
Data (HexDump)           : 3A 03 55 00 53 00 42 00 20 00 50 00 6E 00 50 00   :.U.S.B. .P.n.P.
                           20 00 41 00 75 00 64 00 69 00 6F 00 20 00 44 00    .A.u.d.i.o. .D.
                           65 00 76 00 69 00 63 00 65 00 00 00 00 00 00 00   e.v.i.c.e.......
                           00 00 00 00 00 00 00 00 00 00                     ..........
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 篇笔记 写笔记

Windows下枚举系统中所有HID设备
Windows下对任何设备,文件的打开都是通过CreateFile来实现的,不过要打开一个设备得首先知道设备或文件名。由上节可知道,对于HID设备,都会注册一个接口类型为{2ACCFE60-C130-11D2-B082-00A0C91EFB8B}的GUID。我们可以通过Setup系列函数枚举出系统中......
USB-UAC麦克风 音频控制接口
音频控制接口描述符描述了设备的结构(拓扑结构),并通过特定类请求对音频的控制。UAC麦克风 音频控制接口描述符偏移地址字段长度值描述0bLength10x09接口描术符的长度1bDescriptorType10x04描述符的类型接口描述符2bInterfaceNumber10x00接口ID号3bA......
USB-UAC麦克风 配置描述符
UAC麦克风采用的配置描述符结构和USB配置描述符的结构一致.偏移地址字段长度值描述0bLength10x09配置描述符的长度1bDescriptorType10x02描述符类型,配置描述符类型2wTotalLength20x0064配置描述符的总长度(包括后续的UAC音频控制和UAC音频流接口描述......
USBTreeView遇到连续的转换接口描述符不解释情况说明
今天拿到一个USB摄像头,对其进行数据格式分析,出现了一个令人迷惑的问题…事情是这样的,我用POTPLAYER打开摄像头,使用BUSHOUND进行抓包,选择的备用接口是0x0c CTL 01 0b 0c 00 01 00 00 00 SET_INTERFACE为了查看该端点的数据大......
华为UAC麦克风的工作过程数据分析
看完了耳机的数据分析,再来分析麦克风,就相对来说很简单了,这是因为:第一:麦克风没有音频控制特效单元描述符,所以少了很多特定类请求。第二:麦克风只有一个音频流转换接口,且只支持采样率为48000HZ 16位。具体的过程见下:Length Phase Data-------- --......
USB-UAC麦克风 功能简介
这里描述的设备是一个USB麦克风。这是一个非常简单的设备,没有音频控制合并等其它功能。它通过音频流接口向主机提供单声道音频数据流。这个使用的音频数据格式是16位8KHz PCM。同步类型为异步源。它使用内部时钟作为参考源。本章要介绍的是UAC1.0规范附录B自带的USB麦克风的内容。从拓年图上可以看......
USB复合HID设备报告描述符的区分
在USB规范中,设备的功能是通过接口来承载的,在USB规格书中就是接口描述符。对于一般的设备,一般一个接口就是一个功能,这个功能可以是鼠标,键盘或其它设备类型。当然这个只是对USB简易设备而言的,对于一些USB复杂设备如UVC摄像头,UAC音频等是多接口相互配合来实现其功能的,为了整合这么多接口使......
USB-UAC麦克风 字符串描述符
偏移地址字段长度值描述0bLength10x18描述符长度1bDescriptorType10x03描述符类型:字符串描述符2bString10x00540x00480x00450x00200x00430x004F0x004D0x00500x00410x004E0x0059“THE COMPANY”......
USB通用父驱动usbccgp.sys的过滤UVC摄像头、UAC麦克风HID设备硬件ID
激动的心情,无溢言表。。虽然只是一个很简单的东西。。但相于折腾了这么久,还是很开心的了。最近有个需求,功能是这样的:有一个USB复合设备,连接到windows系统中它在windows下的设备树如下:USB Composite Device(usbccgp.sys)UVC CameraUAC ......
USB-UAC麦克风 音频流接口
音频流接口有2个转换接口。UAC麦克风 零带宽转换接口转换接口0是零带宽设置,用于在麦克风未使用。这是通电后的默认设置。实现了零带宽通过指定接口的此备用设置没有与之关联的端点(bNumEndpoints=0)。偏移地址字段长度值描述0bLength10x091bDescriptorType10x04......
UVC 静止图像触发控制
静止图像触发控制通知设备开始通过相关的同步或大容量管道发送静态图像数据。专用的静态图像大容量管道仅用于静态图像捕获的方法3。此控制只能在流式传输时设置,并且在发送静态图像后,硬件应将其重置为“正常操作”模式。仅当设备支持静态图像检索的方法2或方法3时,才需要此控件。控制选择子VS_STILL_IMA......
USB-UAC麦克风 设备描述符
UAC麦克风采用的设备描述符结构和USB设备描述符的结构一致,只是有些字段的值有所要求。偏移地址字段长度值描述0bLength10x12设备描述符的总和长度1bDescriptorType10x01设备描述符类型2bcdUSB 20x01001.00使用的USB版本号4bDeviceClass10x......
HID设备固件升级失败
USB设备现在比较多,像UVC摄像头,UAC音频或TOUCH设备,这些设备在设备管理器中无不都会带一个自定义的HID设备。这个自定义的HID主要的功能一般是通过应用层与固件进行数据通讯,比如对固件参数的配置,甚至固件的升级。在Windows下,两2套与HID设备的通讯的接口,一组是WriteFil......
USB复合设备-UVC摄像头HID设备共存的设计实现
通常做USB设备的开发,我们做的都是单一的功能设备。这种单一的功能设备只实现某种特定的功能,如只实现一个HID鼠标或键盘,只实现一个USB存储功能,或再复杂一点只实现一个UVC音频麦克风扬声器功能或一个UVC摄像头功能。但我们在一般的市场上看到的设备通常不只实现一种功能,如UVC摄像头功能还提供......
HID复合设备(键盘、鼠标)的实现
在使用一些USB键盘或鼠标的时候,特别是一些电竟高档HID设备时,经常发现这些设备会额外定义一些特别的快捷键,使得这些设备不仅有基础设备(如键盘,鼠标)的功能,也有一些特别的快捷功能(如系统声音的放大放小)。甚至更有一些复杂的设备,只需要一个USB接口,就同时支持鼠标键盘功能或在键盘的额外区域支持触......
关注公众号
  • HID人机交互
  • Linux&USB
  • UAC音频
  • TYPE-C
  • USB规范
  • USB大容量存储
  • USB百科
  • USB周边
  • UVC摄像头
  • Windows系统USB
  • 音视频博客
  • 取消
    感谢您的支持,我会继续努力的!
    扫码支持
    扫码打赏,你说多少就多少

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

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