[Jack-Devel] Fwd: connecting to JACKD2 with low buffer sizes

Chris Caudle chris at chriscaudle.org
Mon Mar 26 15:40:21 CEST 2018

On Sun, March 25, 2018 5:32 am, Christopher Obbard wrote:
> This is on an ARM embedded system, with a single core 1MHz processor.

Is that a typo or are you really running on a 1MHz processor?  If so that
would be a really slow clock.  That would be two orders of magnitude
slower than most M class microcontrollers.

> I have a custom compiled 4.14 kernel with omap2plus_defconfig with the
> following config settings:

I would not consider CONFIG_PREEMPT_VOLUNTARY appropriate for low latency
use, and especially if you are really running a 1MHz processor.  Using the
full RT patch set would be recommended, or at the very least

> $ jackd -R -P95 -dalsa -dhw:0 -r48000 -p64 -n2
>> JackPosixProcessSync::LockedTimedWait error usec = 5000000 err =
>> Connection timed out
>> Driver is not running
>> Cannot create new client
>> CheckSize error size = 32 Size() = 12
>> CheckRead error
>> CheckSize error size = -1 Size() = 4
>> CheckRead error
>> CheckSize error size = 0 Size() = 12
>> CheckRead error

What audio hardware are you running?  If those messages all came right at
startup from jack it would seem that the parameters don't match something,
but jack usually gives better error messages than that.  There were never
any messages indicating that the requested sample rate was actually used,
word length used, etc?
You usually should see some messages like this at the end of jackd startup:

configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 3 periods
ALSA: final selected sample format for capture: 24bit little-endian in
3bytes format
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 24bit little-endian in
3bytes format
ALSA: use 3 periods for playback

Missing those messages could perhaps indicate that jackd was not able to
open the ALSA device at all.
Are you using an ALSA driver from the current kernel tree?

> Also, with higher buffer sizes sometimes I get xruns.

You are running PREEMPT_VOLUNTARY on a 1MHz processor, a more typical
configuration for low latency use is running PREEMPT or PREEMPT_RT on an
1800MHz to 3000MHz processor, so it is a little bit hard to know where to
If you are really running a 1MHz processor, there is  only time for 667
instructions for each 32 sample buffer at 48kHz rate.  That is not very
much for a general purpose OS.

> After enabling alsa debugging, the error is:
>> ALSA: PCM: [Q] Lost interrupts?: (stream=0, delta=221,
>> new_hw_ptr=181343, old_hw_ptr=181122)

I would start with a better scheduler, PREEMPT or preferably PREEMPT_RT. 
The usual advice these days is that you don't really need PREEMPT_RT, but
that is usually for someone running a multi GHz processor and running at a
period size 256 samples or larger.  For 64 or 32 sample period size on a
slow processor you are going to have to get aggressive with optimizing.

Chris Caudle

More information about the Jackaudio mailing list