[Ardour-Users] jack and ardour disconnecting/crashing while using Csound

Fernando Lopez-Lezcano nando at ccrma.Stanford.EDU
Sat Oct 25 11:16:27 PDT 2008

On Sat, 2008-10-25 at 00:50 -0400, Hector Centeno wrote:
> Thanks Fernando for this information. I didn't know I had to set the
> priority of Jack at compilation time (also I don't remember seeing any
> flag for doing so, but I have to check that again). 

There is no option for that, I'm just patching the source. 

> So if I'm using
> rtirq and the audio interface gets a priority of 70 then I should set
> Jack to a lower one (lets say 60), right? And then Csound should have
> a priority lower than Jack... but what about Ardour? Is it better to
> not use rtirq if you have a fast system?

I think there is no reason no to use rtirq. I think the priority order
should be:

- top dog: audio interface interrupt handlers (set by rtirq)
- next down: jack realtime threads (as compiled)
    two flavors:
      jack itself higher than
      jack client audio threads
[the jack client threads used to run at jack priority - 1, that has been
just changed in svn to be jack priority - 5 to give room to exceptional
clients that need additional threads to run at higher priority than the
audio thread, but not preempt jack itself]
- next: everything else

(of course it is more complicated than this, rtirq does make some
exceptions for stuff that should be higher than the audio cards)

In general I think most audio programs that use jack don't have
additional threads that run in the SCHED_RT realtime scheduler. There
are exceptions of course, for example pd can run some stuff at SCHED_RT
but the default priorities are very low (and adequate). I don't know
about csound...

-- Fernando

> On Fri, Oct 24, 2008 at 7:41 PM, Fernando Lopez-Lezcano
> <nando at ccrma.stanford.edu> wrote:
> >
> > Strictly speaking Jack does not "pick priorities". It just uses whatever
> > was compiled in the binary. Statically. Whether that choice is optimal
> > in a given box depends on what the distribution packagers did. If you
> > add something like rtirq to the mix (and it was not accounted for in the
> > original tweaking) you most probably will have to "tune" the priorities
> > of jack.

More information about the Ardour-Users mailing list