updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / acpi-eee / volume_control.sh
blob4a474715c3df52d094a19097dac1eadd454c09ee
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 LINEOUT="LineOut"
12 case $1 in
13 status)
14 amixer get $LINEOUT | grep "Front Right: Playback"
16 volume)
17 amixer get $LINEOUT|grep -A 1 -e Mono|grep -o -e '[0-9]*%'|grep -o -e '[0-9]*'
19 on)
20 # amixer sset LineOut unmute
21 # amixer sset iSpeaker unmute
23 off)
24 # amixer sset LineOut mute
25 # amixer sset iSpeaker mute
27 esac