Re: [LAU] Scarlett 3rd gen glitches (again) + Raspi 4

From: Florian Paul Schmidt <mista.tapas@email-addr-hidden>
Date: Sun Jul 19 2020 - 09:41:16 EEST

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.

Hi,

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 ...

Regards,
FPS

--
https://fps.io
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Mon Jul 20 04:15:02 2020

This archive was generated by hypermail 2.1.8 : Mon Jul 20 2020 - 04:15:02 EEST