Windows 10 UAC2 native driver summary

Discussions about USB Audio on XMOS devices
Respected Member
Posts: 283
Joined: Fri Mar 19, 2010 4:49 am

Windows 10 UAC2 native driver summary

Post by bearcat »

Here's my summary of usage of the USB Audio 2.0 reference with the Windows 10 UAC2 native driver:

Reference software works with only item #1. I tested the XS1-L1 HS Audio Development, and a custom board correctly with Windows 10 April 2018 version.


1 - Explicit Feedback only. This is more compatible anyways. Windows Native, Linux good. Apple prefers implicit.
Need to add this to customdefines.h:

2 - Windows installation.
Plugging in the device will load the native driver automatically, good. But if you are changing any enumeration, or option,
you must uninstall the driver in device manager, unplug the device, update the firmware or debugger, then
plug back in. Windows will not automatically reconfigure for the new settings, and comes up in an unknown state upon changes.

3 - Recommend using different PIDs and product names if debugging for each configuration.
Use #ifdefines for product and PIDs for each different option. Such as testing between 2 channels / 8 channels.
Windows will start enumerating if names are the same (1 - product name).
Using different PIDs keeps it operating without uninstalls, as long as the configuration doesn't change.

4 - Native driver supports more than 2 channels!
I enumerated and tested a custom board with 4 inputs and 8 outputs just fine.

5 - Bit Perfect.
If you use the WASAPI audio interface, the output is bit perfect, phase correct, and will change frequencies with the source material.

6 - Audio stop.
The USB stream will start and stop with the source. It does not stay running.

7 - 24 Bit supported.
Probably 32 also, but did not test.

8 - Works through a hub.

9 - Appears to support the full 16.16 range for feedback. I did not mask the 3 lowest bits and works correctly.

10 - Volumes.
Not sure here. With enumerated as 7.1 surround, playback lower. As 2 channel it was correct. Probably a windows item.

11 - Limitations.
1 - No clock selector (i.e. SPDIF, ADAT, etc). They allow one, but will not provide a means to change it. Support a clock interrupt (not a selector).
2 - No DFU. Need your own solution.
3 - Not sure about HID, did not test.
4 - No ASIO. But see #5 above.
User avatar
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

Great information! Thanks. Have you tried an inputs only config? That is generally the application I would be interested in. Would be interested to know the max channels -- especially on an inputs only config. I believe it is 8 if I understood the Microsoft document correctly.
Respected Member
Posts: 283
Joined: Fri Mar 19, 2010 4:49 am

Post by bearcat »

Inputs only is fine. If you do inputs only, then #1 is applied without needing any changes. I did not test above 8 outputs, so not sure of the limit.

12 - Mixer not tested. I did not enable or test using the mixer option for the reference software.
Respected Member
Posts: 283
Joined: Fri Mar 19, 2010 4:49 am

Post by bearcat »

Let me correct myself above. I did not try an inputs only configuration. So I can't answer that one.

If you do outputs only (which I tried), it will then apply #1 automatically and does work.
User avatar
XCore Expert
Posts: 580
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

OK, thanks. For my work I typically want lots of inputs but usually don't need any outputs (sometimes want one or two outputs). I suppose if it needs outputs I could redirect to /dev/null so to speak ;-)
User avatar
XCore Legend
Posts: 1133
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

@bearcat - Thanks for your excellent work in this area and comprehensive compatibility notes. They will be useful for many users.

As correctly pointed out the key to making the current UAC2 (USB audio class 2) reference design work "driverless" on Windows 10 1703 onwards is:

Code: Select all

in the Makefile.

Failure to do that will get an entry in the windows system log saying "The driver could not find a feedback endpoint for an asynchronous data OUT endpoint on device \Device\xxxxxx".
Engineer at XMOS
XCore Addict
Posts: 194
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

Thank you so much for your work and documenting it here!! I was able to get multi-channel audio working on my custom board using this method. I am seeing a couple issues / inconsistencies with your findings.

First off my device is 8 into the PC and 2 for playback and I'm using a heavily modified version of the Reference Firmware.

1. The two USB 3.0 ports on the front of my computer do not behave as the USB 3.0 and USB 2.0 (they aren't blue at least, so I think they are 2.0) ports on the rear. Audio playback stops after a little while when using the ports on the front of my computer - the device enumerates properly. Just to make sure - were you able to test both USB 3.0 and USB 2.0 ports?

2. Asio4All was the only driver I was able to get both playback and recording to work when using Reaper. I did have to set the Buffer size to 1024, in order to get playback glitches to disappear. I could not get WASAPI to work.

3. Any ideas on a stand-alone DFU solution?
Posts: 20
Joined: Thu Aug 18, 2016 3:22 pm

Post by mx12 »

Trying to implement a 2in/2out USB on a XU208 CPU. Found that page very interesting, thanks!
My setup works great with Linux and Mac OS, however Windows doesn't work fully (2out is ok, 2in doesn't work). Android is also very difficult, works only if connect it from a fresh XMOS boot (disconnecting/reconnecting the cable breaks USB connectivity).
Just wonder if someone have some ideas/tips? I'm using the latest USB software (6.15.2rc1).
By the way: using the Thesycon driver give me the same problem: 2out ok, 2in nok(???)
XCore Addict
Posts: 131
Joined: Mon Apr 16, 2018 9:14 am

Post by MaximLiadov »

Keep in mind that Windows driver doesnt work if you just change channels config in fw. Windows doesnt check channels config at plug-in time. No. You do need uninstall drivers completely and reinstall it or you'd better change PID, change USB port for different channels fw.
New User
Posts: 2
Joined: Thu May 17, 2018 7:03 pm

Post by andyw »

mx12 wrote:My setup works great with Linux and Mac OS, however Windows doesn't work fully (2out is ok, 2in doesn't work).
I just ran into the same issue, and it looks like the cause is one bad byte in the output terminal descriptor for audio in:

Code: Select all

        .Audio_In_OutputTerminal =
            /* Output Terminal Descriptor (USB Streaming) */
            .bLength                   = 0x0C,
            .bDescriptorType           = UAC_CS_DESCTYPE_INTERFACE,
            .bDescriptorSubtype        = UAC_CS_AC_INTERFACE_SUBTYPE_OUTPUT_TERMINAL,
            .bTerminalID               = ID_OT_USB,
            .wTerminalType             = USB_TERMTYPE_USB_STREAMING,
            .bAssocTerminal            = 0x00,
            .bSourceID                 = FU_USBIN, /* 7  bSourceID Connect to analog input feature unit*/

            .bSourceID                 = ID_IT_USB,/* 7  bSourceID Connect to analog input term */
            .bCSourceID                = ID_CLKSEL,
            .bmControls                = 0x0000,
            .iTerminal                 = offsetof(StringDescTable_t, usbOutputTermStr_Audio2)/sizeof(char *)
I changed .bSourceID = ID_IT_USB above to ID_IT_AUD (the actual analog input terminal) and now I can get audio in on Windows 10!

Btw, this MSDN blog entry on how to get UAC 2.0 logs was really useful in debugging the problem.