FS#33425 - [libao] libao-1.1.0 breaks ALSA software mixing
Attached to Project:
Arch Linux
Opened by René Herman (rene) - Thursday, 17 January 2013, 13:29 GMT
Last edited by Gaetan Bisson (vesath) - Sunday, 17 February 2013, 23:28 GMT
Opened by René Herman (rene) - Thursday, 17 January 2013, 13:29 GMT
Last edited by Gaetan Bisson (vesath) - Sunday, 17 February 2013, 23:28 GMT
|
Details
Description:
libao-1.1.0 doesn't by default use the "default" ALSA PCM device but tries, depending on the number of channels of the source, the devices: channels : device ================= 7, 8 : surround71 6, 5 : surround51 4, 3 : surround40 2 : front 1 : default It only falls back to "default" when these fail. Specifically, also for regular stereo sources, it uses "front" rather than "default", but "front" isn't software-mixed by ALSA as is the default device. Reproduce the problem by starting, say, two ogg123 instances on a machine that has a "front" PCM (any one, basically) -- and for which the default ALSA device is not in fact the pulseaudio device (any sane one, basically). The second instance will bomb out (unless, by the way, the "front" PCM was already busy so that the first ogg123 retreated to "default" automatically). It's probably debatable if the libao behaviour is nice or not generally, but what's certainly not nice is that even normal stereo sources are by now by default no longer mixed when played through a libao player; ALSA once went to great lengths to make sure that it is. /etc/libao.conf is an arch-linux addition, and this behaviour can be changed (and restored to its libao-1.0 state) by adding "dev=default" to it. I believe this should be done: libao is used by the most basic players, and their users expect "no thrills" ALSA behaviour... |
This task depends upon
Closed by Gaetan Bisson (vesath)
Sunday, 17 February 2013, 23:28 GMT
Reason for closing: Fixed
Additional comments about closing: libao-1.1.0-3 in [extra]
Sunday, 17 February 2013, 23:28 GMT
Reason for closing: Fixed
Additional comments about closing: libao-1.1.0-3 in [extra]
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/asound.conf?h=packages/pulseaudio-alsa
Now, unfortunately, I see that the wiki:
https://wiki.archlinux.org/index.php/PulseAudio
mentions doing this just after commenting that "this section is out of date", but that comment has been mispositioned: setting the default ALSA device to pulse is not out of date, and has nothing whatsoever to do with systemd. Looking over the page, I'm not all that sure where someone once intended that outdated-warning to go, and given that I'm not a pulseaudio user, I guess I'll not edit the page myself but I do believe that it's only that bit of advice about making pulse actually be the default ALSA device which should be made more prominent for Pulse users.
EDIT:
I notice that that PulseAudio wiki page does advice to set default_driver=pulse in /etc/libao.conf a bit below, so I guess my comment would boil down to augmenting that bit of advice with, as you said, mentioning "... and remove dev=default" and additionally (a pointer to) the alternative of setting the default ALSA device to pulse. That last option is a catch-all for more than just libao, so I believe that has some additional value.
EDIT2:
Did a s/driver/device/ above and added the PulseAudio wiki link -- and am now wondering if people actually get an email-alert not only when a new comment is placed but also every time an edit is made. If so, I need to make sure that I do fewer edits... ;-)
As for the issue, I actually have pulseaudio-alsa installed. I suppose "dev=default" just conflicts with "default_driver=pulse" for whatever reason, as removing the former lets Pianobar access the audio device. If I don't remove "dev=default" after changing the default_driver to 'pulse', I get a "/!\ Cannot open audio device" error from Pianobar.
So I would assume all PulseAudio users have to remove "dev=default" unless there's something unique to my setup.
Edit: I should note that if I simply leave libao.conf alone with the default options (default_driver=alsa+dev=default), then I get this error in Pianobar: "ao_alsa ERROR: Unable to open ALSA device 'default' for playback => Invalid argument
/!\ Cannot open audio device"
The default libao.conf just sets sane defaults (and "dev=default" is required for that, as this bug report shows).
As with any configuration file, you cannot change parts of it (such as "default_driver=pulse") and leave the rest as it is: it should be modified as a whole.
In this particular case, I think it is crazy that pulseaudio should have problems with an innocent "dev=default".
Anyway, thanks a lot René for editing the wiki, and if you don't find that's enough, please create a separate bug report against pulseaudio.