#!/bin/sh
# Begin $rc_base/init.d/alsa

# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
# ALSA specific parts by Mark Hymers - markh@linuxfromscratch.org
# Stores mixer settings in the default location: /etc/asound.state

#$LastChangedBy: dj $
#$Date: 2004-10-02 11:57:32 -0600 (Sat, 02 Oct 2004) $

. /etc/sysconfig/rc
. $rc_functions

case "$1" in
	start)
		echo "Starting ALSA...    Restoring volumes..."
		loadproc /usr/sbin/alsactl restore
		#echo "                    Loading MIDI font..."
		#loadproc /usr/sbin/sfxload /path/to/soundfont
		;;

	stop)
		echo "Stopping ALSA...    Saving volumes..."
		loadproc /usr/sbin/alsactl store
		#echo "                    Removing MIDI font..."
		#loadproc sfxload -i
		;;

	restart)
		$0 stop
		sleep 1
		$0 start
		;;

	*)
		echo "Usage: $0 {start|stop|restart}"
		exit 1
		;;
esac

# End $rc_base/init.d/alsa
