3 # aumix Sound mixer setup.
7 # description: Saves sound mixer's settings on system shutdown and restores
8 # them on system startup.
10 # Source function library
11 . /etc/rc.d/init.d/functions
13 # See how we were called.
16 # Check if the service is already running?
17 if [ ! -f /var/lock/subsys/aumix ]; then
18 show "Setting up sound card mixer"
20 aumix -f /etc/aumixrc -L >/dev/null
22 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/aumix
25 nls "Sound card mixer is already set up"
30 if [ -f /var/lock/subsys/aumix ]; then
31 show "Saving sound card mixer's settings"
33 aumix -f /etc/aumixrc -S
34 rm -f /var/lock/subsys/aumix >/dev/null 2>&1
37 nls "Sound card mixer hasn't been set up"
46 show "Saving sound card mixer's settings"
48 aumix -f /etc/aumixrc -S
52 show "Setting up sound card mixer"
54 aumix -f /etc/aumixrc -L >/dev/null
58 cat /proc/devices | grep -q "\(sparcaudio\|sound\)"
60 lsmod | grep -q "\(sound\|audio\)"
62 echo "Modular sound card detected."
64 echo "Monolithic sound card detected."
67 cat /dev/sndstat 2> /dev/null | grep -A 1 "Midi devices:" | grep -q [0-9]:
69 echo "MIDI device present."
71 cat /dev/sndstat >/dev/null 2>&1
73 echo "MIDI device not detected."
78 echo "Sound card not configured."
82 msg_Usage "$0 {start|stop|status|restart|save|restore}"