Re: Persistent module storage [was Linux 2.4 Status / TODO page]

Helge Hafting
2000-11-07T09:55:51Z

Alan Cox wrote:
>
> > It would probably be better (in this case) to increment the module count
> > when the mixer settings go above 0, and decrement it when the settings
> > go totally to 0. This prevents an unwanted unload.
>
> Thats about 200 lines of code and also about 50,000 emails complaining people
> cannot unload sound stuff.

Still, it is so logical. Modules cannot be unloaded when in use.
"use" is usually "someone having the device open". But
"someone listening to pass-through sound" is effectively using
the mixer - the module is in use in another way. Network drivers
don't have a /dev/xxx to open/close either.

Having to turn off the master volume before unloading makes sense
to me. (The driver may still free up DMA buffers when
nobody need them, i.e. when /dev/dsp haven't been used for some time.)

Helge Hafting