At 04 Mar 2003 19:01:24 -0800,
Fernando Pablo Lopez-Lezcano wrote:
> 
> > > > >lists about this and to do it cleanly it would be nice to have available
> > > > >in /proc/asound the list of modules currently loaded. That is not
> > > > >available today (I think Takashi said he might add that)."
> > > > 
> > > > cat /proc/modules | grep '^snd'
> > > 
> > > This relies in an (AFAIK) unenforceable convention (all modules that
> > > start with "snd" are alsa modules). I think the information has to come
> > > from within the alsa driver, or from some place that actually knows that
> > > the module _is_ an alsa module. IMHO a name is not enough. 
> > 
> > ok, i added the code.
> > the cvs version shows the list of modules on /proc/asound/modules.
> 
> Thanks! I started working on differentiating in the alsasound alsa
> startup script between a full start (all modules are loaded when
> alsasound executes) and a partial start (some of the modules are already
> loaded when alsasound executes and it has to load the rest). 
> 
> The first naive question is: do we actually need to differenciate?
> Apparently modprobe is happy to be given the name of a module that is
> already loaded, as far as I can tell it does not try to load it again
> (man modprobe does not say anything about this case that I can see). 
> 
> Apparently we could just dispense with the [ -d /proc/asound ] test in
> alsasound and always load (or reload) the modules... or maybe just print
> a warning when part of alsa has already been started before alsasound
> executes. Surely it cannot be that easy :-) What am I missing?

alsasound script calls alsactl and card-specific scripts (if any).
this should be avoided in the case of partial load.

IIRC, modprobe returns 0 even if called with the existing module.
(if the load failed, it returns 255, btw).
thus, we cannot check this only from the return value of modprobe.
instead we need to grep /proc/asound/modules for that module.


Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to