ports/opt (2.3): alsa-utils: added alsa rc script and README
commit d91397323fed1b0f6a5795a8681ab318a858f667 Author: Matt Housh <jaeger@crux.nu> Date: Mon Apr 30 10:50:09 2007 -0500 alsa-utils: added alsa rc script and README diff --git a/alsa-utils/.footprint b/alsa-utils/.footprint index 90353c8..7857fe1 100644 --- a/alsa-utils/.footprint +++ b/alsa-utils/.footprint @@ -1,3 +1,6 @@ +drwxr-xr-x root/root etc/ +drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/alsa drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/bin/ -rwxr-xr-x root/root usr/bin/aconnect diff --git a/alsa-utils/.md5sum b/alsa-utils/.md5sum index 9529a9a..8e2a772 100644 --- a/alsa-utils/.md5sum +++ b/alsa-utils/.md5sum @@ -1 +1,2 @@ 7e9f132b34b7773d2a29b0ff14719a49 alsa-utils-1.0.14rc2.tar.bz2 +7ca87ae2d727887898e1feb47a48d3f9 rc.alsa diff --git a/alsa-utils/Pkgfile b/alsa-utils/Pkgfile index 956be15..46d5558 100644 --- a/alsa-utils/Pkgfile +++ b/alsa-utils/Pkgfile @@ -5,8 +5,9 @@ name=alsa-utils version=1.0.14rc2 -release=1 -source=(http://gentoo.osuosl.org/distfiles/$name-$version.tar.bz2) +release=2 +source=(http://gentoo.osuosl.org/distfiles/$name-$version.tar.bz2 \ + rc.alsa) build() { cd $name-$version @@ -14,4 +15,5 @@ build() { make make DESTDIR=$PKG install rm -rf $PKG/usr/share $PKG/usr/man/fr + install -D -m 0755 $SRC/rc.alsa $PKG/etc/rc.d/alsa } diff --git a/alsa-utils/README b/alsa-utils/README new file mode 100644 index 0000000..dab21d8 --- /dev/null +++ b/alsa-utils/README @@ -0,0 +1,40 @@ + + +README for alsa-utils + + +In order to facilitate saving and restoring of soundcard mixer levels at +shutdown and boot, take these two methods as examples: + + +***NOTE*** +BOTH methods require that you store your mixer levels beforehand, use +'/usr/sbin/alsactl store' first! +********** + + +Method 1: /etc/modprobe.conf + +Add something like the following to /etc/modprobe.conf: + +---- +# ALSA mixer settings save/restore +install snd-emu10k1 /sbin/modprobe --ignore-install \ + snd-emu10k1 $CMDLINE_OPTS; /usr/sbin/alsactl restore +remove snd-emu10k1 /usr/sbin/alsactl store; /sbin/modprobe -r \ + --ignore-remove snd-emu10k1 +---- + +(As with the other READMEs replace 'snd-emu10k1' with the correct + soundcard module for your system.) + +(On some hardware it seems the kernel module gets loaded but the + soundcard isn't initialized in time for the modprobe.conf install + command to succeed. If this is the case for your hardware, try + method 2 instead.) + + +Method 2: /etc/rc.d/alsa init script + +Add "alsa" to the SERVICES array in /etc/rc.conf. + diff --git a/alsa-utils/rc.alsa b/alsa-utils/rc.alsa new file mode 100644 index 0000000..a7498a2 --- /dev/null +++ b/alsa-utils/rc.alsa @@ -0,0 +1,26 @@ +#!/bin/sh +# +# /etc/rc.d/alsa: store/restore ALSA mixer levels +# + +# location of the alsactl executable +ALSACTL=/usr/sbin/alsactl + +case $1 in + start) + $ALSACTL restore + ;; + stop) + $ALSACTL store + ;; + restart) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "Usage: $0 [start|stop|restart]" + ;; +esac + +# End of file
participants (1)
-
crux@crux.nu