lkml.org 
[lkml]   [1999]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[2.3.15] soundcore_open module loading behaviour
Hi,

I hope this doesn't turn out to be a stupid question..

I've suddenly started getting "modprobe: can't locate module
sound-service-0-0" errors from kmod. This is understandable as I don't have
sound-service-0-* aliased to anything, but sound-slot-0 is aliased to sb.o,
which seems to provide the relevant service (mixer). The following bit of
code appears in sound_core.c:soundcore_open()

s = __look_for_unit(chain, unit);
if (s == NULL) {
char mod[32];

spin_unlock(&sound_loader_lock);
/*
* Please, don't change this order or code.
* For ALSA slot means soundcard and OSS emulation code
* comes as add-on modules which aren't depend on
* ALSA toplevel modules for soundcards, thus we need
* load them at first. [Jaroslav Kysela <perex@jcu.cz>]
*/
sprintf(mod, "sound-slot-%i", unit>>4);
request_module(mod);
sprintf(mod, "sound-service-%i-%i", unit>>4, chain);
request_module(mod);
spin_lock(&sound_loader_lock);
s = __look_for_unit(chain, unit);
}
...

Should this not actually do something like

s = __look_for_unit(chain, unit);
if (s == NULL) {
char mod[32];

spin_unlock(&sound_loader_lock);
sprintf(mod, "sound-slot-%i", unit>>4);
request_module(mod);
spin_lock(&sound_loader_lock);
s = __look_for_unit(chain, unit);
}
if( s == NULL ) {
char mod[32];

spin_unlock(&sound_loader_lock);
sprintf(mod, "sound-service-%i-%i", unit>>4, chain);
request_module(mod);
spin_lock(&sound_loader_lock);
s = __look_for_unit(chain, unit);
}
...

? I don't claim to understand much of the interactions between the various
bits of the sound subsystem, but if the module aliased by sound-slot-X
provides the required service, it's pointless to try to find another module
to do it, surely?

--
There are many intelligent species in the universe. They all own
cats.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.026 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site