USB code rewrite

196 views
Skip to first unread message

Børge Strand-Bergesen

unread,
Jan 2, 2019, 6:20:08 PM1/2/19
to audio-...@googlegroups.com
Hi guys, 

I've changed quite a few things in the USB code for the Audio Widget. The background was that it did not play music on one version of Android (5.1.1) on an old Xperia phone I have. Long story short: the Android device only supports 16-bit audio. It annoyed me to not be 100% functional with all USB Hosts. 

It took quite some trial and error to get to that point. On the way I ended up changing the code with:

- Introduction of audio streaming interface ALT2 for 16-bit audio resolution in addition to historical ALT1 for 24-bit audio
- Configuration interface wrapped in Makefile -DFEATURE_CFG_INTERFACE (default off)
- UAC2 clock selector wrapped in Makefile -DFEATURE_CLOCK_SELECTOR (default off)
- HID interface wrapped in Makefile -DFEATURE_HID (default off)
- Volume control wrapped in Makefile -DFEATURE_VOLUME_CTRL (default on)

There has been some talk about reducing code complexity. I've started carefully taking SDR code and test modes out of the UAC1/2 tree. I plan to do more of that. With all major OSes now supporting native UAC2 I imagine that as the future default image. Then UAC1 should be stripped down to a pure Full Speed fallback. It's a hassle to maintain both UAC1 and UAC2 on both USB 1.1 and USB 2.0. Another thing I'd like to toy with is noise shaping CPU delays for less periodic current draw. But that'll be a project for the future.

All the code has been pushed to branch audio-widget-experimental. Next I plan to full verification on a number of OSes and then publish some binaries. In the meantime feel free to build it from source. 

The ASIO driver for Windows has been a huge enabler for the Audio Widget! With UAC2 support in Win10 I no longer maintain it. I'll be happy to lend a hand if somebody wants to make new builds of it.


Cheers,
Børge



Reply all
Reply to author
Forward
0 new messages