Page 1 of 2

Windows 10 UAC2 native driver summary

Posted: Thu Jul 05, 2018 6:54 am
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.

Notes:

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

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.

Re: Windows 10 UAC2 native driver summary

Posted: Thu Jul 05, 2018 1:41 pm
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.

Re: Windows 10 UAC2 native driver summary

Posted: Thu Jul 05, 2018 4:17 pm
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.

Re: Windows 10 UAC2 native driver summary

Posted: Fri Jul 06, 2018 5:14 am
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.

Re: Windows 10 UAC2 native driver summary

Posted: Fri Jul 06, 2018 9:22 am
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 ;-)

Re: Windows 10 UAC2 native driver summary

Posted: Tue Sep 04, 2018 10:26 am
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

-DUAC_FORCE_FEEDBACK_EP=1
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".

Re: Windows 10 UAC2 native driver summary

Posted: Mon Nov 26, 2018 11:18 pm
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?

Re: Windows 10 UAC2 native driver summary

Posted: Wed Dec 05, 2018 2:13 pm
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(???)

Re: Windows 10 UAC2 native driver summary

Posted: Mon Dec 24, 2018 8:29 am
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.

Re: Windows 10 UAC2 native driver summary

Posted: Tue Feb 05, 2019 8:36 am
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,
#if (INPUT_VOLUME_CONTROL == 1)
            .bSourceID                 = FU_USBIN, /* 7  bSourceID Connect to analog input feature unit*/
#else

            .bSourceID                 = ID_IT_USB,/* 7  bSourceID Connect to analog input term */
#endif
            .bCSourceID                = ID_CLKSEL,
            .bmControls                = 0x0000,
            .iTerminal                 = offsetof(StringDescTable_t, usbOutputTermStr_Audio2)/sizeof(char *)
        },
#endif
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.

Andy