updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / acpi-eee904 / volume_control.sh
blob6f14170975afce7fccec103e3fac685e32759736
1 #!/bin/sh
3 # Since the latest alsa in kernel 2.6.25 we now have Line-Out instead
4 # of LineOut, added check for this
6 if [ $(amixer|grep Line-Out | wc -l) -gt 0 ];then
7 LINEOUT="Line-Out"
8 else
9 if [ $(amixer|grep LineOut | wc -l) -gt 0 ];then
10 LINEOUT="LineOut"
11 else
12 LINEOUT="Front"
16 case $1 in
17 status)
18 amixer get $LINEOUT | grep "Front Right: Playback"
20 volume)
21 amixer get $LINEOUT|grep -A 1 -e Mono|grep -o -e '[0-9]*%'|grep -o -e '[0-9]*'
23 on)
24 # amixer sset LineOut unmute
25 # amixer sset iSpeaker unmute
27 off)
28 # amixer sset LineOut mute
29 # amixer sset iSpeaker mute
31 esac