# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/alsa-utils/alsa.init # Copyright (C) 2004 - 2023 The T2 SDE Project # Copyright (C) 1998 - 2004 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- # # Desc: ALSA Sound Mixer Loader # Runlevel: 75 rcX rc2 rc3 rc4 rc5 # main_begin block_begin(start, `Initializing ALSA mixer') if [ -f /var/lib/alsa/asound.state ]; then check(`D_sbindir/alsactl restore') else echo "No saved state for audio devices: using defaults." ( amixer sset Master 80% unmute amixer sset PCM 80% unmute amixer sset Bass 50% amixer sset Treble 50% ) > /dev/null 2>&1 fi block_end block_begin(stop, `Saving ALSA mixer settings') if [ -e /proc/asound/card0 ]; then check(`D_sbindir/alsactl store') fi block_end main_end