[pulseaudio-discuss] Pulseaudio alsa configure hook

Sjoerd Simons sjoerd at luon.net
Sun Apr 27 13:37:09 PDT 2008


  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 }

  will redirect the default alsa pcm and ctl to pulse iff pulse is running.
  (Assuming you defined the hook function correctly ofcourse)

  This is usefull for distributions that don't want to force their users to
  switch completely to pulseaudio, but have things a bit more dynamic :)

  The solutions isn't optimal though. It will mean that every program loading
  accessing alsa will try to make an (extra) connection to pulse to decide what
  to do. But i think it's the best we can do for now (or at least that i can do
  with my minimal knowledge of alsa).

  A nicer solution would be a way to always specify the pulse plugin as default
  and have a sort of fallback for when that fails.

  Comments on the patch appreciated :)

PS: I'm not on alsa-devel, so please keep me in the CC
GREAT MOMENTS IN HISTORY (#7):  April 2, 1751

Issac Newton becomes discouraged when he falls up a flight of stairs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pulse-running-hook.patch
Type: text/x-diff
Size: 3417 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20080427/aad047be/attachment.patch>

More information about the pulseaudio-discuss mailing list