View previous topic :: View next topic |
Author |
Message |
felicehome Apprentice
Joined: 30 Sep 2004 Posts: 217
|
Posted: Sun Feb 19, 2006 10:49 am Post subject: HowTo multiple Soundcards with modules built-in kernel |
|
|
Hi, first of all please excuse my poor English!
This is for all of you having multiple soundcards installed in their PCs (e.g. onboard sound + another pci soundcard) and want to have the drivers compiled into the kernel rather than having them compiled as modules. I prefer having my drivers for non-pluggable hardware compiled into the kernel. There are a few advantages having this setup. In my opinion it's also much easier to install, because you don't have to fuss around with modules getting loaded.
This HowTo also assumes that you have a basic understanding of how to compile your kernel manually with Alsa support and configure your Alsa mixer settings etc. If you setup Alsa for the first time please read http://www.gentoo.org/doc/en/alsa-guide.xml.
Step 1: Select your drivers in "make menuconfig" to be built-in the kernel
Code: |
Device Drivers --->
Sound --->
Advanced Linux Sound Architecture --->
PCI devices --->
<*> Bt87x Audio Capture
<*> Emu10k1 (SB Live!, Audigy, E-mu APS)
<*> Intel/SiS/nVidia/AMD/ALi AC97 Controller
|
These are my selections having a nforce4 board with AC97 onboard-sound a SoundBlaster Live 5.1 and a Hauppage WinTV.
If you're unsure which drivers to select lspci could help you out finding the right drivers. For each selection in menuconfig press "?" this will give you a few information about the drivers. Most importantly the name of the module. We don't build modules but we will use this information later on so write down the module-names.
E.g. pressing "?" with
Code: | <*> Emu10k1 (SB Live!, Audigy, E-mu APS) |
selected will give me:
Code: |
.
.
.
To compile this driver as a module, choose M here: the module will be called snd-emu10k1.
.
.
.
|
Do this with all your sound drivers! For me the modules names would be:
Code: | snd-emu10k1
snd-bt87x
snd-intel8x0 |
recompile your kernel!!
Step 2: reboot and check dmesg to see if your drivers get loaded and if the drivers are initialized in the right order
Code: | dmesg | less
.
.
.
ALSA device list:
#0: NVidia CK804 with ALC850 at 0xe3204000, irq 233
#1: Brooktree Bt878 at 0xe3101000, irq 225
#2: SBLive 5.1 [SB0060] (rev.7, serial:0x80611102) at 0xa000, irq 74
.
.
.
|
you should see all your soundcards in the ALSA device list. If not check your configuration again. From now on you should be able to use all of your sound cards. The only problem is that at least for me they are initialized in the wrong order. This is a problem, because in the order shown above my onboard-sound gets initialized first and therefore all applications are trying to output on this first initialized sound device. In most applications you can change the sound device but this is a configuration hell, and what will happen if a newer kernel(alsa) decides to change the order it initializes your devices? Thanks godness there is a way to change the order of your alsa devices. This is done via kernel parameters.
If your soundcards are initialized in the right order you're done! If not read on.
Step 3: change grub configuration to pass kernel parameters
don't forget to mount /boot first if it isn't your default in fstab
Code: | nano /boot/grub/grub.conf |
This is where our written down module names are needed. The syntax for changing the device order is:
Code: |
modulesname.index=devicenumber
|
with devicenumber=0 beeing your first soundcard.
In my case, if I want to have the SB Live 5.1 the first, onboard-sound the second and my WinTV the last soundcard. My grub.conf looks like this:
Code: | default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux 2.6.15
#root (hd0,0)
kernel (hd0,0)/kernel-2.6.15-opt root=/dev/sda3 snd-emu10k1.index=0 snd-intel8x0.index=1 snd-bt87x.index=2 vga=0x31B video=vesafb:mtrr,ywrap
|
Don't notice my other parameters like vga and root they are irrelevant for setting our soundcards up.
WARNING!! You have to pass a parameter for each of your soundcards here!!! If I would just have passed snd-emu10k1.index=0, because I don't care about the order of other devices ALSA won't initialize correctly
Step 4: boot again and check again with dmesg
Code: | dmesg | less
.
.
.
ALSA device list:
#0: SBLive 5.1 [SB0060] (rev.7, serial:0x80611102) at 0xa000, irq 74
#1: NVidia CK804 with ALC850 at 0xe3204000, irq 233
#2: Brooktree Bt878 at 0xe3101000, irq 225
.
.
.
|
The order should be correct now and your default device is card number 0. All your applications should now use card 0 as default output. If you receive an error on ALSA initialisation check back the syntax and modules names in your kernel parameters.
changing mixer levels with alsamixer
Code: | alsamixer -c cardnumber |
will give you mixer-control over your soundcards. So alsamixer -c 1 gives me control over my onboard-sound. If you haven't stored your mixer levels invoke
this saves all your mixer-levels of all your soundcards, so that they stay if you reboot. Of course you can also set mixer levels for your different soundcards with other mixer applications like kmix.
Hope this HowTo was useful for some of you!
Cheers Felice !! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|