Re: [LAU] Testing JACK and PA latency

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-user@...>
Date: Friday, September 20, 2013 - 12:57 am

On Fri, September 20, 2013 9:47 am, Len Ovens wrote:

It's been working for me on fedora and debian since 2009 at least (apart
from that nasty bug that slipped in mid last year). Maybe you are running
ubuntu?

> So there are a

Pulse Audio is the official sound management tool/layer for at least 4
high profile mobile operating systems. The PA developers have invested a
lot of time and effort on making it functional and useful in both desktop
and mobile environments. In addition there is a lot of Policy Kit
functionality that is extremely unlikely to find it's way into JACK. There
are certain members of LAD who would likely give up FLOSS altogether than
accept the policy kit functionality of PA in JACK.

In addition PA and JACK teams have different development priorities that
require contradictory trade offs to be made. I don't see this as a major
issue as long as PA and JACK coexist peacefully and things are getting
pretty good in that regard. As you rightly note things are more stable now
that they have ever been.

Myself and some other professional audio devs working for large
multinational companies that have a vested interest in high performance
mobile operating systems are seeking to isolate performance bugs with the
combination so that JACK and PA can be run in unison at low latency on
systems that currently do not have ootb support for JACK. If that turns
out to be an unattainable goal then we will find a way to at least make it
possible so that JACK and PA can be used interchangeably.

I have been running the latency test now for a few hours straight and I
have seen varying numbers reported down to as low as 5ms and as high as
1300ms. I would like to find the cause of the erratic behaviour. After
carefully monitoring jack_delay and top it appears to be PA that is at
fault but I am not yet able to pinpoint the cause.

Changing the sample rate from 44100 to 48000 in /etc/pulse/daemon.conf did
not fix the problem. This device is an onboard hda_intel 2 channel card.
Surprisingly for me it is performing well at 64 frames/period. Given that
I saw similar results at 1024 frames/period my suspicions are with PA.
Still the erratic behaviour might be a priority issue, kernel/driver issue
that is causing the problem and not related at all to PA. At the moment I
am just guessing as to the real cause of the observed behaviour.

It would be useful if other people have the time to run the test procedure
on their systems too to get a better overview of how widespread the
problem is.

Here's what I am doing:

Preliminary step:

vi ~/.pulse/client.conf

add the following line:

autospawn = no

TEST PROCEDURE

1: Connect the headphone/speaker output to the mic input with a physical
cable. You could use the sytem mic directly but then you have to listen to
an annoying signal tone at approx 600hz so the cable is a more pleasant
experience.
2: console: pulseaudio -k
3: start jack with the following settings or as low as you can go 64/48000/2
4: console: pulseaudio -D
5: console: jack_iodelay
6: console: ecasound -f:32,2,48000 -b:64 -i alsa -o alsa
7: disconnect system_capture (in) from pa_source (in)
8: connect system_capture (in) to jack_delay (in)
9: connect jack_delay (out) to pa_source (in)

open up gkrellm so you can monitor the system load
open up a console with top to monitor system load and application load
check the output from top against the console messages from jack_delay

Do you get wildly fluctuating results too or is your system stable at a
specific latency measurement?

This is a real issue not an academic theoretical exercise. Anyone who has
the time to provide feedback will be making a useful contribution to the
progress of Linux Audio Development.

If you do feel inclined to participate please also report your system stats:

PA/kernel/sound device/jack/cpu/mem/video/etc...

If for any reason you do not see any value in this process I will
appreciate if you start a new thread for that discussion.

> 1) for running desktop apps through jack for simplicity of setup. This

In our tests we have found netjack to be incredibly useful for a large
range of high performance/high bandwidth processes. In general I prefer to
use JACK but there are also completely valid business and corporate uses
for PA that cannot be ignored if we want to see wider adoption of JACK.

--
Patrick Shirkey
Boost Hardware Ltd
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAU] Testing JACK and PA latency, Patrick Shirkey, (Thu Sep 19, 8:46 am)
Re: [LAU] Testing JACK and PA latency, Fons Adriaensen, (Thu Sep 19, 9:42 am)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Thu Sep 19, 10:04 am)
Re: [LAU] Testing JACK and PA latency, Fons Adriaensen, (Thu Sep 19, 10:46 am)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Wed Sep 25, 1:32 pm)
Re: [LAU] Testing JACK and PA latency, Len Ovens, (Thu Sep 19, 2:01 pm)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Thu Sep 19, 2:21 pm)
Re: [LAU] Testing JACK and PA latency, Len Ovens, (Thu Sep 19, 11:48 pm)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Fri Sep 20, 12:57 am)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Fri Sep 20, 8:59 am)
Re: [LAU] Testing JACK and PA latency, Fons Adriaensen, (Fri Sep 20, 10:31 am)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Fri Sep 20, 10:41 am)
Re: [LAU] Testing JACK and PA latency, Fons Adriaensen, (Fri Sep 20, 3:13 pm)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Fri Sep 20, 6:07 pm)
Re: [LAU] Testing JACK and PA latency, Fons Adriaensen, (Fri Sep 20, 7:08 pm)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Sat Sep 21, 11:27 am)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Thu Sep 19, 3:40 pm)
Re: [LAU] Testing JACK and PA latency, Fons Adriaensen, (Thu Sep 19, 12:31 pm)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Thu Sep 19, 12:35 pm)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Thu Sep 19, 10:26 am)
Re: [LAU] Testing JACK and PA latency, Hartmut Noack, (Thu Sep 19, 9:20 am)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Thu Sep 19, 9:39 am)
Re: [LAU] Testing JACK and PA latency, Len Ovens, (Thu Sep 19, 1:49 pm)
Re: [LAU] Testing JACK and PA latency, Patrick Shirkey, (Thu Sep 19, 2:04 pm)