[LAU] Scarlett 3rd gen glitches (again) + Raspi 4
Florian Paul Schmidt
mista.tapas at gmx.net
Sun Jul 19 08:41:16 CEST 2020
On 7/18/20 8:28 PM, Iain Mott wrote:
> Hi list,
> I have a Focusrite Scarlett 3rd Gen interface that is producing audio
> glitches with a Raspberry Pi 4 running a realtime kernel (or not). I had
> similar problems on a laptop and on a desktop. On the laptop however it
> now runs perfectly with the very latest Linux Mint and the standard
> kernel. On my desktop I get acceptable results with AV Linux although
> haven't tried it with the latest Mint. There are no error messages
> reported or overruns, just glitches which are independent of buffer
> sizes and sample rates.
on a rpi 4 and with a "RT-PREEMPT-FULL y" kernel you also want to change
the IRQ thread priority of the xhci (usb host controller). I think it's
always on the same irq line (at least it's for me on two different rpi4s).
This should do the trick:
schedtool -F -p 90 $(pidof irq/38-xhci_hcd)
This seems to make the audio processing on my rpi4 *much* more robust to
SD-card accesses. Before my daily borgbackup job at 6am caused a storm
of xruns. Now none at all anymore.
You mentioned no xruns reported by the software so in principle this
_should_ have no effect. Possibly the software xrun reporting is broken
though, so give it a shot.
Also make sure that you run your audio processing threads with a realtie
priority higher than 50 (the default priority for irq handler threads in
the kernel). With jack I'd recommend running it with
jackd -R -P 80 ...
More information about the Linux-audio-user