ALSA Mixer in terminal for USB audio control.

Basics of Alsamixer

by Lewis Loflin

ALSA (Advanced Linux Sound Architecture) is the main Linux sound system. Pulse Audio and Jack operate over ALSA.

Alsamixer is a terminal based sound mixer control. It comes with the system and is useful for trouble shooting or checking sound operation. I use it as another low-resource Linux program.

While one can more on Alsamixer below let us look at a more practical use. Again I'll make a shell script and drop this into my /home/pi/bin directory.

Python based audio selection box.

The sample code for the above is

Open a text editor and type the following:

lxterminal -e alsamixer

Save as in your bin directory. Do not save as alsamixer or the system will crash as Linux tries to operate both at the same time.

Make the file executable:

~ $ sudo chmod +x

This will make a clickable icon for Rox-Filer, etc. Or simply add to your menu system. My Python menu box above calls shell scripts such as this.

ALSA Mixer in terminal.

To quote,

Some of the goals of the ALSA project at its inception were automatic configuration of sound-card hardware and graceful handling of multiple sound devices in a system...The sound servers PulseAudio and JACK (low-latency professional-grade audio editing and mixing), the higher-level abstraction APIs OpenAL, SDL audio, etc. work on top of ALSA and implemented sound card device drivers. On Linux systems, ALSA succeeded the older Open Sound System (OSS). Wiki

My Pluggable USB audio adaptor shows up informing me it has been detected and allows on to select audio source and set volume, etc. I have found that just because I select a source doesn't mean it keeps working.

PulseAudio controls underlying ALSA-level volume controls.. To change the ALSA-level volume controls directly, you can do the following:

Open a terminal. (The quickest way is the Ctrl-Alt-T shortcut.)

Enter "alsamixer" and press the Enter key.

You will now see a user interface. In this user interface, you can do the following to quote:

Select your correct sound card using F6 and select F5 to see recording controls.

Move around with left and right arrow keys.

Increase and decrease volume with up and down arrow keys.

Increase and decrease volume for left/right channel individually with "Q", "E", "Z", and "C" keys.

Mute/Unmute with the "M" key. An "MM" means muted, and "OO" means unmuted. Note that a bar can be 100% full but still be muted, so do check for this.

Exit from alsamixer with the Esc key or close terminal. banner.

Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.