alsamixer: The interface we all know and love

I’ve had some adventures with the alsa libraries lately that warrant mentioning them here.

More specificially, alsamixer, the console interface for alsa, et. al.

2013-08-12-v5-122p-alsamixer

You’ve probably seen alsamixer before, either in screenshots or in your own console adventures.

It works more or less as you might expect any other audio control panel to work — q.v., rexima and aumix.

Left and right sliders for each control, preset jumps at the number keys, mute buttons with M, and so forth. There are also some startup flags that will change the interface, or for example, remove the color.

The reason this becomes interesting, particularly to me, is because of the machine I’m typing on, right now.

Before I came across this Acer V5-122P, every computer I’d ever worked with had a simple enough audio card that alsa and company set themselves up without any intervention on my part.

And I will admit that in Linux Mint, which I showed a long time ago, there was also no problem with sound.

Under Arch however, there were some unusual behaviors.

To start, there were two labeled sound cards — HD-Audio Generic 0 and HD-Audio Generic 1.

2013-08-12-v5-122p-alsamixer-noaudio

By default, at boot, Arch latched on to the first available card, and used it as the default for the sound subsystem.

Where’s the harm in that? Well, as you can seen in the screenshot above, there is no audio control attached to card 0.

That, of course, confused the heck out of most audio players. mocp just refused to run. Others would run, but could generate no sound.

Card 1 was still accessible, by me, and I could control it, but there wasn’t a whole lot to be done in other software.

Before this gets too boring, I’ll cut to the solution.

In short, I had to feed the settings to alsa through the .asoundrc file in my home directory. Here are the settings that worked for me.

defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

I will be honest and say I’m not really sure why each one works there. Linux Mint and other suite distros did this for me automagically.

I just twiddled with the settings until the right card appeared in music players — and in alsamixer when it started up. And so we’re back to alsamixer.

Since then it’s been nothing but happy puppies and sunshine. Isn’t the world a wonderful, musical place? 😀