Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > Modules and /etc/modules.conf

Forgot Password?
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 10-20-2004   #1 (permalink)
Just Joined!
 
Join Date: Nov 2003
Location: UK - England
Posts: 19
Send a message via AIM to DislexiK Send a message via MSN to DislexiK Send a message via Yahoo to DislexiK
Modules and /etc/modules.conf

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 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

DislexiK
DislexiK is offline  


Reply With Quote
Old 11-13-2004   #2 (permalink)
Just Joined!
 
Join Date: Nov 2004
Posts: 47
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.
sybvn is offline   Reply With Quote
Old 11-13-2004   #3 (permalink)
Linux Guru
 
Join Date: Oct 2001
Location: Täby, Sweden
Posts: 7,578
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.
Dolda2000 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 05:35 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2