LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 03-30-2005, 05:54 AM   #1
roemisch
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Rep: Reputation: 0
which source tree to choose for module compilation ?


The actual task is to get a SB Audigy2 Value soundcard running on Debian Sarge 2.6.8-2 on my new machine. It won't work unless upgrading the kernel an using most recent ALSA source code. Up to this moment everything has been simple: Kernel image, tree, headers, source, compiler were the same version, but now I'll end up having new source, kernel tree and headers (2.6.11), on which my new kernel image will be based upon, and the old ones, the gcc compiler itself was originally compiled against. What follows is essential for all software or module sources, but ALSA is especially interesting while being so close to the kernel and asking for a lot of symlinks pointing not only at the kernel tree, but also at the sources (i.e. build and sources).
My first thought, of course, is to symlink the new ones, but I remember having read in an article from Linus himself (gcc.gnu.org/ml/gcc/2004-12/msg00112.html), that my compiler won't like compiling against headers and sources, which it was not compiled against itself (many unresolved symbols), if I got it right. On the other hand: When I choose the old headers and sources, how will ALSA be able to produce appropriate modules for my new kernel. And even worse: I have no idea, what's gonna happen to my old malfunctioning 2.6.8 modules. Will they be overwritten, deleted or coexist as zombies without reference in modules.conf ?
I don't dare think about the future, when I have to consider about a compiler upgrade and the environment is completely heterogenuous. For the time being, I would be very happy, if someone could give me reliable advice or a link to some tutorials covering this subject.

PS: After 20 years DOS/Windows/XP, which did almost everything alright for me and my company I decided to leave the monopoly 3 months ago mainly for ideological reasons and started with the pc of my kids, when it took me almost a week from my Xmas vacations to get a wireless USB Prism card going after firmware/kernel/udev replacement. It was an investment, which could have bought a few dozen Windows PC, but as I said: I've been driven by a bit of ideology, and I do like Linux, esp. Debian, once it is up and running. So please, don't let me hang or recommend to pull my SBLive! out of the Ebay box. For this is a question of honor and I also feel, that it touches the very basic problem, that scares most Windows users, whose fun won't start before the installation has been finished.

Yours Michael
 
Old 03-30-2005, 11:20 AM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
If you need the source, just go to kernel.org for the version you want, copy it to /usr/src then unpack it. I assume that you will already have a symbolic link of /usr/src/linux that is currently pointing to the old/current kernel source (eg, /usr/src/linux --> /usr/src/linux-2.4.x) which you need to delete, and then recreate it to point to the new kernel source (eg, /usr/src/linux --> /usr/src/linux-2.6x)

Once that's done, you would be ready to begin a standard kernel recompile. As you know there are several options available for handling the config but in order to preserve your current choices you should be able to go with "make oldconfig". There are a number of tutorials here at LQ that go into more detail on recompiling; I won't try to replicate them in this post.

In any event, if your system is working OK but the only issue is that you can't get sound to work, then a recompile may be unnecessary. You might want to try running
Code:
alsaconf
which should detect your sound card and play a test sound. If it works, that may be all you need. If not, then next confirm that the volume settings are not muted by running
Code:
alsamixer
There are a bunch of different settings, use the arrow keys to make sure you move through the whole set. Good luck with it and Welcome to LQ -- J.W.
 
Old 03-31-2005, 12:40 AM   #3
roemisch
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, J.W. for your quick response.
alsaconfig doesnot recognize the card. I've been running Debian Kernel 2.6.8-2 but since my SB Audigy2 Value was puchased only 3 months ago first kernel to recogize the card correctly is 2.6.11 which includes ALSA 1.08. A patch for this card was implemented mid of March, so I have to compile the ALSA source 1.0.9 against my kernel tree and that's the issue: Against tree 2.6.11 or against 2.6.8-2, which my compiler is based on ? By the way: Compiling modules in my system looks for the tree in /lib/modules/ver-xxx/"build" or ../"source" resp.
Yours Michael
 
Old 03-31-2005, 11:08 AM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
You need to compile against the source that corresponds to the kernel you are running, but it's ambiguous as to which kernel you are now using - you refer to 2.6.8-2, but since you also say that the first kernel to recognize the card was 2.6.11 it also appears that you've installed that as well. In any case, just run the command "uname -r" (no quotes) from a terminal session to determine the kernel version you are running. That's what you'd need to compile against.

In any case, and at the risk of telling you a bunch of stuff you already know (apologies in advance if so) while recompiling is a useful educational exercise, it isn't always necessary just to get sound working. As long as you've eliminated all the obvious issues (speakers are turned on, speakers are plugged into the right jack on the soundcard, volume knob is turned up, etc) then the next order of business is to confirm the the appropriate kernel modules are being loaded.

According to this reference article you need the following modules:

snd-emu10k1
snd-pcm-oss
snd-mixer-oss
snd-seq-oss

As root, run this command
Code:
lsmod
which will display the kernel modules that are currently loaded. If any of the above 4 are missing then you can manually load them via "modprobe" To illustrate
Code:
modprobe <module name>
where <module name> is the exact module you wish to load. In any case, if the hardware is installed correctly, and all the necessary modules are being loaded, then you card should be recognized correctly. (You should run "lspci" to confirm, which lists the PCI devices your system sees.) Once the card is recognized, then it would need to be configured. Good luck with it -- J.W.
 
Old 03-31-2005, 05:03 PM   #5
roemisch
LQ Newbie
 
Registered: Mar 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks again,
compiling against 2.6.11 did the job finally, but anyway, what is it with the kernel version, the compiler itself was compiled against ? I don't get the meaning of Linus statement referred to in my first posting. If you can spare the time, I'd appreciate your comment, but if not, you have my understanding, of course.
Michael
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 01:34 AM
Kernel source tree ... Solstice Mandriva 6 10-05-2004 01:30 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 09:37 PM
/usr/source/ missing source tree swingert Linux - Newbie 2 07-19-2003 09:48 PM
Source tree appler Slackware 2 06-20-2003 01:20 PM


All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration