Hello, I've a question about the 'amixer' tool.

I'm using 'amixer' to control ALSA master volume via ASUS laptop's hotkyes. Here the script:

=====
if [ "`/usr/bin/amixer -c 0 sget 'Master',0 | grep off`" ]
then
    /usr/bin/amixer -q -c 0 sset 'Master',0 unmute
else
    /usr/bin/amixer -q -c 0 'Master',0 mute
fi
=====

If I should mute the volume, there's no problem, while if I should unmute it, the volume is correctly unmuted, but set to 0%. As the mute/unmute option doesn't work on volumes (its state is 'on/off'), why this?

I noticed that doesn't affect card number >0, as until yesterday I used to have
- dummy, snd-card-0
- intel8x0, snd-card-1
and the script was set as "-c 1" to use the intel8x0's mixer. Well, the mute/unmute option worked perfectly and once unmuted, the volume was the same as before it going mute.


Is there a way to have unmute w/ the same volume as before? Obviously, w/o a workaround, I mean, something like
- read & save the volume %
- mute
- unmute
- restore the volume % previously saved


Thx, bye,
Gismo / Luca



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to