[LAU] Amixer lowest level

Peter Plessas plessas at mur.at
Tue Dec 15 05:43:05 EST 2009


Clemens Ladisch wrote:
> Peter Plessas wrote:
>> when decreasing the master volume of my HDA-Intel [1] card using amixer:
>> [1]Intel Corporation 82801G (ICH7 Family)
> 
> That is the controller, but the mixer controls are implemented in the
> codec.  Anyway, there is no codec that implements a combined volume/mute
> control.
> 
>> I can't get to minus infinity (silent). -46.50dB is the lowest possible
>> value, and I can still hear sound coming from its output. I know that I
>> can mute the output but want to do this with one single key shortcut
>> (hence executing one command as the one above) to fade down the master
>> volume until silence.
>>
>> Does anyone have an idea how to make this work? Is there a script around
>> that queries the actual value of the master volume and decides whether
>> to decrease it further or issue the 'mute' command from amixer?
> 
> You can easily write such a script.  The current volume is available
> with "amixer get ..."; use something like this:
> 
> if amixer get Master | grep "Front Left: Playback 0 " > /dev/null; then
> 	amixer set Master mute
> else
> 	amixer set Master 3- dB
> fi

Wonderful help Clemens!

For the record: This is how I now control (and mute) the volume using
XF86 keys in Fluxbox:

XF86AudioLowerVolume :ExecCommand if amixer get Master | grep "Front
Left: Playback 0 " > /dev/null; then amixer set Master mute; else amixer
set Master 3- dB; fi

XF86AudioRaiseVolume :ExecCommand if amixer get Master | grep "Front
Left: Playback 0" | grep "off" > /dev/null; then amixer set Master
unmute; else amixer set Master unmute 3+ dB; fi

any improvements are welcome, it works for me now!

thanks again!

PP
> 
> 
> Best regards,
> Clemens
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user at lists.linuxaudio.org
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user



More information about the Linux-audio-user mailing list