]> git.alsa-project.org Git - alsa-plugins.git/commit
Pulseaudio alsa configure hook
authorSjoerd Simons <sjoerd@luon.net>
Wed, 30 Apr 2008 19:18:15 +0000 (21:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 6 Jun 2008 13:54:58 +0000 (15:54 +0200)
commit5d1c1b862603937bc28a66c58131b7bebc11e8c6
treeff322847e13ab5217dbac05baa8538dcf1041aab
parentb3f732f4d30f7151e7c4844e2ef9296cb59b61bf
Pulseaudio alsa configure hook

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.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
pulse/Makefile.am
pulse/conf_pulse.c [new file with mode: 0644]