diff options
Diffstat (limited to 'source/ap/alsa-utils/rc.alsa')
-rw-r--r-- | source/ap/alsa-utils/rc.alsa | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/ap/alsa-utils/rc.alsa b/source/ap/alsa-utils/rc.alsa index 9e3cae30..2a984a51 100644 --- a/source/ap/alsa-utils/rc.alsa +++ b/source/ap/alsa-utils/rc.alsa @@ -4,13 +4,13 @@ # A function to load the ALSA mixer settings: load_alsa_mixer() { - if [ -r /etc/asound.state ]; then + if [ -r /var/lib/alsa/asound.state ]; then echo "Loading ALSA mixer settings: /usr/sbin/alsactl restore" /usr/sbin/alsactl restore else # It's possible a user might not want to set a default sound state. - # In that case, do this: touch /etc/no.asound.state - if [ ! -r /etc/no.asound.state ]; then + # In that case, do this: touch /var/lib/alsa/no.asound.state + if [ ! -r /var/lib/alsa/no.asound.state ]; then echo "Setting default ALSA mixer settings." # set default mixer volumes for ALSA # Taken from the alsaconfig script. @@ -61,11 +61,13 @@ EOF # A function to load the ALSA OSS compat modules: load_alsa_oss_modules() { - if ! cat /proc/modules | tr _ - | grep -wq snd-pcm-oss ; then - echo "Loading OSS compatibility modules for ALSA." - modprobe snd-pcm-oss - modprobe snd-seq-oss - modprobe snd-mixer-oss + if modprobe -c | tr _ - | grep -wq snd-pcm-oss ; then + if ! cat /proc/modules | tr _ - | grep -wq snd-pcm-oss ; then + echo "Loading OSS compatibility modules for ALSA." + modprobe snd-pcm-oss + modprobe snd-seq-oss + modprobe snd-mixer-oss + fi fi } @@ -76,7 +78,7 @@ if [ -d /proc/asound ]; then load_alsa_oss_modules load_alsa_mixer else - # If there are ALSA modules defined in /etc/modprobe.conf, but + # If there are ALSA modules defined in /etc/modprobe.d/*, but # ALSA is not yet loaded, then load the modules now: DRIVERS=$(modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | tr -s "[[:blank:]]" " " | cut -d " " -f 3) if [ ! "$DRIVERS" = "" ]; then |