I'm trying to get the command "amixer set master mute" to work when the active sound output is an external USB speaker, but it doesn't work. It only seems to work if the output is the built-in speaker or the headphone out.

Any suggestions?


The next was previously posted in this answer: Setting microphone input volume using the command line?

Taking in consideration what I mention over here, in your case it would be something like:

amixer -c 0 set Master 0DB

But you should perform tests in order to check it.

I hope this is helpful for you.

If you are using ALSA, amixer can be helpful for your script programming.

When dropping the amixer --help command in a terminal you will see something like this:

enter image description here

Depending on your soundcard, levels may be different than mine, but you can use alsamixer in the terminal in order to check which levels and which features in your sound card you can call in a command to set the volume as you wish.

enter image description here

In my example, with my principal sound card (I have 2: the embedded and a PCI audio card), levels are from 0 to 100, this way I can change the volume of a desired input/output in my soundcard by dropping in a terminal the next command:

amixer -c 0 set Front 50DB 
amixer -c 0 set Front 64DB 

In the first command, the result will set the Front panel output to 78% level and the second one will set the Front panel output to 100% level.

In order to gather information related to your mixer controls, drop the amixer command with no parameters and you will get a list. Or indicate which audio device you wish to see a list of controls with amixer -c X (where "X" is the number of your audio device).

BTW: Remember that DB values are calculated logarithmically and not linearly.

  • Tested by me: it works. With the amixer -c 0 set Master 0DB, Good luck! – Geppettvs D'Constanzo Aug 9 '11 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.