Subversion Repositories livecd

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 beyerle@PS 1
#/!bin/bash
2
#
3
# unmute all mixers and set volumes to $1
4
#
5
# Urs Beyerle, PSI
6
#
7
 
8
AMIXER=$( which amixer )
9
if [ "$AMIXER" = "" ]; then
10
    echo "Sorry command amixer not found."
11
    exit 1
12
fi
13
 
14
VOLUME=$1
15
[ "$VOLUME" = "" ] && VOLUME=60
16
VOLUME="${VOLUME}%"
17
echo -n "Set all mixer controls to $VOLUME ... "
18
 
19
# search mixer controls and unmute them
20
 
21
$AMIXER scontrols | cut -d"'" -f 2 | while read mixer; do
22
    $AMIXER set "$mixer" $VOLUME unmute >/dev/null 2>/dev/null
23
done
24
 
25
echo "done."