GNOME Bugzilla – Bug 325780
add an alsadmix sink and use esdsink as a fallback
Last modified: 2009-01-31 16:20:23 UTC
Hi! This was already discussed in #gstreamer, thanks again for your great help! I would like to put my final patches here for the records and for your consideration whether to adopt it. In Ubuntu we modified the current gstreamer sink structure a bit according to https://wiki.ubuntu.com/GstreamerAudioBackend. In short: We want to use ALSA by default, but only if dmix works (or, more precisely, if ALSA can play multiple sounds at the same time). There is a (not too small) minority of cards where dmix does not work; to retain mixing, we want to fallback to esound in these cases. Implementation: * I added a new sink 'alsadmixsink' which only succeeds to open if the sound device can be opened twice. * The sink priorities were changed as follows: alsadmixsink > esdsink > alsasink. * esd is configured to not run by default, but is started when somebody actually wants to talk to it (auto_spawn=1 in esound.conf) Would you like to adopt this approach? I will attach the patches here. Thanks, Martin
Created attachment 56783 [details] [review] add alsadmixsink, drop rank of alsasink - Add another sink 'alsadmixsink' to the alsa module; this checks whether dmix/multichannel works on the selected audio device and fails if not. - Drop priority of the original alsasink a bit, so that we can put the priority of esdsink between alsadmixsink and alsasink.
Created attachment 56784 [details] [review] adjust esdsink rank accordingly trivial patch, but for completeness. This adjusts the rank of esdsink to be lower than alsadmixsink, but higher than alsasink. It's relatively independent of the other patch; If you want to support this approach, but not make it a default, just register alsadmixsink with RANK_NONE and skip this patch, then it's at least easier for distributions to configure the system to their needs.
Is there any progress on getting this into CVS or are there some open issues left?
Is this bug still relevant in a pulseaudio world? I think after 3 years, it's probably not...
No, it's not IMHO. Also we don't use this patch in Debian/Ubuntu anymore