[wdmaudiodev] Re: UAC2 on Creator's: locked to 44.1?

  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 6 Jul 2017 11:38:39 +0200

Yesterday I checked which audio class specific requests are executed by
Linux and Mac OS but not by Win10 C.U. The probably most revealing one was
that AUDIO_CS_CONTROL_CLOCK_VALID was never requested.

With this in mind I tried to go through the clock source descriptors and
found out the device was missing an AC Clock Selector Descriptor. Is that
considered critical?

I tried to put one in, and now we're on the "Other Devices" list. One step
forward and one step back I guess :-) Hopefully I'll get there with a bit
more digging. Present descriptor below.

Best,
Børge



Information for device Henry Audio USB DAC 128 mkII (VID=0x16D0 PID=0x075D):

Connection Information:
------------------------------
Connection status: Device connected
Device actual bus speed: HighSpeed
Device supports USB 1.1 specification
Device supports USB 2.0 specification
Device is hub: No
Device address: 0x0009
Current configuration value: 0x01
Number of open pipes: 2

Device Descriptor:
------------------------------
0x12 bLength
0x01 bDescriptorType
0x0200 bcdUSB
0xEF bDeviceClass   (Miscellaneous device)
0x02 bDeviceSubClass
0x01 bDeviceProtocol
0x40 bMaxPacketSize0   (64 Bytes)
0x16D0 idVendor
0x075D idProduct
0x1000 bcdDevice
0x01 iManufacturer   "Audio-Widget"
0x02 iProduct   "Henry Audio USB DAC 128 mkII"
0x03 iSerialNumber   "2017042900BSB"
0x01 bNumConfigurations

Device Qualifier Descriptor:
------------------------------
0x0A bLength
0x06 bDescriptorType
0x0200 bcdUSB
0xEF bDeviceClass   (Miscellaneous device)
0x02 bDeviceSubClass
0x01 bDeviceProtocol
0x40 bMaxPacketSize0   (64 Bytes)
0x01 bNumConfigurations
0x00 bReserved

Configuration Descriptor:
------------------------------
0x09 bLength
0x02 bDescriptorType
0x00C9 wTotalLength   (201 Bytes)
0x04 bNumInterfaces
0x01 bConfigurationValue
0x00 iConfiguration
0xC0 bmAttributes   (Self-powered Device)
0x05 bMaxPower   (10 mA)

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x00 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0x00 bInterfaceClass
0x00 bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Interface Association Descriptor:
------------------------------
0x08 bLength
0x0B bDescriptorType
0x01 bFirstInterface
0x02 bInterfaceCount
0x01 bFunctionClass   (Audio Device Class)
0x00 bFunctionSubClass
0x20 bFunctionProtocol
0x00 iFunction

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x01 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0x01 bInterfaceClass   (Audio Device Class)
0x01 bInterfaceSubClass   (Audio Control Interface)
0x20 bInterfaceProtocol
0x07 iInterface   "Henry Audio USB DAC 128 mkII"

AC Interface Header Descriptor:
------------------------------
0x09 bLength
0x24 bDescriptorType
0x01 bDescriptorSubtype
0x0200 bcdADC
0x04 bCategory   (HEADSET)
0x0048 wTotalLength   (72 Bytes)
0x00 bmControls

AC Clock Source Descriptor:
------------------------------
0x08 bLength
0x24 bDescriptorType
0x0A bDescriptorSubtype
0x05 bClockID
0x02 bmAttributes
0x07 bmControls
0x03 bAssocTerminal
0x05 iClockSource   "Clock 2"

AC Clock Selector Descriptor:
------------------------------
0x08 bLength
0x24 bDescriptorType
0x0B bDescriptorSubtype
0x05 bClockID
0x01 bNrInPins
0x05 baCSourceID(1)
0x07 bmControls
0x05 iClockSelector   "Clock 2"

AC Input Terminal Descriptor:
------------------------------
0x11 bLength
0x24 bDescriptorType
0x02 bDescriptorSubtype
0x11 bTerminalID
0x0101 wTerminalType   (USB Streaming)
0x00 bAssocTerminal
0x05 bCSourceID
0x02 bNrChannels   (2 Channels)
0x00000003 bmChannelConfig
0x00 iChannelNames
0x00 bmControls
0x08 iTerminal   "Audio-widget"

AC Feature Unit Descriptor:
------------------------------
0x12 bLength
0x24 bDescriptorType
0x06 bDescriptorSubtype
0x12 bUnitID
0x11 bSourceID
0x00000003 bmaControls(0)
0x0000000C bmaControls(1)
0x0000000C bmaControls(2)
0x00 iFeature

AC Output Terminal Descriptor:
------------------------------
0x0C bLength
0x24 bDescriptorType
0x03 bDescriptorSubtype
0x13 bTerminalID
0x0602 wTerminalType   (Digital audio interface)
0x00 bAssocTerminal
0x12 bSourceID
0x05 bCSourceID
0x0000 bmControls
0x00 iTerminal

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x02 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0x01 bInterfaceClass   (Audio Device Class)
0x02 bInterfaceSubClass   (Audio Streaming Interface)
0x20 bInterfaceProtocol
0x00 iInterface

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x02 bInterfaceNumber
0x01 bAlternateSetting
0x02 bNumEndPoints
0x01 bInterfaceClass   (Audio Device Class)
0x02 bInterfaceSubClass   (Audio Streaming Interface)
0x20 bInterfaceProtocol
0x00 iInterface

AS Interface Descriptor:
------------------------------
0x10 bLength
0x24 bDescriptorType
0x01 bDescriptorSubtype
0x11 bTerminalLink
0x07 bmControls
0x01 bFormatType   (FORMAT_TYPE_1)
0x00000001 bmFormats
0x02 bNrChannels   (2 Channels)
0x00000003 bmChannelConfig
0x00 iChannelNames

AS Format Type 1 Descriptor:
------------------------------
0x06 bLength
0x24 bDescriptorType
0x02 bDescriptorSubtype
0x01 bFormatType   (FORMAT_TYPE_1)
0x04 bSubslotSize
0x18 bBitResolution   (24 Bits/sample)

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x02 bEndpointAddress   (OUT Endpoint)
0x05 bmAttributes (Transfer: Isochronous / Synch: Asynchronous / Usage:
Data)
0x0188 wMaxPacketSize   (392 Bytes)
0x02 bInterval

AS Isochronous Data Endpoint Descriptor:
------------------------------
0x08 bLength
0x25 bDescriptorType
0x01 bDescriptorSubtype
0x00 bmAttributes
0x00 bmControls
0x00 bLockDelayUnits   (Undefined)
0x0000 wLockDelay

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x81 bEndpointAddress   (IN Endpoint)
0x11 bmAttributes (Transfer: Isochronous / Synch: None / Usage: Feedback)
0x0004 wMaxPacketSize   (4 Bytes)
0x04 bInterval

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x03 bInterfaceNumber
0x00 bAlternateSetting
0x02 bNumEndPoints
0x03 bInterfaceClass   (Human Interface Device Class)
0x00 bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

HID Descriptor:
------------------------------
0x09 bLength
0x21 bDescriptorType
0x0111 bcdHID
0x00 bCountryCode
0x01 bNumDescriptors
0x22 bDescriptorType   (Report descriptor)
0x0043 bDescriptorLength

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x84 bEndpointAddress   (IN Endpoint)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0008 wMaxPacketSize   (8 Bytes)
0x05 bInterval

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x05 bEndpointAddress   (OUT Endpoint)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0008 wMaxPacketSize   (8 Bytes)
0x05 bInterval

Other Speed Configuration Descriptor:
------------------------------
0x09 bLength
0x07 bDescriptorType
0x00C9 wTotalLength   (201 Bytes)
0x04 bNumInterfaces
0x01 bConfigurationValue
0x00 iConfiguration
0xC0 bmAttributes   (Self-powered Device)
0x05 bMaxPower   (10 mA)

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x00 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0x00 bInterfaceClass
0x00 bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Interface Association Descriptor:
------------------------------
0x08 bLength
0x0B bDescriptorType
0x01 bFirstInterface
0x02 bInterfaceCount
0x01 bFunctionClass   (Audio Device Class)
0x01 bFunctionSubClass   (Audio Control Interface)
0x20 bFunctionProtocol
0x07 iFunction   "Henry Audio USB DAC 128 mkII"

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x01 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0x01 bInterfaceClass   (Audio Device Class)
0x01 bInterfaceSubClass   (Audio Control Interface)
0x20 bInterfaceProtocol
0x07 iInterface   "Henry Audio USB DAC 128 mkII"

AC Interface Header Descriptor:
------------------------------
0x09 bLength
0x24 bDescriptorType
0x01 bDescriptorSubtype
0x0200 bcdADC
0x04 bCategory   (HEADSET)
0x0048 wTotalLength   (72 Bytes)
0x00 bmControls

AC Clock Source Descriptor:
------------------------------
0x08 bLength
0x24 bDescriptorType
0x0A bDescriptorSubtype
0x05 bClockID
0x02 bmAttributes
0x07 bmControls
0x01 bAssocTerminal
0x05 iClockSource   "Clock 2"

AC Clock Selector Descriptor:
------------------------------
0x08 bLength
0x24 bDescriptorType
0x0B bDescriptorSubtype
0x05 bClockID
0x01 bNrInPins
0x05 baCSourceID(1)
0x07 bmControls
0x05 iClockSelector   "Clock 2"

AC Input Terminal Descriptor:
------------------------------
0x11 bLength
0x24 bDescriptorType
0x02 bDescriptorSubtype
0x11 bTerminalID
0x0101 wTerminalType   (USB Streaming)
0x00 bAssocTerminal
0x05 bCSourceID
0x02 bNrChannels   (2 Channels)
0x00000003 bmChannelConfig
0x00 iChannelNames
0x00 bmControls
0x00 iTerminal

AC Feature Unit Descriptor:
------------------------------
0x12 bLength
0x24 bDescriptorType
0x06 bDescriptorSubtype
0x12 bUnitID
0x11 bSourceID
0x00000003 bmaControls(0)
0x0000000C bmaControls(1)
0x0000000C bmaControls(2)
0x00 iFeature

AC Output Terminal Descriptor:
------------------------------
0x0C bLength
0x24 bDescriptorType
0x03 bDescriptorSubtype
0x13 bTerminalID
0x0602 wTerminalType   (Digital audio interface)
0x00 bAssocTerminal
0x12 bSourceID
0x05 bCSourceID
0x0000 bmControls
0x00 iTerminal

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x02 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0x01 bInterfaceClass   (Audio Device Class)
0x02 bInterfaceSubClass   (Audio Streaming Interface)
0x20 bInterfaceProtocol
0x00 iInterface

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x02 bInterfaceNumber
0x01 bAlternateSetting
0x02 bNumEndPoints
0x01 bInterfaceClass   (Audio Device Class)
0x02 bInterfaceSubClass   (Audio Streaming Interface)
0x20 bInterfaceProtocol
0x00 iInterface

AS Interface Descriptor:
------------------------------
0x10 bLength
0x24 bDescriptorType
0x01 bDescriptorSubtype
0x11 bTerminalLink
0x07 bmControls
0x01 bFormatType   (FORMAT_TYPE_1)
0x00000001 bmFormats
0x02 bNrChannels   (2 Channels)
0x00000003 bmChannelConfig
0x00 iChannelNames

AS Format Type 1 Descriptor:
------------------------------
0x06 bLength
0x24 bDescriptorType
0x02 bDescriptorSubtype
0x01 bFormatType   (FORMAT_TYPE_1)
0x04 bSubslotSize
0x18 bBitResolution   (24 Bits/sample)

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x02 bEndpointAddress   (OUT Endpoint)
0x05 bmAttributes (Transfer: Isochronous / Synch: Asynchronous / Usage:
Data)
0x0188 wMaxPacketSize   (392 Bytes)
0x01 bInterval

AS Isochronous Data Endpoint Descriptor:
------------------------------
0x08 bLength
0x25 bDescriptorType
0x01 bDescriptorSubtype
0x00 bmAttributes
0x00 bmControls
0x00 bLockDelayUnits   (Undefined)
0x0000 wLockDelay

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x81 bEndpointAddress   (IN Endpoint)
0x11 bmAttributes (Transfer: Isochronous / Synch: None / Usage: Feedback)
0x0004 wMaxPacketSize   (4 Bytes)
0x01 bInterval

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x03 bInterfaceNumber
0x00 bAlternateSetting
0x02 bNumEndPoints
0x03 bInterfaceClass   (Human Interface Device Class)
0x00 bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

HID Descriptor:
------------------------------
0x09 bLength
0x21 bDescriptorType
0x0111 bcdHID
0x00 bCountryCode
0x01 bNumDescriptors
0x22 bDescriptorType   (Report descriptor)
0x0043 bDescriptorLength

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x84 bEndpointAddress   (IN Endpoint)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0008 wMaxPacketSize   (8 Bytes)
0x05 bInterval

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x05 bEndpointAddress   (OUT Endpoint)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0008 wMaxPacketSize   (8 Bytes)
0x05 bInterval

Microsoft OS Descriptor is not available. Error code: 0x0000001F

String Descriptor Table
--------------------------------
Index  LANGID  String
0x00   0x0000  0x0409
0x01   0x0409  "Audio-Widget"
0x02   0x0409  "Henry Audio USB DAC 128 mkII"
0x03   0x0409  "2017042900BSB"
0x07   0x0409  "Henry Audio USB DAC 128 mkII"
0x05   0x0409  "Clock 2"
0x08   0x0409  "Audio-widget"

------------------------------

Connection path for device:
USB xHCI Compliant Host Controller
Root Hub
Henry Audio USB DAC 128 mkII (VID=0x16D0 PID=0x075D) Port: 4

Running on: Windows 10 or greater

Brought to you by TDD v1.84.0, Dec 14 2015, 09:19:38




On Wed, Jul 5, 2017 at 2:40 PM, Børge Strand-Bergesen <
borge.strand@xxxxxxxxx> wrote:

Thanks Tim,

I simplified the descriptor to only supporting 44.1 and 48. Mac OS has no
problem with interpreting it and presenting the valid rates.

Win10 reads the descriptor but does not give me a choice of sample rate.
It stays fixed at 44.1. It asks for 0x0100 bytes or descriptor, and I send
it 0x0E. That transaction looks perfectly fine. (Any attempts with funny
descriptor lengths failed, as expected, but I had to try.)

So the story remains the same. Something prevents Win10 C.U. from
attempting to change my sample rate. The frequency rate descriptor looks
perfectly fine.

Is the UAC2 driver code available? Or are there people here who could help
me access a verbose log from it?


Best,
Børge


On Wed, Jul 5, 2017 at 9:29 AM, Tim Roberts <timr@xxxxxxxxx> wrote:

On Jul 4, 2017, at 12:24 PM, Børge Strand-Bergesen <
borge.strand@xxxxxxxxx> wrote:

Yes, the Device code looks at the 16 bit value and tries to serve up
256 bytes. That doesn't seem to make the driver very happy.

You don't actually have 256 bytes of descriptor, do you?


I don't know why the driver requests 0x0100 bytes of frequency
definition. For flesh-and-blood beings it would however make sense to first
ask for one bytes and use that to determine the number of triplets.
Although the number of triplets, too, is a 16-bit number.

It's an optimization.  You assume the descriptor will not be more than
256 bytes, so you allocate 256 and try that.  If it fails, you allocate
larger and try again.  Same way you fetch the configuration descriptor.


Now, I'm not saying there is a bug in the driver. I'd just very much
like to know what I should give it when it asks for 0x0100 bytes. And I'd
like to know if it asks for that because of some other bug in my
descriptors.

You deliver min( actual descriptor length, what they asked for ).

Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.



Other related posts: