summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <eradicator@gentoo.org>2004-02-19 08:53:01 +0000
committerJeremy Huddleston <eradicator@gentoo.org>2004-02-19 08:53:01 +0000
commit9426a3f8732f259a5dd33b258536f4f9891eb639 (patch)
treeefd9ab1a5a09bac5799d4aa476854ca3aeeb8d19 /media-sound/alsa-utils
parentcd to ${S} in unpack so the patch works (Manifest recommit) (diff)
downloadgentoo-2-9426a3f8732f259a5dd33b258536f4f9891eb639.tar.gz
gentoo-2-9426a3f8732f259a5dd33b258536f4f9891eb639.tar.bz2
gentoo-2-9426a3f8732f259a5dd33b258536f4f9891eb639.zip
Updated alsasound initscript to fix 'loading unneccessary modules on 2.6 kernels' bug #41600.
Diffstat (limited to 'media-sound/alsa-utils')
-rw-r--r--media-sound/alsa-utils/ChangeLog6
-rw-r--r--media-sound/alsa-utils/files/alsasound37
2 files changed, 23 insertions, 20 deletions
diff --git a/media-sound/alsa-utils/ChangeLog b/media-sound/alsa-utils/ChangeLog
index 6b26d876b5ed..b97f6529b913 100644
--- a/media-sound/alsa-utils/ChangeLog
+++ b/media-sound/alsa-utils/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-sound/alsa-utils
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/ChangeLog,v 1.43 2004/02/12 12:20:01 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/ChangeLog,v 1.44 2004/02/19 08:53:01 eradicator Exp $
+
+ 19 Feb 2004; Jeremy Huddleston <eradicator@gentoo.org> files/alsasound:
+ Updated alsasound initscript to fix 'loading unneccessary modules on 2.6
+ kernels' bug #41600.
12 Feb 2004; Jeremy Huddleston <eradicator@gentoo.org>
alsa-utils-0.9.8.ebuild, alsa-utils-1.0.0_rc2.ebuild,
diff --git a/media-sound/alsa-utils/files/alsasound b/media-sound/alsa-utils/files/alsasound
index 6816054f933f..68f04d2311c6 100644
--- a/media-sound/alsa-utils/files/alsasound
+++ b/media-sound/alsa-utils/files/alsasound
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsasound,v 1.9 2004/02/12 12:20:01 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsasound,v 1.10 2004/02/19 08:53:01 eradicator Exp $
#
# Gentoo users: add this script to 'boot' run level.
# ==================================================
@@ -49,28 +49,27 @@ start() {
else
ebegin "Loading ALSA drivers"
- # I really dislike this and would like to tidy it up.
- # Anyone running 2.4 + alsa-driver willing to help me?
-
- DRIVERS="$(modprobe -c | grep snd.* | grep pci: | awk '{ print $3 }' | uniq)"
- if [ -z "${DRIVERS}" ] ; then
- # Fallback on older modprobe syntax
- DRIVERS="$(/sbin/modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | awk '{print $3}')"
- fi
-
- [ -z "${DRIVERS}" ] && eerror "Unable to find any ALSA drivers. Have you compiled alsa-drivers correctly?"
- # Test for use of OSS
+ DRIVERS="$(modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | awk '{print $3}')"
if modprobe -c | grep -q "snd.*oss$" ; then
- einfo "Using ALSA OSS emulation"
- OSS="$(modprobe -l | grep "snd.*oss" | sed -e "s:\/.*\/::" -e "s:\..*::")"
- # Add oss modules to list
- for i in ${OSS}
- do
- DRIVERS="${i} ${DRIVERS}"
- done
+ # Test for use of OSS
+ einfo "Using ALSA OSS emulation"
+ OSS="$(modprobe -l | grep "snd.*oss" | sed -e "s:\/.*\/::" -e "s:\..*::")"
+ # Add oss modules to list
+ for i in ${OSS}
+ do
+ DRIVERS="${i} ${DRIVERS}"
+ done
fi
+ # Fall back on the automated aliases if we don't have ALSA configured properly...
+ if [ -z "${DRIVERS}" ]; then
+ ewarn "Could not detect custom ALSA settings. Loading all detected alsa drivers."
+ DRIVERS="$(modprobe -c | grep pci: | awk '{ print $3 }' | grep snd.* | sort | uniq)"
+ fi
+
+ [ -z "${DRIVERS}" ] && eerror "Unable to find any ALSA drivers. Have you compiled alsa-drivers correctly?"
+
for DRIVER in ${DRIVERS}
do
if [ ! "${DRIVER}" = off ] &&