Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83350 - alsa-utils-1.0.6: /etc/init.d/alsasound always loads OSS modules
Summary: alsa-utils-1.0.6: /etc/init.d/alsasound always loads OSS modules
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-25 22:44 UTC by Dmitri Pogosian
Modified: 2005-04-21 02:08 UTC (History)
1 user (show)

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 Dmitri Pogosian 2005-02-25 22:44:18 UTC
Init script /etc/init.d/alsasound relies on

if modprobe -c | grep -q "snd.*oss$" ; then

check to see if to load OSS drivers. However, modprobe -c returns not only the contents of /etc/modprobe.conf, but also aliases it picks up from the modules themselves.  In particular, if OSS modules are compiled, I get the lines
like

alias sound-service-?-8 snd_seq_oss
alias sound-service-?-1 snd_seq_oss
alias sound-service-?-12 snd_pcm_oss
alias sound-service-?-3 snd_pcm_oss
alias sound-service-?-0 snd_mixer_oss

in the output i(towards the bottom) of modprobe -c although no OSS drivers are mentioned in configuration files.  As the result the init script always loads them.


Reproducible: Always
Steps to Reproduce:
1. Have no mention of OSS drivers in /etc/modprobe.conf or /etc/modules.conf
2. /etc/init.d/alsasound start   loads snd_pcm_oss, snd_seq_oss, snd_mixer_oss
3.

Actual Results:  
cat /proc/modules show OSS modules present

Expected Results:  
skip loading OSS modules. Parsing of the modprobe -c output should be changed
Comment 1 Dmitri Pogosian 2005-02-26 11:21:20 UTC
Since /etc/init.d/alsasound already uses parameters from /etc/conf.d/alsasound, it is perhaps the best to introduce LOAD_OSS configuration parameter and have at line 67

if ( [ "$LOAD_OSS" != "no" ] && modprobe -c | grep -q "snd.*oss$"  ); then

or something like that
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2005-04-21 02:08:53 UTC
You can now set ENABLE_OSS_EMUL to toggle that.