Posts: 3
Joined: Mon Mar 07, 2016 7:28 pm

JACK Glitches with Pi 3

Mon Mar 07, 2016 8:07 pm

Hi all,

Am having problems with nasty pops/glitches every 2-3 seconds running low-ish latency audio code on my Pi 3.

Pi 3, CPU scaling set to performance on all cores
Behringer UMA25s audio/midi interface (it's cheap, class-compliant, has audio+midi+keys+faders, and runs off batteries)
jackd2 using ALSA backend, headless mode, priority = 89 (can run it at 99 as root if need be), 3 buffers, 128 or 256 samples (running at 256 for now)
Portaudio v19 configured for jack
Raspbian jessie lite, with the various additional packages required for jack.

I've checked my portaudio code with an accurate timer - each callback cycle is reliably completing in 3000us or less. There aren't any syscalls, locks etc in my code which could potentially cause dropouts.

I've switched off the services listed on Jeremy's wiki page (haven't tried disabling wifi, which I suspect may be a culprit, though my Pi is running on a wired LAN anyway).

The 256-sample buffers I'm running are equivalent to 5800us at 44.1KHz, so the processing window ought in theory to be maybe 4500us max, assuming max. 75% system load.

Most of the time it's OK, with no XRUNs reported, but every second or two I get loud pops/clicks/dropouts.

Any suggestions as to what to look for? Make sure Wi-Fi is fully disabled? Try a different USB audio device? Something else?

Thanks much!
- Sb.

Posts: 3
Joined: Mon Mar 07, 2016 7:28 pm

Re: JACK Glitches with Pi 3

Tue Mar 08, 2016 6:37 pm

So I've narrowed it down to pre-emption - even though I've got priority dialed up to max for both jackd & my synth process, something is pre-empting midway through the processing callback & pausing execution of my code for about 2.5ms.

This is obviously less than ideal when trying to stream 6ms buffers reliably.

Any ideas where to look?

Posts: 4
Joined: Mon Mar 07, 2016 5:31 am

Re: JACK Glitches with Pi 3

Fri Mar 18, 2016 7:13 pm

I have quite similar problems with my setup (RPI2 + Zoom R16 as audio interface). The random popping is there what ever i try. With jackd no xrun but pops. I also tried yoshimi with alsa output and got similar pops.

I think it would be worth to try to dedicate a processor core for audio software. Quite good tutorial exists: ... linux.html. I don't have time to try it right now but I'm going do it whenever I have.

Posts: 5
Joined: Sat Oct 01, 2016 10:46 pm

Re: JACK Glitches with Pi 3

Wed Oct 05, 2016 12:38 am

did you guys ever find a cure for this problem? i've got glitches with Jack on my RPi3 when using an external USB card. I've tried dedicating an entire core to just Jack, using isolcpus in /boot/cmdline.txt and schedtool, but the glitches persist. Have gone down so many dead ends trying to find a solution, and hoping one of you figured it out? Thank you!!

Return to “Graphics, sound and multimedia”