[pulseaudio-discuss] Pulseaudio alsa configure hook

Lennart Poettering mznyfn at 0pointer.de
Tue May 6 11:54:38 PDT 2008

On Mon, 28.04.08 09:53, Colin Guthrie (gmane at colin.guthr.ie) wrote:

> Sjoerd Simons wrote:
> >   The attached patch extends the alsa pulse plugin set with a alsa
> >   configuration hook. Allowing one to specify some configuration parameters
> >   that only come into effect when pulseaudio is running.
> I was waiting with baited breath after your chat on IRC as to what your
> solution would actually be!
> I like it!
> I think the overhead at initialisation is probably OK, although I guess
> it depends on how an application works - e.g. if it constant opens and
> closes alsa connections then does this overhead mount up? If not then
> this looks like a good solution.
> That said Lennart has said in the past that he didn't like the idea of
> Alsa  automatically falling back to h/w access if pulse isn't
> responding. (this was in reference to tweaking the alsa plugin itself,
> rather than this approach which is slightly different conceptually,
> albeit with the same end goal). I think his comment at the time was "it
> masks configuration problems".
> Do you have any thoughts on this Lennart?

I think that the patch is OK although it does have some problems as
Sjoerd already pointed out.

My plan for the future is to enable auto-spawning by default in
addition to starting PA by gnome-session. This will tape over these
problems, too. 

The reason for this is that as it stands right now, PA doesn't really
work from the console. Since console logins don't have anything like a
session manager, we cannot really start PA from there. Same with SSH
logins or System services using PA. Unfortunately console logins are
still very important for a11y people, and audio happens to be too.

So, PA will be started as user-daemon (not session daemon!) from
session managers, in addition to be started by auto-spawning. This
will tape over configuration problems, but heck, I see no better
way. Then I will write a small module that terminates PA if a) no
client is connected anymore and b) the user owning it is not logged in
anymore according to CK and c) some time has passed. Then I'll add
some code that PA won't terminate anymore when an X11 connection
dies. And then everything is bright an shiny.

That way PA will probably feel more robust to many people and we'll win
the hearts of our a11y people ;-)

So, in summary: I don't think Sjoerd's patch is flawless, or that it
is the way to the future. But it's an OK temporary fix on our way to
world domination. It get's the "Approved by Lennart" stamp. ;-)


Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

More information about the pulseaudio-discuss mailing list