Those of you – you poor, poor people – who read the Fedora development mailing list – were treated this week to a flamefest (or, as it is classically referred to in the British press, ‘full and frank exchange of views’) regarding the change to the official GNOME audio volume control applications which will appear in Fedora 11. The debate was expertly summarized in the latest Fedora Weekly News by Oisin Feeley. However, I’m going to take advantage of my little soapbox to go over it again, myself, in what will obviously be a way more biased towards the truth (otherwise known as ‘my point of view’).
Here’s the central point of contention. In GNOME 2.26, the two programs which deal with setting the audio volume – gnome-volume-control and gnome-volume-control-applet – have been more or less rewritten. The old gnome-volume-control looked like this:
(screenshot stolen, with apologies, from Piraja in this thread, since I don’t have a copy of the old app to hand). The new gnome-volume-control looks like this:
As you can see, they’re really rather different. The old one was more or less a classic ‘big list o’ sliders’ mixer, which exposed the raw mixer elements as provided by ALSA, and let you tweak them all directly. The new application is nothing like this at all. It’s really an interface to PulseAudio’s volume control system, which does not expose the raw ALSA mixer elements to you at all. What you get is a single volume slider. Slide it up, things get louder. Slide it down, things get quieter. You don’t have to look at twenty different sliders and wonder what the hell they all do any more.
In many cases, this is great. The basic idea – that the default volume control application should not expose every little element of control available on your sound card, but make it easy to turn the sound up and down – is a good one. The Pulse-based system also enables some other neat stuff, like letting you pick which sound ‘card’ (including things like USB headsets and webcams) you want to use to play which sounds, like pavucontrol has let you do for a few releases now.
However, this extremely simplified system comes with a couple of drawbacks. The biggest one – and it’s something of a whopper – is this: you can’t pick an input channel. If you’ve got multiple sound devices in your system – say, an onboard sound card, an expansion card, a webcam, and a USB headset – you can pick which device you want input to come from. Which is nice. But you can’t pick which channel on that device you want the input to come from. In practical terms – if you want to record (or monitor) from line-in, but the default is mic-in, you’re in trouble. Ditto if you want to record or monitor from the front mic, but the default’s the rear mic. Or vice versa. If the ALSA default input channel isn’t the one you actually use, gnome-volume-control no longer provides any way for you to switch.
This isn’t some kind of braindead interface design or excessive simplification on the part of the designers. It’s just a feature that didn’t get implemented yet. Lennart wants to do it in a reasonably smart way – only expose elements which are really ‘genuine’ input channels you might actually want to select – and that’s somewhat tricky. He’d also like to implement jack sensing, for compatible hardware, so that when you plugged in a mic it’d automatically get activated. So, in future – we’re expecting around the Fedora 12 timeframe – this will get fixed. For now, though, it isn’t, and that’s a rather giant hole in the new system.
The second drawback is that Pulse’s abstraction of volume control is not yet perfect. At present, it more or less just turns the primary mixer element – the one that shows up further to the left in a traditional mixer application – up and down. On most cards, this is enough to give you a proper range of volume control without any other elements getting twiddled. If you turn it up to 100%, everything gets nice and loud; turn it down to 0%, and everything goes quiet. Great. So for most cards, the Pulse system works fine already.
However, on some cards it doesn’t. On some cards, even if the ‘primary’ element is at 100%, if another element isn’t raised, everything’s still really quiet. Or even totally inaudible. In the past, most people would notice this, fairly quickly discover that moving one of the other mixer elements sorted the problem out, and then probably forget about it. With the new design, you can’t do this. You turn it up to 100%, everything’s still really quiet, and you’re pooped. The counterpart to this case exists, too – cards where, even if you set the ‘primary’ element to 0%, you can still hear sound unless another element’s turned down to 0. There’s even more advanced cases, like a card that has a separate channel for the rear speakers and another for the subwoofer – if you turn down the ‘primary’ element, the front speakers go silent, but you still get sound coming out of the rear speakers and the subwoofer. Which is a bit disconcerting.
This kind of bug can be fixed. In some cases we just have to add an entry to the ALSA database of default mixer settings, so the secondary element that messes things up is set to a level so that adjusting the primary element does what we want. In others, Pulse can be tweaked to actually control multiple ALSA elements when you drag the single Pulse slider – so, on the card with separate elements for the surround speakers and the subwoofer, moving the new “Volume” slider adjusts all three ALSA elements, and everything just gets quieter or louder as you’d expect. However, we haven’t yet fixed all the cases we know about, and the fact that several have come to light already through Fedora 11 pre-release testing is a pretty strong indicator that there’ll be more bugs of this kind that only show up once Fedora 11 is released.
The final drawback to the new system is it simply doesn’t cover some less common use cases. Some people want to play back music from a line-in or aux-in, for instance. Aside from the input switching problem, the new gnome-volume-control also doesn’t let you set the monitor volume for input channels.
So, we have a radical new design which is genuinely simpler and more user-friendly than the old one, but causes some regressions due to features not yet being implemented, and bugs that have always existed becoming more important due to the simplification removing the ability to easily tweak the settings. Sound familiar? Yep, it’s a situation that happens often enough in software development.
What I pushed for is, simply, a fallback mixer for Fedora 11. The new mixer is great, it’ll do the job for most users in Fedora 11, and they’ll appreciate the simplicity. However, there are going to be a significant number of users who fall foul of either the input switching problem or one of the manifestations of the ‘slider doesn’t control the volume properly’ bug. Until the input switching feature is implemented in Pulse and g-v-c, and most of the volume control bugs are fixed, we really need to keep providing a graphical mixer in all default Fedora 11 installations, so those who are stuck with one of these problems can fix it without recourse to the console. This is what the flamefest was about, and – I’m happy to say – that position pretty much carried the day. Fedora 11 should ship with either gnome-alsamixer, or the old gnome-volume-control (under a different name), installed by default alongside the new gnome-volume-control. If the new mixer doesn’t do the job for you, you’ll still have a traditional graphical mixer with full access to all the ALSA elements available so you can get what you need.
If you find yourself in the position where the shiny new gnome-volume-control doesn’t give you a decent range of adjustment of your output volume – it’s too quiet at maximum, too loud at minimum, doesn’t have a wide enough range, or your card has separate mixer controls for separate speakers – please file a bug in Red Hat Bugzilla (component ‘pulseaudio’), and mark it as blocking the bug ‘AlsaVolume’. This bug has a procedure to follow to provide the information necessary for the bug to be fixed.
What does this mean for users of other distributions? Well, I looked at Ubuntu. I didn’t actually check a Jaunty (9.04) install, but according to this bug report, it shipped with the old gnome-volume-control installed by default. Apparently they don’t consider the new one ready for prime time yet. The new one is available, but not installed by default, in the package gnome-volume-control-pulse.
Mandriva 2009 Spring, as far as I can tell, is shipping with the new mixer, and no fallback installed by default. Of course, Mandriva defaults to KDE in the DVD edition and the KDE Live CD is above the GNOME Live CD in the download list, and most Mandriva users use KDE, so most MDV users won’t notice this issue (it really only affects GNOME, as KDE’s kmix has not been changed at all to the new simplifed Pulse interface). But if you’re using GNOME on Mandriva, you might want to be aware of this issue, and be ready to install gnome-alsamixer if you need it.
For any other distribution – if your distro ships GNOME 2.26 from upstream, you’ll likely get the new mixer. So be aware of the changes and the background, as discussed above. If you need access to the raw ALSA mixer elements, use gnome-alsamixer or alsamixer from the command line (you may need to use the -c and -V parameters to specify the card number you want to work on, and the ‘capture’ instead of the ‘playback’ view if you want to switch inputs: e.g. ‘alsamixer -c0 -Vcapture’).