diff options
author | Matt Housh <jaeger@crux.nu> | 2007-04-30 10:50:09 -0500 |
---|---|---|
committer | Matt Housh <jaeger@crux.nu> | 2007-04-30 10:50:09 -0500 |
commit | d91397323fed1b0f6a5795a8681ab318a858f667 (patch) | |
tree | 5c9e43f185af8f2a7b82104443684b75c21708cc /alsa-utils | |
parent | cc298d3ba90fccf9c883ff192bd2edfe93af1b7a (diff) | |
download | opt-d91397323fed1b0f6a5795a8681ab318a858f667.tar.gz opt-d91397323fed1b0f6a5795a8681ab318a858f667.tar.xz |
alsa-utils: added alsa rc script and README
Diffstat (limited to 'alsa-utils')
-rw-r--r-- | alsa-utils/.footprint | 3 | ||||
-rw-r--r-- | alsa-utils/.md5sum | 1 | ||||
-rw-r--r-- | alsa-utils/Pkgfile | 6 | ||||
-rw-r--r-- | alsa-utils/README | 40 | ||||
-rw-r--r-- | alsa-utils/rc.alsa | 26 |
5 files changed, 74 insertions, 2 deletions
diff --git a/alsa-utils/.footprint b/alsa-utils/.footprint index 90353c8d2..7857fe1fa 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 9529a9a86..8e2a772cc 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 956be159f..46d5558bb 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 000000000..dab21d865 --- /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 000000000..a7498a270 --- /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 |