Reply 20 of 24, by darry
I just tested one of the ADS Tech Instant Music devices in Loopback with a U2 (both through Pipewire and JACK/Zita). I also did a recording test of an RMAA generated test file . The results are virtually identical to those with a CM6206 in all cases, which is not unexpected .
On another note, having given some more thought to the latency aspect, it struck me that the U2 (based on the XMOS XU208) is a UAC2 class USB audio device which runs in USB high speed mode (UAC2 allows the use of high speed mode but does not make it mandatory, so being UAC2 compliant does not guarantee use of high speed mode, AFAICT). This probably helps explain why I can set a period size as low as 32, or even 8 on the U2, but am limited to 45 (for 44.1KHz) or 48 (for 48KHz) for all UAC1 class 1 devices that I have tried setting low period sizes on (SPS-25, CM106, InstantMusic, UCA202). Additionally, UAC2 exposes information about device clock domains to the host, which may alleviate the need for resampling due to different clocks, at least in a scenario where there is only one source and one sink, if my understanding of http://visa.lab.asu.edu/gitlab/fstrace/androi … b1456a3cef310f0 is correct .
All this brings up the interesting questions
a) Would using UAC2/high-speed captures devices yield lower latency while also avoiding all my previously worked-around USB 1.1 issues ?
b) Would doing a) change my results in Pipewire ?
c) Are there any UAC2/high-speed captures devices with S/PDIF input available and, hopefully, affordable ?
I am willing to test a) and b) for myself, if I can answer c) . The ONLY possible answer to c) that I have found, so far, is https://www.minidsp.com/products/usb-audio-in … ace/usbstreamer . At 95 $US a pop, this is not eye-wateringly expensive (and certainly very reasonable for a niche product), but with duties, taxes and shipping, I would be looking at adding over half a grand $US to the BOM for 4 units . Obviously, I could just get one to test first, but if it works well, the temptation to get a few more would be hard to resist . Anyway, I will keep searching for cheaper alternatives .
EDIT : I installed and updated the latest Raspbian/Raspberry Pi OS 64-bit beta release and managed to compile a modern RT patched kernel for it (5.10.27) . I gave up on trying to run with Ubuntu Budgie's 5.11.0 kernel source (couldn't get it to patch successfully, maybe I was doing something wrong).
Anyway, public service announcement for anyone interested in compiling a Real-Time ( Fully Preemptible) patched kernel for an ARM64 platform:
Since somewhere around the 5.9 kernel version, to choose a Real-Time kernel preemption model, one must
a) Make sure to first complete the step that involves running "make bcm2711_defconfig" BEFORE running b) and c) or your changes will be overridden (you will end up with a non RT kernel)
b) Run make menuconfig and Disable Virtualization
c) while still running make menuconfig , make sure Configure standard kernel features (expert users) is enabled and exit/save settings
After that, following http://robskelly.com/2020/10/14/raspberry-pi- … and-preempt_rt/ and https://www.raspberrypi.org/documentation/lin … nel/building.md works fine as long as you are cross-compiling . If you are compiling locally on a Pi , the instructions in the second link will need to be modified as they are specific to building a 32-bit kernel (basically replacing zImage with Image and KERNEL=kernel7l with KERNEL=kernel8 )
It took me a while to find information pointing to points b) and c) .
EDIT2: Everything seems to work on newest Raspbian 64-bit beta with the RT patched 5.10.27 kernel . My search concentrates now on finding inexpensive UAC2 capable S/PDIF input devices that run in high-speed mode . If I manage to find some that are affordable, it could, as alluded to before, potentially simplify and cost reduce the setup by allowing use of a standard low cost PSU and a single low-cost USB 2.0 or 3.0 hub rather than having to resort to a USB PD capable hub and and a multi-TT hub, both of which are relatively expensive and and the second of which is additionally getting harder to find .
That all being said, if 12 milliseconds worth of latency and cheap shoddily built CM6206 (but sill functional) USB interfaces (or more expensive, harder to find, better built InstantMusic ones) are acceptable in someone's use case scenario (they are in mine), this solution is perfectly usable as is .
EDIT3: I have managed to find what I believe is a candidate for USB 2.0 highspeed UAC2 capture device with S/PDIF input at reasonable-ish price . It is based on the BRAVO/Savitech SA9226 https://datasheetspdf.com/pdf-file/1306864/SAVITECH/SA9226/1 , which I cannot even find on https://www.savitech.co/usb-products , which suggests that it might be discontinued (not an issue for me if availability is good). Anyway, I will test for suitability when I receive the unit that I have ordered .