From Segfault
Jump to navigation Jump to search

Not really a howto, but an old rant I forgot to blog about:

I will try to describe how hard it is to control the sound volume on this MacBook Pro. This
laptop has only an on-board soundcard (Nvidia MCP79) and while I appreciate the fact that
this card may have multiple input/output channels and Linux is able to control every one of
them, these mixer settings are really hard to control.

In XFCE4, the volume-up/volume-down/mute buttons are already bound to their respective action.
That is, I press "vol+" and the volume goes up, "vol-" and the volume goes down, "mute" and
the sound is muted.

There's #1017448 where the sound is not unmuted completely when "mute" is
pressed again. Also, don't mute the sound with the "master": when it's at its lowest 
position, it will enable the "mute" function of "speaker" and "bass speaker" - and 
won't unmute them again. Sometimes alsaunmute will help, sometimes it doesn't.

Right clicking the "volume" button in the audio-mixer applet brings up the "Audio Mixer" 
and here the fun begins: when I press "vol-", the "master" goes down - but also the "speaker"
and the "bass speaker" does, and after a few presses "PCM" goes also down. And while "vol+"
will bring "master" to its max again, "speaker" and "bass speaker" won't go to its maximum,
one has to manually do so.

Sometimes I want to use the headphones - but right after plugging in, both the "master" and
"speaker" levels are being lowered (almost muted) automatically. Of course, this is only
visible in the full audio mixer :-\ To top it all off, this only happens sometimes. 

Finding the right input device is even harder. In the "Audio Mixer" there are 4 sound
cards to chose from:

* "HDA Nvidia (Alsa mixer)"
* "Playback: Built-in Audio Analog Surround 4.0 (PulseAudio Mixer)"
* "Capture: Built-in Audio Analog Stereo (PulseAudio Mixer)",
* "Capture: Monitor of Built-in Audio Analog Surround 4.0 (PulseAudio Mixer)".

From these (rather technical) names (what is "IEC958 Default PCM" anyway?), I figure that
the capture devices may be responsible for sound input. Both their mixer levels are all
the way up but the microphone is unable to capture any sound.

After a lot of searching I discover pavucontrol. And now even more sound devices
("profiles") are presented, with names different from the Alsa counterparts:
* Analog Stereo Duplex
* Analog Stereo Output
* Digital Stereo (IEC958) Output + Analog Stereo Input
* Digital Stereo (IEC958) Output
* Analog Surround 4.0 Output + Analog Stereo Input
* Analog Surround 4.0 Output
* Analog Stereo Input 
* Off

By default, "Analog Stereo Output" was selected - output was fine, but input did not work.
All "Digital" profiles do not seem to work either (I don't have any digital output devices
attached), so it's down to some combination of "analog", "output" and "input" -
"Analog Surround 4.0 Output + Analog Stereo Input" or even "Analog Stereo Duplex" seemed
promising, but the microphone still did not get any input, although all mixers are open.

Then, on the "Input Devices" tab I moved the mixer ("Front left/right") all the way to
the left ("Silence") and then to the right again - now the microphone was able to record.
But this did not help every time. And again, alsaunmute was not able to help either.

So, all in all there are 9 mixers to tune with "Audio Mixer" and another profiles available
in "pavucontrol", each with input/output devices. That's just overkill from a usability
standpoint. It's just incomprehensible why one has to use (and install) "pavucontrol" at all
because the default mixer app seems to be "Audio Mixer" and there are more than enough knobs
in this application already. But because "Audio Mixer" is unable to control the input channels,
pavucontrol is needed here. These erroneous mixer-goes-mute moments aren't helpful either.

And now after all this is written and I fiddled around with all these sound control knobs, 
Pulse Audio seems to have give up: in "Audio Mixer" there's only playback and capture for
"dummy output" resp. "dummy input" available. "HDA Nvidia" is still present, but there's 
no sound. "pavucontrol" says "No cards available for configuration". And alsaunmute nor
"alsactl init" nor "pulseaudio -k" seem to be able to help now. A reboot might be in order.

I'm no sound nerd (as you might have guessed) but having to fiddle around 5-10 minutes or
even reboot the machine just to get sound input/output to work is hardly acceptable on
a desktop system.

Update: I killed alsactl and jackd and pulseaudio - and now sound output & input are
working again. Only pulseaudio restarted itself and is now running and alsactl and jackd
are not, and I still have all the devices available.

root       601  0.0  0.0  16772  1112 ?        SNs  Dec24   0:00 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main rdaemon
christi+ 26550  0.6  0.8 253652 69504 ?        SLsl 00:43   0:07 /usr/bin/jackd -T -ndefault -T -d alsa
christi+ 27538  0.0  0.0 394088  4148 pts/15   S<l  01:06   0:00 /usr/bin/pulseaudio

root     27512  0.0  0.0  16772  1208 pts/14   SN   01:05   0:00 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main rdaemon
christi+ 31427  0.6  0.8 319180 69532 pts/18   SLl  02:30   0:01 /usr/bin/jackd -T -ndefault -T -d alsa