Re: [pulseaudio-discuss] Pulseaudio alsa configure hook

2008-05-06 Thread Lennart Poettering
On Mon, 28.04.08 09:53, Colin Guthrie ([EMAIL PROTECTED]) 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

-- 
Lennart PoetteringRed Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/   GnuPG 0x1A015CC4
___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Pulseaudio alsa configure hook

2008-05-01 Thread Colin Guthrie
Sjoerd Simons wrote:
 Hi,
 
   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.
 
   For example a configution file like:
 
 @hooks [ {
func on_pulse_is_running
  pcm.!default { type pulse }
  ctl.!default { type pulse }
}
]

Just a quick question as I've not had a chance to try this out yet!

Does your code consider pulse as unavailable if it's suspended?

e.g. by running:

$ pasuspender annoying application that uses alsa in a weird way

Would the hook still try and push alsa sound via pulse?


It would rock if it didn't but I suspect it will :)

Col

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss