[LAU] Jack 1 vs. 2

Fons Adriaensen fons at linuxaudio.org
Fri Feb 5 11:41:42 CET 2021


On Fri, Feb 05, 2021 at 09:43:07AM +0100, Peter P. wrote:

> Now which version are you using in the end?

On the machines I use for audio I'm using jack2 for the simple
reason that I run quite heavy things that could easily be too
much without multithreading, and that also tend to trigger the
running order problem. 

Re. the latter: most users will never be affected by this bug,
with 'normal' use it is quite unlikely to manifest itself. 
But if you have parallel paths and one of the clients is removed
and re-inserted a number of times (e.g. during development of
that client) it will show up. Also if you have number of clients
that run permanently (things like zita-mu1, ambisonic decoders,
xover filters, etc.) and others that come and go and connect
to the permanent ones.

> Have you reported a bug report which I could read to
> understand the problem better?

It was reported (along with a patch) to the Jack1 devs years
ago (I was still in Parma IIRC). Don't know if there are any
records of this apart form my own.

> Are you able to compile your own jack1 with your patch(es)
> applied and does it fix your problem?

Yes. But the patch is quite big, it affects a number of source
files and can't be factored into smaller ones. I had to create
some new internal data structures and modify some others, and
that meant that everything that depended on the old ones had
to be modified as well. Some changes could have been avoided,
but that would have meant having two data sets representing
the same state and needing to be kept in sync. That is bad
design and a sure recipe for future trouble, so I was quite
motivated to clean up the mess.
The essential changes also exposed a lot of very inefficient
algorithms. For example, if you make a new connection between
two clients that are already connected then there is no need
to recompute the running order, but it was done anyway just
because the existing logic required it. It doesn't matter if
you have just a few clients with a few ports. But this doesn't
scale well to bigger systems. So I decided to fix that at the
same time. That's probably why the patch was rejected.

Ciao,

-- 
FA



More information about the Linux-audio-user mailing list