Another little update .
- I received a working Douk U2 which took the place of the E10K as an output device . As this is a USB 2.0 high speed device, I connected it directly to one of the Pi 4's VL805 managed USB 2.0 ports with no issues .
- A bonus of using the the XU208 based Douk U2 is the fact that it supports S32_LE sample format which apparently work fines at 44.1KHz on the Pi 4 (S24_3LE does not)
- I switched to 64-bit Raspbian (technically beta) in the hope of better performance and, with identical settings, Qjackctl indicates slightly lower DSP load, AFAICT (and recall)
- I also patched and compiled a real-time kernel (5.4 based), thanks to info found here http://robskelly.com/2020/10/14/raspberry-pi- … and-preempt_rt/ .
- I disabled apt-daily-upgrade.timer (once this works, no need for updates or even an Ethernet connection, not to mention the CPU load during the updates can generate x-runs)
- I applied the tweaks mentioned here https://madskjeldgaard.dk/posts/raspi4-notes/ … ning-the-system (for some reason the CPU governor switches back to on-demand at every reboot, so I switch it back to performance in the S/PDIF script) .
- I decided to overclock the Raspberry Pi 4 to 2.0 GHz . I have heatsinks + active cooling, and temps went up by approximately 3 degrees
- I lowered jackd period size to 32 and set priority to 90 (had to use chrt -f 90 as just passing -P 90 as a parameter to jackd did not seem to work)
- I re-tested latency and ran several multiple hour-long playback sessions with 2 input sources and insure no x-runs during use (x-runs only happen for about 10 seconds if script is started at boot, which I consider a non issue).
Now, some latency results -->
a) 44.1KHz loopback to test baseline latency of measurement tools :
b )44.1KHz loopback using setup in a), but running through S/PDIF mixer which outputs 44.1KHz
c) 44.1KHz loopback using setup in a), but running through S/PDIF mixer which outputs 48KHz (Zita-A2J doing SRC)
If we substract RTT duration a) from that in b) , we get 11.976 milliseconds pass-through latency for the S/PDIF mixer . It may be possible, though not necessarily reliable, to lower jack period length even lower and get 10 milliseconds and/or tweak the Zita-A2J period size (CM6206 absolute minimum is 45 and current value is 64), but I think that we are close to what a PI 4 can hope to achieve (at least with my current audio hardware that I am using and my current skillset).
- Keep disabling unnecessary services
- Add a fourth CM6206 device and re-test/teak
- Try to find cheap replacement for CM6206 based units with lower hardware latency (good luck). Latency is unchanged if I bypass Jack-mixer and loop input to output using jack, so most of the currently measured latency seems to to due to the input device device used .
If anyone's curious, this is what a period of 8 for output and 45 for input (minimum if 44.1KHz) and 48 (minimum if 48KHz) produces in terms of RTT :
It does seem to run without x-runs, at least during summary tests . I would hazard to guess that this is about as low as the hardware goes, or about 7.5 milliseconds of RTT latency, in other words . My guess is that it would be unstable in the long run . EDIT : Yup, it is unstable . I get intermittently high intermodulation distortion numbers even without x-runs . My guess is silent (as in unreported or /dev/nulled) Zita-A2J issues .
As mentioned here Re: Bought this (Modern) hardware today , the CM6206 based units that I own have atrocious built quality and what seems to be significant hardware latency, so I am trying some old-ish ADS Tech Instant Music devices instead . These look better build use a TI/Burr Brown USB controller/DAC/USB/SPDIF input/SPDIF output chip . I hope they will work at least as well as the CM6206 based units .
EDIT : I tried using the Cakewalk SPS-25 as an input device under instead of a CM106 . The RTT latency was almost the same at about above 11 millisecond (or maybe a millisecond or so less than a CM106, unless I made some measurement mistake (it's almost 4AM where I am), so nothing to write home about). If semi-pro gear does not give me better latency than that (and that was the device's "advanced mode" activated), I doubt the ADS Tech stuff will be any better on that front . Oh well .
EDIT : I am thinking of trying PipeWire as a unified solution . This is all both fun and educational !