[alsa-devel] ALSA/pulseaudio problem workaround

Raymond Yau superquad.vortex2 at gmail.com
Sat Mar 19 04:18:29 CET 2011


2011/3/15 Craig Bourne <craigbourne at gmail.com>

>
>
> [cbourne at speedy ~]$ audacity
> Cannot connect to server socket err = No such file or directory
> Cannot connect to server socket
> jack server is not running or cannot be started
> Expression 'stream->capture.pcm' failed in
> 'src/hostapi/alsa/pa_linux_alsa.c', line: 3653
>
[ It should be noted that, despite the error response, audacity produce
> audible output only if jack is NOT running-- else, if jack is running,
> everything looks normal but there is no sound ]
>
>
 [ Here sound is produced by audacity 1) without jack running, 2)  with
jackrunning using the startup/shutdown scripts 3) with jack running but
without

> the scripts.  Though I have no metrics to share with you to support this,
> it
> is my repeated observation that procedures 1) and 3) produce far more noise
> than does procedure 2) in this testing scenario. ]
>

it is because audacity use portaudio and there are three hostapi ( backend )
: alsa ,oss and jack on linux

"Host :ALSA " or "Host :JACK" in audacity preference - "Devices" -
"Interface"

When portauio initialise , it will probe all the devices of available
hostapi for the user to select in "Preference"

so it will try to connect to JACK server to find out whether it support
duplex or not

For alsa  builddevicelist()  add those "hw" devices of the sound cards , it
also add some"plugin" which is not in ignored list and finally two devices
"dmix" and "default"

seem the message 'stream->capture.pcm' is related to "dmix" since "dsnoop"
is in the ignored list

if you are still using "pcm.pulse" as "default" and does not disable
autospwan of PA server ,PA server may autospawn to compete with JACK server
for the sound card

I have dobut about using "Jack" and "Pulse" at the same time since "Jack"
application usually aim at "low latency" while "Pulseaudio" is aim at
reducing the number of wakeup for "power saving"


More information about the Alsa-devel mailing list