alsa-utils: added alsa rc script and README
This commit is contained in:
parent
cc298d3ba9
commit
d91397323f
@ -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
|
||||
|
@ -1 +1,2 @@
|
||||
7e9f132b34b7773d2a29b0ff14719a49 alsa-utils-1.0.14rc2.tar.bz2
|
||||
7ca87ae2d727887898e1feb47a48d3f9 rc.alsa
|
||||
|
@ -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
|
||||
}
|
||||
|
40
alsa-utils/README
Normal file
40
alsa-utils/README
Normal file
@ -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.
|
||||
|
26
alsa-utils/rc.alsa
Normal file
26
alsa-utils/rc.alsa
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user