Results 1 to 3 of 3
Good day, I am trying to understand the concepts of modules.conf in regards to the kernel and its generla usage, the only thing I can think of its use is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-20-2004 #1
- Join Date
- Nov 2003
- UK - England
Modules and /etc/modules.conf
I am trying to understand the concepts of modules.conf in regards to the kernel and its generla usage, the only thing I can think of its use is to alias names that the kernel uses against the correct modules/drivers. Does this sound correct?
So for example the kernel references sound card as sound-slot-0, but for the driver we alias it as: snd-card-0, which actually is an alias of: snd-<driver> for example: snd-intel8x0 so that the kernel when passing sound sends the sound to the snd-intel8x0 driver which then manipulates it for that sound card type to understand and output?
I may be wrong in my understanding, please let me know. And in regards to my example, is that how it works, or does it work a different way such as:
Sound --> Kernel --> ALSA --> Driver --> Sound Card?
If it is this way, then why does the module need to have a name alias the kernel knows, or is it that it is not for the kernel its for ALSA its self?
And if it is that way then how does the kernel know to send infromation to ALSA instead of something else?
Thanks for your time
- 11-13-2004 #2
- Join Date
- Nov 2004
Sorry, I dont really understand your question. As I know, modules.conf is the configuration file used by modprobe and depmod. You can find at http://www.netadmintools.com/html/modules.conf.man.html.
Hope it helps.
- 11-13-2004 #3
- Join Date
- Oct 2001
- Täby, Sweden
It doesn't really work like that. It's more like this:
1. A program tries to access the first sound card (for example by opening /dev/dsp).
2. The kernel gets the open request, and passes it on to the sound core driver multiplexer.
3. It, in turn, looks in its tables of installed sound cards. Assuming no sound module has been loaded, it will find nothing for the first sound card.
4. It then makes a request back to userspace to modprobe for snd-card-0 (zero as in the first DSP device). This kernel thread is now blocked.
5. Modprobe gets run in userspace, finds the alias for snd-card-0 and requests to the kernel to load the snd-intel8x0 module.
6. The module is loaded and its initialization code is run. The initialization function makes a request to the sound core driver multiplexer to register it as a sound card driver. The multiplexer does so, registering it as the first sound card.
7. The initialization function returns and modprobe terminates. The first kernel thread is then resumed, and it checks again for the first sound card, which now exists.
8. It passes the open request on to the snd-intel8x0 module, which performs it, and lets the thread return into userspace, to the program that called open on /dev/dsp.
So you see, the module names aren't used at all in the kernel. That's why they need a mapping in userspace.