Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34541 - /etc/init.d/alsasound always tries to load alsa oss emulation
Summary: /etc/init.d/alsasound always tries to load alsa oss emulation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-27 12:58 UTC by Steen Krøyer
Modified: 2003-12-18 14:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steen Krøyer 2003-11-27 12:58:18 UTC
After upgrading my alsa stuff to 0.9.8, a new version of /etc/init.d/alsasound
was installed. The new version always tries to load (modprobe) all alsa
oss-related modules. I don't use the oss-emulation in alsa, with the result that
I get a bunch of errors and failed insmod's when alsasound runs during boot.

Reproducible: Always
Steps to Reproduce:
1. Remove all oss-stuff in /etc/module.d/alsa
2. Do update-module
3. Reboot
- that's it I guess. One may also have to the kernel configured without any
oss-stuff.


Expected Results:  
Test for use of oss before attempting to load all alsa modules called "*-oss"

Changing the lines
<  OSS="$(modprobe -l | grep "snd.*oss" | sed -e "s:\/.*\/::" -e "s:\..*::")"
<  for i in ${OSS}
<  do
<    DRIVERS="${i} ${DRIVERS}"
<  done
Into
>  # Test for use of OSS
>  if modprobe -c | grep -q "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
>  fi
solves the problem.
Comment 1 Steen Krøyer 2003-11-28 00:57:45 UTC
To avoid replacing one problem with another, my suggested fix should really be:
# Test for use of OSS
if modprobe -c | grep -q "snd.*oss$" ; then   # <<<< More complete grep expression
  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
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-12-18 14:29:51 UTC
in cvs