(experimental) automatic sound mixing

Colin Walters walters at redhat.com
Fri Jan 7 03:55:59 UTC 2005


Hi,

I spent a bit of time today on an ALSA-level sound mixing solution, i.e.
this bug:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130593

Basically my solution was to allocate the IPC keys at the start of the X
session, and generate an ALSA config file on login which uses those
keys.  This avoids issues with possible IPC key collisions and is more
secure.  There's a little program alsa-launch which does this.  It
monitors your X connection and destroys the IPC keys and such when you
log out.

I had to patch alsa-lib to let it read a config from a file specified an
environment variable.  alsa-launch is part of alsa-utils now.  I'm sure
some people will complain this makes alsa-utils dependent on X; I guess
we'll need an alsa-utils-x11 package.

Also, I needed to add alsa-launch to the X startup; however there was no
programmatic way to do this in the current xinitrc setup.  So I
refactored the X init scripts so that packages can drop a file
in /etc/X11/xinit/xinitrc.d/ which adds to the DESKTOP_SERVICES
environment variable.  I then modified the dbus package to use this new
variable.

All the new packages are here:
http://people.redhat.com/walters/alsa/

These are based off the new ALSA 1.0.7 packages I uploaded to rawhide
today.

I'd like to get feedback on this and see how well it works for people;
I've just done some light tests with ogg123, rhythmbox, and xmms.
Particularly interesting is recording and complex ALSA applications.
Oh, and multiple sound cards.

If there are no objections I'd like to feed this all into rawhide in a
few days after it's gotten a bit of testing here and see how things go.
Hopefully for FC4 the idea of configuring applications for different
sound output backends will totally disappear. 

Longer term of course I'd like to not have to generate an ALSA config
file in /tmp; this kind of thing just makes sense inside the alsa-lib
code itself.  But this was just a quick one-day hack to see how well
asym could work as the default.

Comments appreciated.






More information about the Fedora-desktop-list mailing list