# Multiple sound cards with ALSA : HOWTO

## russofris

Multiple sound cards with ALSA : HOWTO

I'm a bit flabberghasted at the lack of alsa documentation on multiple sound cards.  The totality of documentation on the topic amounts to dick.  So here's my attempt at figuring out this whole mess.   This is not an exhaustive guide, it is simply my interpretation of the available docs, implemented in such a way as to assist those of us who learn better by example. 

While the focus of this doc will be on the setup of /etc/modules.d/alsa , I will try to cover the rest. 

1:  What sound card(s) do I have?

The simplest way to do this with PCI devices is to do the following 

#lspci | grep -i audio

```

h2so4 ~ # lspci -vv | grep -i audio 

0000:00:05.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10) 

0000:00:0d.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 02) 

0000:00:10.0 Multimedia audio controller: Aureal Semiconductor Vortex 2 (rev fe) 

```

Here we can see that I have 3 sound cards (Two and a TV card actually).  I have a CMI 8738, a Aureal Vortex 2, and a WinTV card.  I also have a USB webcam with microphone (it's an ov511)    

2:  2.6 kernel configuration

I'm not going to tell you how to compile your kernel.  I am going to tell you how to configure your sound.  We're going to build everything as modules.  I know some of you are going to want to go static, but I want you to trust me.  Building as modules gives you more control over the loading order of the devices.  This will be important later on.  So: 

(as root) 

cd /usr/src/Linux 

make menuconfig (or genkernel --menuconfig all ) 

```

Device Drivers  --->

   Sound  --->

      <*> Sound card support

         Advanced Linux Sound Architecture  --->

            <M> Advanced Linux Sound Architecture 

            <M> Sequencer support                     

            < >   Sequencer dummy client             

            <M> OSS Mixer API                     

            <M> OSS PCM (digital audio) API 

            [*] OSS Sequencer API

               PCI devices  --->

                  <M> Aureal Vortex 2

                  <M> Bt87x Audio Capture

                  <M> C-Media 8738, 8338    

               ALSA USB devices  --->

                  <M> USB Audio/MIDI driver 

```

Under PCI devices, you should select the sound cards that you had.  These were the three I had listed. 

Exit, save, make, make modules_install, cp to /boot, grubify it (you gentoo users know the drill) 

3:  Loading the modules

I use cold/hotplug.  It makes it so that things load easily and I don't have to do much when adding temporary hardware to my box.  There is a problem with hotplug though.  It's that you have little control over the order in which the modules are loaded.  Why is this a problem?  Let me explain a little. 

I want the Vortex2 to be my primary sound card.  I will do 99.99% of my stuff with it.  It is better than the CMI, does hardware mixing, and has a snazzy EQ. 

So how do we control the order in which the modules load?  Via the module autoloader. 

h2so4 linux # vi /etc/modules.autoload.d/kernel-2.6

```

# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots. 

# $Header: /var/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $ 

# 

# Note that this file is for 2.6 kernels. 

# 

# Add the names of modules that you'd like to load when the system 

# starts into this file, one per line.  Comments begin with # and 

# are ignored.  Read man modules.autoload for additional details. 

 

snd_au8830 

snd_cmipci 

snd_bt87x

snd_usb_audio 

```

This sets the orders that the modules will load in, and will do so before coldplug kicks in (and sets some random order, like making my USB webcam my default audio device!).   If someone else knows a better way to set up the module loading order, ping the thread and I will add it.  This seemed like the most simple way to me.

Go here if you don't know what the driver name is 

http://www.alsa-project.org/alsa-doc/

When you reboot, you can do an lsmod to see that the drivers are loaded. 

h2so4 linux # lsmod

```
 

Module                  Size  Used by 

snd_pcm_oss            52776  0 

snd_mixer_oss          17152  1 snd_pcm_oss 

snd_seq_midi            6688  0 

snd_seq_oss            33536  0 

snd_seq_midi_event      6784  2 snd_seq_midi,snd_seq_oss 

snd_seq                52496  5 snd_seq_midi,snd_seq_oss,snd_seq_midi_event 

ov511                 127904  0 

usbhid                 34112  0 

ohci_hcd               21380  0 

nvidia               3464412  12 

tuner                  19876  0 

tvaudio                22688  0 

bttv                  157644  0 

video_buf              18436  1 bttv 

firmware_class          7936  1 bttv 

i2c_algo_bit            8840  1 bttv 

btcx_risc               4104  1 bttv 

i2c_core               20112  4 tuner,tvaudio,bttv,i2c_algo_bit 

ehci_hcd               29956  0 

uhci_hcd               31504  0 

ohci1394               32388  0 

ieee1394              100148  1 ohci1394 

via_agp                 7936  1 

agpgart                27432  2 via_agp 

snd_usb_audio          67808  2 

snd_usb_lib            11520  1 snd_usb_audio 

usbcore               108260  9 ov511,usbhid,ohci_hcd,ehci_hcd,uhci_hcd,snd_usb_audio,snd_usb_lib 

snd_bt87x              10568  1 

snd_cmipci             28708  1 

snd_opl3_lib            9216  1 snd_cmipci 

snd_hwdep               7684  1 snd_opl3_lib 

snd_au8830             61092  2 

snd_pcm                93192  5 snd_pcm_oss,snd_usb_audio,snd_bt87x,snd_cmipci,snd_au8830 

snd_timer              24196  3 snd_seq,snd_opl3_lib,snd_pcm 

snd_page_alloc          7688  2 snd_bt87x,snd_pcm 

snd_ac97_codec         86096  1 snd_au8830 

gameport                3840  2 snd_cmipci,snd_au8830 

snd_mpu401_uart         6400  2 snd_cmipci,snd_au8830 

snd_rawmidi            21540  3 snd_seq_midi,snd_usb_lib,snd_mpu401_uart 

snd_seq_device          7176  5 snd_seq_midi,snd_seq_oss,snd_seq,snd_opl3_lib,snd_rawmidi 

snd                    53476  28 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_usb_audio,snd_bt87x,snd_cmipci,

snd_opl3_lib,snd_hwdep,snd_au8830,snd_pcm,snd_timer,snd_ac97_codec,snd_mpu401_uart,snd_rawmidi,snd_seq_device 

e100                   35712  0 

mii                     4480  1 e100 

 
```

4:   /etc/modules.d/alsa

Last but not least, we want to configure any options for our cards.  I think you have to install alsa-lib and alsa-util first 

vi /etc/modules.d/alsa 

```

# Alsa 0.9.X kernel modules' configuration file. 

# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.2 2004/07/18 03:40:55 dragonheart Exp $ 

 

# ALSA portion 

alias char-major-116 snd 

# OSS/Free portion 

alias char-major-14 soundcore 

## 

## IMPORTANT: 

## You need to customise this section for your specific sound card(s) 

## and then run `update-modules' command. 

## Read alsa-driver's INSTALL file in /usr/share/doc for more info. 

## 

##  ALSA portion 

alias snd-card-0 snd-au8830 

alias snd-card-1 snd-cmipci 

alias snd-card-2 snd-bt87x 

alias snd-card-3 snd-usb-audio 

 

options snd-au8330 id="first" enable_midi="1" 

options snd-cmipci id="second" 

options snd-bt87x id="third" 

options snd-usb-audio id="forth" 

##  OSS/Free portion 

alias sound-slot-0 snd-card-0 

alias sound-slot-1 snd-card-1 

alias sound-slot-2 snd-card-2 

alias sound-slot-3 snd-card-3 

# OSS/Free portion - card #1 

alias sound-service-0-0 snd-mixer-oss 

alias sound-service-0-1 snd-seq-oss 

alias sound-service-0-3 snd-pcm-oss 

alias sound-service-0-8 snd-seq-oss 

alias sound-service-0-12 snd-pcm-oss 

##  OSS/Free portion - card #2 

alias sound-service-1-0 snd-mixer-oss 

alias sound-service-1-3 snd-pcm-oss 

alias sound-service-1-12 snd-pcm-oss 

##  OSS/Free portion - card #3 

alias sound-service-2-0 snd-mixer-oss 

alias sound-service-2-3 snd-pcm-oss 

alias sound-service-2-12 snd-pcm-oss 

##  OSS/Free portion - card #4 

alias sound-service-3-0 snd-mixer-oss 

alias sound-service-3-3 snd-pcm-oss 

alias sound-service-3-12 snd-pcm-oss 

 

alias /dev/mixer snd-mixer-oss 

alias /dev/dsp snd-pcm-oss 

alias /dev/midi snd-seq-oss 

 

options snd  device_mode=0666 

options snd cards_limit=4 

```

rc-update add alsa default

modules-update

you may have to reboot

Things you should know about the above...   

There is only ONE oss sequencer (/dev/midi).  I would recommend using the one on your main sound card. 

Set the 'mode' if you want anyone other than root to be able to use the sound card. 

I called my cards "first, second, third, forth".  You can call yours whatever you want.

Cryptic info on the config of this file can be found here. 

http://www.alsa-project.org/alsa-doc/doc-php/template.php?company=USB&card=Generic&chip=Generic&module=usb-audio

Please ping the thread with anything that I missed.

Thank you for your time,

Frank RussoLast edited by russofris on Fri Dec 10, 2004 12:52 am; edited 8 times in total

----------

## russofris

1:  Added usb audio device configuration.  Fixed typos.

2:  I went and actually "read" the posting guidelines.

FrankLast edited by russofris on Thu Dec 09, 2004 4:31 pm; edited 1 time in total

----------

## Cintra

Looks good frank  :Smile: 

----------

## russofris

 *Cintra wrote:*   

> Looks good frank :-)

 

Thanx,

If you have a specific config you need assistance with, ping the thread with the hardware (an lspci and whatever USB stuff you have) and preferences.  I will write up a quick config.

Frank

----------

## X2O

great HOW-TO... =D

btw, I have an USB Audigy sound card and ALSA has allready detected the Audigy sound card BUT the sound is still coming out from my onboard soundcard and I cannot unmute the audigy from its external controller (the mute light is always on).... 

Any suggestions?

thanks....

----------

## kamikaze04

Great howto,

I've got a question,

I've got a sound card (integrated in my motherboard,based on AC97) and a usb headset.

I've done all the things you say and it works fine. But i'm kde user, and i would like to know if i can say somewhere (maybe in control-panel?) that the default out "sound card" is the ac97 for all the programs, or the headset for all the programs.

Actually i have to change in every program i run which output i want, and that is quite boring because i change quite from headset to ac97 quite often.

----------

## cocozz

Im trying to use an USB device (Logitech headset), I followed ur HOWTO but ....

Cocozz cocozz # alsamixer

alsamixer: function snd_ctl_open failed for default: No such device

Help.

2.6.9

Last ALSA drivers

Alsa loads OK :S

Cocozz cocozz # /etc/init.d/alsasound restart

 * WARNING:  you are stopping a boot service.

 * Unloading ALSA...

 * Storing ALSA Mixer Levels

 * Unloading modules                                                      [ ok ] * Loading ALSA drivers...

 * Using ALSA OSS emulation

 * Loading: snd-mixer-oss

 * Loading: snd-pcm-oss

 * Loading: snd-seq-oss

 * Running card-dependent scripts

 * Restoring Mixer Levels

----------

## ef2000

Thx russofris for this great HOW-TO  !!!!

I had problems with gentoo loading the onboard sound card first in alsa and nothing was working proprely.

thx again this post fixed my problem   :Smile: 

----------

## bonbons

 *kamikaze04 wrote:*   

> I've done all the things you say and it works fine. But i'm kde user, and i would like to know if i can say somewhere (maybe in control-panel?) that the default out "sound card" is the ac97 for all the programs, or the headset for all the programs.
> 
> Actually i have to change in every program i run which output i want, and that is quite boring because i change quite from headset to ac97 quite often.

 

It's possible by redefining the alsa default pcm. (If you are interested, you can also add support for dmix and dsnoop this way.) In KControlCenter you may also just specify another device in "Sound System" -> "Hardware" -> "Override Device Location" by settings "hw:0,0" or "hw:1,0" in the field.

Basic "~/.asoundrc" for your user (and restart all sound-programs after updating your .asoundrc).

```
# First card default:

pcm.!default {

    type plug

    slave {

        pcm "hw:0,0"

    }

}

ctl.mixer {

    type hw

    card 0

}

# Second card default:

pcm.!default {

    type plug

    slave {

        pcm "hw:1,0"

    }

}

ctl.mixer {

    type hw

    card 1

}
```

----------

## russofris

I see a lot of good responses and feedback, thanx muchly.

The main problem that I see people having is that it is difficult to make the USB audio device the default, or to send certain things to a PCI device, and others to a USB device.  As Bonbons pointed out, this is a situation where you would use dmix and a custom asoundrc (to reroute stuff).

I will see if I can come up with a howto on this, that puts things in an easy-to-understand way.

Frank

----------

## DaNIsH

Thanks heaps for the guide, although I didn't actually use it. Found it while trying to make my onboard (intel8x0) multi-channel after getting 2 sound cards going.

Works really well if you have TV-out going and want to watch a movie on the TV and computer at the same time (Read: Girlfriend gets me to download horribly boring soap operas)  :Smile: 

----------

## ef2000

I have 2 sound cards,  1 onboard and 1 Audigy 2 ZS.  I followed the HOW-TO and it did help me a lot to fix my problem.

For some reason, I couldn't get sound with my Audigy 2 ZS (even with a good configuration).  With XMMS,  I could see the sound actually being sent to the card but no sound was heared.  It turns out that Kmix was the problem.  Even if I unmuted the sound card with amixer,  kmix was somehow muting the PCI sound card (audigy) by default.  I was able to get sound from my onboard card and that was it.

I suggest to also prevent kmix to take over your system by doing this :

1. deactivate kmix (uncheck all boxes in config!!!)

    also disable the channel and make sure every lights are turned to red.

2. /etc/init.d/alsasound stop

3. rm /etc/asound.state

4. /etc/init.d/alsasound start

5. reactivate/unmute the channels with alsamixer or amixer

Now,  my sound is working completly.  After thinking it might be the drive or alsa,   the solution was different  than that.  I hope this might help as well for others.

----------

## reyneke

First of all: Thx for this great tut. I always hated configuring ALSA but everythig worked like charm following your Howto. 

But I got another question for this issue:

 *bonbons wrote:*   

>  *kamikaze04 wrote:*   (...) and i would like to know if i can say somewhere (maybe in control-panel?) that the default out "sound card" is the ac97 for all the programs, or the headset for all the programs. (...) 
> 
> It's possible by redefining the alsa default pcm.(...)In KControlCenter you may also just specify another device in "Sound System" -> "Hardware" -> "Override Device Location" by settings "hw:0,0" or "hw:1,0" in the field. (...)
> 
> 

 

How do I manage that without KControlcenter? I often use Fluxbox, especially for gaming ans want to switch from my speakers ( sound card #1) to my headset ( non-usb, sound card #2 ). 

Can this be done with a(lsa)mixer or do I have to merge some additional app?

Thx in advance,

reyneke.

P.S.: Plz excuse  my language or if the question was answered before and I didn't realize. Englich is not my native tongue.

----------

## bonbons

 *reyneke wrote:*   

>  *bonbons wrote:*    *kamikaze04 wrote:*   (...) and i would like to know if i can say somewhere (maybe in control-panel?) that the default out "sound card" is the ac97 for all the programs, or the headset for all the programs. (...) 
> 
> It's possible by redefining the alsa default pcm.(...)In KControlCenter you may also just specify another device in "Sound System" -> "Hardware" -> "Override Device Location" by settings "hw:0,0" or "hw:1,0" in the field. (...)
> 
>  
> ...

 

There isn't a way to do it through a GUI as far as I know. For all apps that use ALSA directly, the best way is to configure them with a common devicename (usually "default") that you manually point to the hardware device of your choice in ~/.asoundrc.

But you will probably need to restart the apps after a change to ~/.asoundrc (depends on how the app uses the alsalibs!)

For OSS apps you will have to use symlinks in /dev.

The only way to use alsamixer for it, is to output sound permanently to both cards, and muting one of both with alsamixer. (But then you loos the advantage of having two cards!)

----------

## kudude

 *Quote:*   

>  For all apps that use ALSA directly, the best way is to configure them with a common devicename (usually "default") that you manually point to the hardware device of your choice in ~/.asoundrc. 

 

how do i go about doing this?  I have two cards working, and using something like xmms where there is a preference for which card i can get output from whichever i choose.  I just want to know if there is some commandline argument i can use?   thanks

----------

## TheCoop

is there some way of duplicating the output to both sound cards, ie whatever is sent to the first one is also sent to the second one (I dont care about syncing it or anything like that)

----------

## russofris

Good news,

A friend of mine has just picked up a USB headset (with a Mic built in).  I will see if I can add the asoundrc portion in a few days.

Frank

----------

## alex

I followed the steps of the howto to prefend the mic of the webcam to become the default sound card, but without luck. And I'm stuck to get them in the right order.

/etc/modules.autoload.d/kernel-2.6

```

nvidia

via-rhine

snd_via82xx

snd_usb_audio

pwc

lp

```

dmesg

```
Linux version 2.6.11-gentoo-r4 (root@legolas.t-online.de) (gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)) #1 Sat Mar 26 23:26:49 CET 2005

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)

 BIOS-e820: 000000001fff0000 - 000000001fff3000 (ACPI NVS)

 BIOS-e820: 000000001fff3000 - 0000000020000000 (ACPI data)

 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

511MB LOWMEM available.

On node 0 totalpages: 131056

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 126960 pages, LIFO batch:16

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.2 present.

ACPI: RSDP (v000 KT400                                 ) @ 0x000f7780

ACPI: RSDT (v001 KT400  AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff3000

ACPI: FADT (v001 KT400  AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1fff3040

ACPI: DSDT (v001 KT400  AWRDACPI 0x00001000 MSFT 0x0100000d) @ 0x00000000

Allocating PCI resources starting at 20000000 (gap: 20000000:dec00000)

Built 1 zonelists

Kernel command line: udev root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hdb3

Found and enabled local APIC!

mapped APIC to ffffd000 (fee00000)

Initializing CPU#0

PID hash table entries: 2048 (order: 11, 32768 bytes)

Detected 1729.096 MHz processor.

Using tsc for high-res timesource

Speakup v-2.00 CVS: Wed Mar 2 20:22:02 EST 2005 : initialized

Speakup:  loading module "speakup_n"

request_module: runaway loop modprobe speakup_n

Console: colour VGA+ 80x25

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Memory: 512608k/524224k available (3022k kernel code, 10996k reserved, 1022k data, 204k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 3407.87 BogoMIPS (lpj=1703936)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

Couldn't initialize miscdevice /dev/synth.

CPU: After generic identify, caps: 0383fbff c1c3fbff 00000000 00000000 00000000 00000000 00000000

CPU: After vendor identify, caps: 0383fbff c1c3fbff 00000000 00000000 00000000 00000000 00000000

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

CPU: After all inits, caps: 0383fbff c1c3fbff 00000000 00000020 00000000 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU: AMD Athlon(tm) XP 2100+ stepping 02

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

ACPI: setting ELCR to 0200 (from 0e20)

checking if image is initramfs...it isn't (no cpio magic); looks like an initrd

Freeing initrd memory: 1597k freed

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfb3d0, last bus=1

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20050211

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

PCI: Via IRQ fixup

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)

spurious 8259A interrupt: IRQ7.

ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 10 11 12 14 15) *9

ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [ALKA] (IRQs 20) *0, disabled.

ACPI: PCI Interrupt Link [ALKB] (IRQs 21) *0, disabled.

ACPI: PCI Interrupt Link [ALKC] (IRQs 22) *0, disabled.

ACPI: PCI Interrupt Link [ALKD] (IRQs 23) *0, disabled.

Linux Plug and Play Support v0.97 (c) Adam Belay

pnp: PnP ACPI init

pnp: PnP ACPI: found 13 devices

SCSI subsystem initialized

PCI: Using ACPI for IRQ routing

** PCI interrupts are no longer routed automatically.  If this

** causes a device to stop working, it is probably because the

** driver failed to call pci_enable_device().  As a temporary

** workaround, the "pci=routeirq" argument restores the old

** behavior.  If this argument makes the device work again,

** please email the output of "lspci" to bjorn.helgaas@hp.com

** so I can fix the driver.

Machine check exception polling timer started.

apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)

apm: overridden by ACPI.

inotify device minor=63

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x0

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

SGI XFS with large block numbers, no debug enabled

Initializing Cryptographic API

Real Time Clock Driver v1.12

Non-volatile memory driver v1.2

vesafb: NVidia Corporation, NV25 Board, Chip Rev    (OEM: NVidia)

vesafb: VBE version: 3.0

vesafb: protected mode interface info at c000:e9d0

vesafb: pmi: set display start = c00cea15, set palette = c00cea9a

vesafb: pmi: ports = b4c3 b503 ba03 c003 c103 c403 c503 c603 c703 c803 c903 cc03 ce03 cf03 d003 d103 d203 d303 d403 d503 da03 ff03

vesafb: hardware doesn't support DCC transfers

vesafb: monitor limits: vf = 0 Hz, hf = 0 kHz, clk = 0 MHz

vesafb: scrolling: redraw

Console: switching to colour frame buffer device 80x30

vesafb: framebuffer at 0xd8000000, mapped to 0xe0880000, using 600k, total 131072k

fb0: VESA VGA frame buffer device

ACPI: Power Button (FF) [PWRF]

ACPI: Sleep Button (CM) [SLPB]

ACPI: Fan [FAN] (on)

ACPI: CPU0 (power states: C1[C1] C2[C2])

ACPI: Processor [CPU0] (supports 2 throttling states)

ACPI: Thermal Zone [THRM] (57 C)

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

mice: PS/2 mouse device common for all mice

input: AT Translated Set 2 keyboard on isa0060/serio0

input: ImPS/2 Generic Wheel Mouse on isa0060/serio1

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

loop: loaded (max 8 devices)

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: IDE controller at PCI slot 0000:00:11.1

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11

PCI: setting IRQ 11 as level-triggered

ACPI: PCI interrupt 0000:00:11.1[A] -> GSI 11 (level, low) -> IRQ 11

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci0000:00:11.1

    ide0: BM-DMA at 0xe400-0xe407, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xe408-0xe40f, BIOS settings: hdc:DMA, hdd:DMA

Probing IDE interface ide0...

hda: IC35L120AVV207-0, ATA DISK drive

hda: IRQ probe failed (0xecf8)

hdb: IC35L120AVV207-0, ATA DISK drive

hdb: IRQ probe failed (0xecf8)

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

Probing IDE interface ide1...

hdc: SONY CD-RW CRX185E3, ATAPI CD/DVD-ROM drive

hdd: HL-DT-STDVD-ROM GDR8161B, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

hda: max request size: 1024KiB

hda: 241254720 sectors (123522 MB) w/1821KiB Cache, CHS=16383/255/63, UDMA(100)

hda: cache flushes supported

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3

hdb: max request size: 1024KiB

hdb: 241254720 sectors (123522 MB) w/1821KiB Cache, CHS=16383/255/63, UDMA(100)

hdb: cache flushes supported

 /dev/ide/host0/bus0/target1/lun0: p1 p2 p3

hdc: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 48X DVD-ROM drive, 256kB Cache, UDMA(33)

st: Version 20041025, fixed bufsize 32768, s/g segs 256

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP established hash table entries: 32768 (order: 6, 262144 bytes)

TCP bind hash table entries: 32768 (order: 5, 131072 bytes)

TCP: Hash tables configured (established 32768 bind 32768)

NET: Registered protocol family 1

NET: Registered protocol family 17

powernow-k8: Processor cpuid 662 not supported

ACPI wakeup devices:

SLPB PCI0 USB0 USB1 USB2 USB6 USB7 USB8 USB9 LAN0 UAR1 LPT1

ACPI: (supports S0 S1 S4 S5)

RAMDISK: Compressed image found at block 0

VFS: Mounted root (ext2 filesystem) readonly.

Freeing unused kernel memory: 204k freed

usbcore: registered new driver usbfs

usbcore: registered new driver hub

ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 5

PCI: setting IRQ 5 as level-triggered

ACPI: PCI interrupt 0000:00:10.3[D] -> GSI 5 (level, low) -> IRQ 5

ehci_hcd 0000:00:10.3: VIA Technologies, Inc. USB 2.0

ehci_hcd 0000:00:10.3: irq 5, pci mem 0xeb001000

ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:10.3: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 6 ports detected

usbcore: registered new driver hiddev

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

USB Universal Host Controller Interface driver v2.2

ACPI: PCI interrupt 0000:00:10.0[A] -> GSI 11 (level, low) -> IRQ 11

uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller

uhci_hcd 0000:00:10.0: irq 11, io base 0xd800

uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10

PCI: setting IRQ 10 as level-triggered

ACPI: PCI interrupt 0000:00:10.1[B] -> GSI 10 (level, low) -> IRQ 10

uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)

uhci_hcd 0000:00:10.1: irq 10, io base 0xdc00

uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10

ACPI: PCI interrupt 0000:00:10.2[C] -> GSI 10 (level, low) -> IRQ 10

uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#3)

uhci_hcd 0000:00:10.2: irq 10, io base 0xe000

uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ohci1394: $Rev: 1223 $ Ben Collins <bcollins@debian.org>

ACPI: PCI interrupt 0000:00:0f.0[A] -> GSI 10 (level, low) -> IRQ 10

ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[10]  MMIO=[eb000000-eb0007ff]  Max Packet=[2048]

sbp2: $Rev: 1219 $ Ben Collins <bcollins@debian.org>

device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@redhat.com

libata version 1.10 loaded.

ReiserFS: hdb3: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on hdb3

kjournald starting.  Commit interval 5 seconds

EXT3 FS on hdb3, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

usb 3-2: new full speed USB device using uhci_hcd and address 2

ieee1394: Host added: ID:BUS[0-00:1023]  GUID[0011066645555565]

usb 2-1: new full speed USB device using uhci_hcd and address 2

Linux video capture interface: v1.00

pwc Philips webcam module version 10.0.6-unofficial loaded.

pwc Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.

pwc Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,

pwc the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.

pwc Trace options: 0x00a1

pwc Philips PCVC740K (ToUCam Pro)/PCVC840 (ToUCam II) USB webcam detected.

pwc Registered as /dev/video0.

usbcore: registered new driver Philips webcam

usb 2-1: modprobe timed out on ep0out

usb 2-1: modprobe timed out on ep0in

usbcore: registered new driver snd-usb-audio

Adding 996020k swap on /dev/hdb2.  Priority:-1 extents:1

EXT3 FS on hdb3, internal journal

Linux agpgart interface v0.100 (c) Dave Jones

nvidia: module license 'NVIDIA' taints kernel.

ACPI: PCI interrupt 0000:01:00.0[A] -> GSI 11 (level, low) -> IRQ 11

NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-7167  Fri Feb 25 09:08:22 PST 2005

via-rhine.c:v1.10-LK1.2.0-2.6 June-10-2004 Written by Donald Becker

ACPI: PCI interrupt 0000:00:12.0[A] -> GSI 11 (level, low) -> IRQ 11

eth0: VIA Rhine II at 0x1ec00, 00:01:29:4e:1a:42, IRQ 11.

eth0: MII PHY found at address 1, status 0x786d advertising 01e1 Link 45e1.

via82xx: Assuming DXS channels with 48k fixed sample rate.

         Please try dxs_support=1 or dxs_support=4 option

         and report if it works on your machine.

ACPI: PCI interrupt 0000:00:11.5[C] -> GSI 10 (level, low) -> IRQ 10

PCI: Setting latency timer of device 0000:00:11.5 to 64

parport: PnPBIOS parport detected.

parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]

parport0: Printer, hp deskjet 6122

lp0: using parport0 (interrupt-driven).

FAT: "conv=auto" option is obsolete, not supported now

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

agpgart: Detected VIA KT400/KT400A/KT600 chipset

agpgart: Maximum main memory to use for agp memory: 439M

agpgart: AGP aperture is 128M @ 0xd0000000
```

----------

## MagnusBerg

Hurray my depression is gone.

Since upgrading the Alsa things to 1.0.8 I always had to restart Alsa to make the mixer work. After reading this great how-to I understand that my TV/radio-cardmodule was loaded before my real soundcard.

But I didn't put all modules in /etc/modules.autoload.d/kernel-2.6 just the one I wanted to load first - snd_via82xx - and cold/hot -plug takes care of the rest.

Thanks russofris, you are a great shrink!  :Smile: 

----------

## lukaz

hi there,

have a look @ Fernando Lopez-Lezcano's ccrma home -> Configuring multiple sound cards

http://ccrma.stanford.edu/planetccrma/software/installtwosix.html#SECTION000201000000000000000

to get a idea about... 

in /etc/modules.d/alsa

>alias snd-card-0 snd-CARD_0

>options snd-CARD_0 index=0

index starts counting with 0. a modules-update, reboot or alsa stop/start and you shuld be done. I have not tried it yet, but it is reported to work on gentoo...

(german)

https://forums.gentoo.org/viewtopic-t-307853-highlight-.html

lukaz

----------

## TheCoop

Ive got a usb sound card ive set as the 2nd sound card, done all the cool things on this thread. The card appears in /proc/asound, but the device nodes arent created:

```
tachyon simon # ls /proc/asound

MP3  SI7012  card0  card1  cards  devices  oss  pcm  seq  timers  version

tachyon simon # cat /proc/asound/cards

0 [SI7012         ]: ICH - SiS SI7012

                     SiS SI7012 with CMI9739 at 0xe400, irq 18

1 [MP3            ]: USB-Audio - Sound Blaster MP3+

                     Creative Labs Sound Blaster MP3+ at usb-0000:00:03.3-3.2, full speed

tachyon simon # ls /dev/snd

controlC0  controlC1  pcmC0D0c  pcmC0D0p  pcmC0D1c  seq  timer
```

----------

## koroumel

I'm puzzled! I own a SB Audigy and a SB Audigy 2 ZS. As far as I know, they use the same driver/module, how am I going to specify which one should be loaded first?

----------

## russofris

 *koroumel wrote:*   

> I'm puzzled! I own a SB Audigy and a SB Audigy 2 ZS. As far as I know, they use the same driver/module, how am I going to specify which one should be loaded first?

 

I assume it's eriher by level, edge, or IRQ, so when you do an lspci, assume the one with the lowest or highest pciID number gets the priority.

Frank

----------

## jhunholz

I have this idea for making a central media server for my house. This box would have 4 or 5 different sound cards, and I would like them to all work in unison, or stand-alone, so I can turn them on or off when I want.  So, is this do-able? From reading this thread, it seems like you can only use one sound card at a time, so I wouldn't be able to play on all of them. So could I do that, or not?

----------

## Root Moose

This is my config: 

 - VIA onbaord that uses the via82xx driver. This is configured and works fine.

 - Creative Audigy 2 NX USB. This is supposed to use emu10k1. This card does not seem to want to be configured.

uname -a

```
Linux recon 2.6.11-gentoo-r8 #1 Fri May 13 13:57:05 EDT 2005 i686 VIA Nehemiah CentaurHauls GNU/Linux
```

lsmod

```
Module                  Size  Used by

snd_seq                55760  0 

snd_pcm_oss            54304  0 

snd_mixer_oss          20512  1 snd_pcm_oss

snd_via82xx            27936  0 

snd_mpu401_uart         8192  1 snd_via82xx

snd_emu10k1           103268  0 

snd_rawmidi            25536  2 snd_mpu401_uart,snd_emu10k1

snd_seq_device          8652  3 snd_seq,snd_emu10k1,snd_rawmidi

snd_ac97_codec         78840  2 snd_via82xx,snd_emu10k1

snd_pcm                96872  4 snd_pcm_oss,snd_via82xx,snd_emu10k1,snd_ac97_codec

snd_timer              26596  3 snd_seq,snd_emu10k1,snd_pcm

snd_page_alloc         10020  3 snd_via82xx,snd_emu10k1,snd_pcm

snd_util_mem            4512  1 snd_emu10k1

snd_hwdep               9792  1 snd_emu10k1

snd                    56068  12 snd_seq,snd_pcm_oss,snd_mixer_oss,snd_via82xx,snd_mpu401_uart,snd_emu10k1,snd_rawmidi,\

snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer,snd_hwdep
```

cat /etc/modules.d/alsa 

```
# Alsa 0.9.X kernel modules' configuration file.

# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.2 2004/07/18 03:40:55 dragonheart Exp $

# ALSA portion

alias char-major-116 snd

#options snd snd_major=116 snd_cards_limit=2

alias snd-card-0 snd-via82xx

alias snd-card-1 snd-emu10k1

#alias snd-card-1 snd-usb-audio

options snd-via82xx dxs_support=3 id="via"

#options snd-emu10k1 index=0 enable_ir=1 extin="0x3fc3" extout="0x1fff"

options snd-emu10k1 id="audigy"

# OSS/Free portion

alias char-major-14 soundcore

##

## IMPORTANT:

## You need to customise this section for your specific sound card(s)

## and then run `update-modules' command.

## Read alsa-driver's INSTALL file in /usr/share/doc for more info.

##

##  ALSA portion

## alias snd-card-0 snd-interwave

## alias snd-card-1 snd-ens1371

##  OSS/Free portion

alias sound-slot-0 snd-card-0

alias sound-slot-1 snd-card-1

# OSS/Free portion - card #1

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

##  OSS/Free portion - card #2

alias sound-service-1-0 snd-mixer-oss

alias sound-service-1-1 snd-seq-oss

alias sound-service-1-3 snd-pcm-oss

alias sound-service-1-8 snd-seq-oss

alias sound-service-1-12 snd-pcm-oss

alias /dev/sound/mixer snd-mixer-oss

alias /dev/sound/dsp snd-pcm-oss

alias /dev/sound/midi snd-seq-oss

# Set this to the correct number of cards.

options snd cards_limit=2
```

cat /etc/modules.autoload.d/kernel-2.6

```
# /etc/modules.autoload.d/kernel-2.6:  kernel modules to load when system boots.

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload.d/kernel-2.6,v 1.1 2003/07/16 18:13:45 azarah Exp $

#

# Note that this file is for 2.6 kernels.

#

# Add the names of modules that you'd like to load when the system

# starts into this file, one per line.  Comments begin with # and

# are ignored.  Read man modules.autoload for additional details.

snd_emu10k1

snd_via82xx
```

cat /proc/asound/cards

```
0 [via            ]: VIA8233 - VIA 8235

                     VIA 8235 with VT1616i at 0xe400, irq 10
```

dmesg

```
Linux version 2.6.11-gentoo-r8 (root@recon) (gcc version 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)) #2 Mon May 16 16:04:11 EDT 2005

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001bff0000 (usable)

 BIOS-e820: 000000001bff0000 - 000000001bff3000 (ACPI NVS)

 BIOS-e820: 000000001bff3000 - 000000001c000000 (ACPI data)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

447MB LOWMEM available.

On node 0 totalpages: 114672

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 110576 pages, LIFO batch:16

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.2 present.

ACPI: RSDP (v000 VT9174                                ) @ 0x000f6650

ACPI: RSDT (v001 VT9174 AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1bff3000

ACPI: FADT (v001 VT9174 AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x1bff3040

ACPI: DSDT (v001 VT9174 AWRDACPI 0x00001000 MSFT 0x0100000c) @ 0x00000000

Allocating PCI resources starting at 1c000000 (gap: 1c000000:e3ff0000)

Built 1 zonelists

Kernel command line: root=/dev/hda3 video=vesafb:1024x768-24@76 splash=verbose,theme:emergence

fbsplash: verbose

fbsplash: theme emergence

Initializing CPU#0

CPU 0 irqstacks, hard=c0551000 soft=c0550000

PID hash table entries: 2048 (order: 11, 32768 bytes)

Detected 999.566 MHz processor.

Using tsc for high-res timesource

Console: colour VGA+ 80x25

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

Memory: 448828k/458688k available (3104k kernel code, 9252k reserved, 1114k data, 172k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 1974.27 BogoMIPS (lpj=987136)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU: After generic identify, caps: 0380b03d 00000000 00000000 00000000 00000000 00000000 00000000

CPU: L1 I Cache: 64K (32 bytes/line), D cache 64K (32 bytes/line)

CPU: L2 Cache: 64K (32 bytes/line)

CPU: After all inits, caps: 0380b13d 00000000 00000000 00000000 00000000 0000003d 00000000

CPU: Centaur VIA Nehemiah stepping 04

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

ACPI: setting ELCR to 0200 (from 0ea0)

checking if image is initramfs... it is

Freeing initrd memory: 590k freed

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfb260, last bus=1

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20050211

ACPI: Interpreter enabled

ACPI: Using PIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (00:00)

PCI: Probing PCI hardware (bus 00)

PCI: Via IRQ fixup

PCI: Via IRQ fixup

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 *5 6 7 10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 *10 11 12 14 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 *7 10 11 12 14 15)

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

** PCI interrupts are no longer routed automatically.  If this

** causes a device to stop working, it is probably because the

** driver failed to call pci_enable_device().  As a temporary

** workaround, the "pci=routeirq" argument restores the old

** behavior.  If this argument makes the device work again,

** please email the output of "lspci" to bjorn.helgaas@hp.com

** so I can fix the driver.

longhaul: VIA C3 'Nehemiah B' [C5N] CPU detected.  Powersaver supported.

inotify device minor=63

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x0

SGI XFS with no debug enabled

Initializing Cryptographic API

Real Time Clock Driver v1.12

hw_random hardware driver 1.0.0 loaded

Linux agpgart interface v0.100 (c) Dave Jones

agpgart: Detected VIA CLE266 chipset

agpgart: Maximum main memory to use for agp memory: 380M

agpgart: AGP aperture is 256M @ 0xc0000000

[drm] Initialized drm 1.0.0 20040925

vga16fb: initializing

vga16fb: mapped to 0xc00a0000

Console: switching to colour frame buffer device 80x30

fbsplash: console 0 using theme 'emergence'

fb0: VGA16 VGA frame buffer device

ACPI: Power Button (FF) [PWRF]

ACPI: CPU0 (power states: C1[C1] C2[C2])

ACPI: Processor [CPU0] (supports 2 throttling states)

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

mice: PS/2 mouse device common for all mice

input: AT Translated Set 2 keyboard on isa0060/serio0

input: ImPS/2 Generic Wheel Mouse on isa0060/serio1

input: PC Speaker

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize

loop: loaded (max 8 devices)

via-rhine.c:v1.10-LK1.2.0-2.6 June-10-2004 Written by Donald Becker

ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11

PCI: setting IRQ 11 as level-triggered

ACPI: PCI interrupt 0000:00:12.0[A] -> GSI 11 (level, low) -> IRQ 11

eth0: VIA Rhine II at 0xd6002000, 00:40:63:d3:fd:f9, IRQ 11.

eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link cde1.

Linux video capture interface: v1.00

bttv: driver version 0.9.15 loaded

bttv: using 8 buffers with 2080k (520 pages) each for capture

tvaudio: TV audio decoder + audio/video mux driver

tvaudio: known chips: tda9840,tda9873h,tda9874h/a,tda9850,tda9855,tea6300,tea6320,tea6420,tda8425,pic16c54 (PV951),ta8874z

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

VP_IDE: IDE controller at PCI slot 0000:00:11.1

ACPI: PCI interrupt 0000:00:11.1[A] -> GSI 11 (level, low) -> IRQ 11

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci0000:00:11.1

    ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xe008-0xe00f, BIOS settings: hdc:DMA, hdd:pio

Probing IDE interface ide0...

hda: FUJITSU MHT2040AH, ATA DISK drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

Probing IDE interface ide1...

hdc: ASUS CD-S500/A, ATAPI CD/DVD-ROM drive

ide1 at 0x170-0x177,0x376 on irq 15

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

hda: max request size: 128KiB

hda: 78140160 sectors (40007 MB) w/8192KiB Cache, CHS=65535/16/63, UDMA(33)

hda: cache flushes supported

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4

hdc: ATAPI 50X CD-ROM drive, 128kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 7

PCI: setting IRQ 7 as level-triggered

ACPI: PCI interrupt 0000:00:10.3[D] -> GSI 7 (level, low) -> IRQ 7

ehci_hcd 0000:00:10.3: VIA Technologies, Inc. USB 2.0

ehci_hcd 0000:00:10.3: irq 7, pci mem 0xd6001000

ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:10.3: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 6 ports detected

ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

USB Universal Host Controller Interface driver v2.2

ACPI: PCI interrupt 0000:00:10.0[A] -> GSI 11 (level, low) -> IRQ 11

uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller

uhci_hcd 0000:00:10.0: irq 11, io base 0xd400

uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 5

PCI: setting IRQ 5 as level-triggered

ACPI: PCI interrupt 0000:00:10.1[B] -> GSI 5 (level, low) -> IRQ 5

uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)

uhci_hcd 0000:00:10.1: irq 5, io base 0xd800

uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10

PCI: setting IRQ 10 as level-triggered

ACPI: PCI interrupt 0000:00:10.2[C] -> GSI 10 (level, low) -> IRQ 10

uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#3)

uhci_hcd 0000:00:10.2: irq 10, io base 0xdc00

uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

Initializing USB Mass Storage driver...

usb 2-1: new full speed USB device using uhci_hcd and address 2

usb 2-2: new low speed USB device using uhci_hcd and address 3

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.0:USB HID core driver

usbcore: registered new driver dsbr100

drivers/usb/media/dsbr100.c: v0.40:D-Link DSB-R100 USB FM radio driver

i2c /dev entries driver

NET: Registered protocol family 2

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP established hash table entries: 16384 (order: 5, 131072 bytes)

TCP bind hash table entries: 16384 (order: 4, 65536 bytes)

TCP: Hash tables configured (established 16384 bind 16384)

IPv4 over IPv4 tunneling driver

ip_tables: (C) 2000-2002 Netfilter core team

NET: Registered protocol family 1

NET: Registered protocol family 17

ACPI wakeup devices: 

PCI0 USB0 USB1 USB2 USB3 USB4 USB5 USB6 LAN0 AC97 MC97 UAR1 

ACPI: (supports S0 S1 S4 S5)

XFS mounting filesystem hda3

Ending clean XFS mount for filesystem: hda3

VFS: Mounted root (xfs filesystem) readonly.

Freeing unused kernel memory: 172k freed

Adding 755044k swap on /dev/hda2.  Priority:-1 extents:1

ACPI: PCI interrupt 0000:00:11.5[C] -> GSI 10 (level, low) -> IRQ 10

PCI: Setting latency timer of device 0000:00:11.5 to 64

XFS mounting filesystem hda4

Ending clean XFS mount for filesystem: hda4

eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1

nfs warning: mount version older than kernel

nfs warning: mount version older than kernel

nfs warning: mount version older than kernel

fbsplash: console 0 using theme 'emergence'

fbsplash: console 1 using theme 'emergence'

fbsplash: console 2 using theme 'emergence'

fbsplash: console 3 using theme 'emergence'

fbsplash: console 4 using theme 'emergence'

fbsplash: console 5 using theme 'emergence'

fbsplash: console 6 using theme 'emergence'

fbsplash: console 7 using theme 'emergence'

fbsplash: console 8 using theme 'emergence'

fbsplash: console 9 using theme 'emergence'

fbsplash: console 10 using theme 'emergence'
```

lspci

```
0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8623 [Apollo CLE266]

0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]

0000:00:0d.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)

0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

0000:00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)

0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge

0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)

0000:01:00.0 VGA compatible controller: VIA Technologies, Inc. VT8623 [Apollo CLE266] integrated CastleRock graphics (rev 03)
```

lsusb

```
Bus 004 Device 001: ID 0000:0000  

Bus 003 Device 001: ID 0000:0000  

Bus 002 Device 003: ID 04b4:1002 Cypress Semiconductor Corp. CY7C63001 R100 FM Radio

Bus 002 Device 002: ID 041e:3020 Creative Technology, Ltd SoundBlaster Audigy 2 NX

Bus 002 Device 001: ID 0000:0000  

Bus 001 Device 001: ID 0000:0000
```

I feel like I'm missing a little detail. Ideas?

r@mLast edited by Root Moose on Mon Nov 21, 2005 6:56 pm; edited 1 time in total

----------

## Root Moose

I have since gotten this working. The trick was to configure each card individually and then merge the configs together.

cat /etc/modules.autoload.d/kernel-2.6

```
#snd-usb-audio

#snd_emu10k1

#snd_via82xx
```

Yes, nothing gets loaded at this point!

cat /etc/modules.d/alsa

```
# ALSA portion

alias char-major-116 snd

alias snd-card-0 snd-usb-audio

alias snd-card-1 snd-via82xx

options snd-usb-audio index=0 id="audigy"

options snd-via82xx index=1 dxs_support=3 id="via"

# OSS/Free portion

alias char-major-14 soundcore

alias sound-slot-0 snd-card-0

# OSS/Free portion - card #1

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

# OSS/Free portion - card #2

alias sound-service-1-0 snd-mixer-oss

alias sound-service-1-1 snd-seq-oss

alias sound-service-1-3 snd-pcm-oss

alias sound-service-1-8 snd-seq-oss

alias sound-service-1-12 snd-pcm-oss

alias /dev/sound/mixer snd-mixer-oss

alias /dev/sound/dsp snd-pcm-oss

alias /dev/sound/midi snd-seq-oss

# Set this to the correct number of cards.

options snd cards_limit=2
```

You will end up with the following devices created after modules-update and/or a reboot:

ls -l /dev/snd /dev/sound

```
/dev/snd:

total 0

crw-------  1 recon audio 116,  0 May 17 16:20 controlC0

crw-------  1 recon audio 116, 32 May 17 16:20 controlC1

crw-------  1 recon audio 116, 24 May 17 16:20 pcmC0D0c

crw-------  1 recon audio 116, 16 May 17 16:20 pcmC0D0p

crw-------  1 recon audio 116, 56 May 17 16:20 pcmC1D0c

crw-------  1 recon audio 116, 48 May 17 16:20 pcmC1D0p

crw-------  1 recon audio 116, 57 May 17 16:20 pcmC1D1c

crw-------  1 recon audio 116, 49 May 17 16:20 pcmC1D1p

crw-------  1 recon audio 116,  1 May 17 16:20 seq

crw-------  1 recon audio 116, 33 May 17 16:20 timer

/dev/sound:

total 0

crw-------  1 recon audio 14, 28 May 17 16:20 adsp1

crw-------  1 recon audio 14,  4 May 17 16:20 audio

crw-------  1 recon audio 14, 20 May 17 16:20 audio1

crw-------  1 recon audio 14,  3 May 17 16:20 dsp

crw-------  1 recon audio 14, 19 May 17 16:20 dsp1

crw-------  1 recon audio 14,  0 May 17 16:20 mixer

crw-------  1 recon audio 14, 16 May 17 16:20 mixer1

crw-------  1 recon audio 14,  1 May 17 16:20 sequencer

crw-------  1 recon audio 14,  8 May 17 16:20 sequencer2
```

The modules loaded looks like this.

lsmod

```
Module                  Size  Used by

snd_pcm_oss            54304  0 

snd_mixer_oss          20512  1 snd_pcm_oss

snd_seq_oss            36064  0 

snd_seq_midi_event      7904  1 snd_seq_oss

snd_seq                55760  4 snd_seq_oss,snd_seq_midi_event

snd_via82xx            27936  0 

snd_ac97_codec         78840  1 snd_via82xx

snd_mpu401_uart         8192  1 snd_via82xx

snd_usb_audio          67904  0 

snd_pcm                96872  4 snd_pcm_oss,snd_via82xx,snd_ac97_codec,snd_usb_audio

snd_timer              26596  2 snd_seq,snd_pcm

snd_page_alloc         10020  2 snd_via82xx,snd_pcm

snd_usb_lib            13440  1 snd_usb_audio

snd_rawmidi            25536  2 snd_mpu401_uart,snd_usb_lib

snd_seq_device          8652  3 snd_seq_oss,snd_seq,snd_rawmidi

snd                    56068  12 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_via82xx,snd_ac97_codec,\

snd_mpu401_uart,snd_usb_audio,snd_pcm,snd_timer,snd_rawmidi,snd_seq_device

soundcore              10528  1 snd
```

This thread has details on getting the Audigy 2 NX working:

https://forums.gentoo.org/viewtopic-t-301053-highlight-audigy+usb.html

HTH someone.

r@mLast edited by Root Moose on Mon Nov 21, 2005 6:58 pm; edited 1 time in total

----------

## koroumel

Thanx for the answer, I set the default card in all applications to be the ZS one, so it does not matter (yet). Again, thanx!

----------

## codergeek42

Beautiful. I've got a Plantronics DSP500 USB headset set as the default and an onboard VIA 82xx driver that I use for the gameport. Thanks for the guide. 

Now to find out how to get it to do dmix and full-duplex ^_^

----------

## saluk

Very nice tutorial, while I had sound sort of working and other times I have had no problems with two sound cards, now I understand the configuration file a LOT better and everything is working perfectly  :Smile: 

----------

## frogg

 *TheCoop wrote:*   

> is there some way of duplicating the output to both sound cards, ie whatever is sent to the first one is also sent to the second one (I dont care about syncing it or anything like that)

 

I am also trying to do this. Anybody know?

----------

## nickd

Hello,

I've followed this, and many other threads and really thought that I'd got it, but I still get my sound defaulting to the USB headset (Plantronics DSP400) rather than the on-board card (intel8x0 on a Thinkpad T40p).

I think that this is because the headset is detected during the usb initialisation - so nothing that I do in modules.autoload will help as this is read later in the boot.

It appears that my index= entry in modules.d/alsa has no effect.

Can ayone suggest steps to fix this?

TIA

-- 

 Nick

[/code]Some conf files:

/etc/modules.autoload.d/kernel-2.6

```
# on-board sound

snd_intel8x0

# USM headphone

snd_usb_audio

# Graphics stuff
```

cat /etc/modules.d/alsa

```
options snd-intel8x0 index=0 id="onboard"

options snd-usb-audio index=1 id="headset"

# This will let non-root users use sound

options snd device_mode=0666

# Set this to the correct number of cards.

options snd major=116 cards_limit=2

##

##  ALSA portion

alias char-major-116 snd

alias snd-card-0 snd-intel8x0

alias snd-card-1 snd-usb-audio

##  OSS/Free portion

alias char-major-14 soundcore

alias sound-slot-0 snd-card-0

alias sound-slot-1 snd-card-1

# OSS/Free portion - card #1

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

##  OSS/Free portion - card #2

alias sound-service-1-0 snd-mixer-oss

alias sound-service-1-3 snd-pcm-oss

alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss
```

----------

## Gentree

 *DaNIsH wrote:*   

> 
> 
> Works really well if you have TV-out going and want to watch a movie on the TV and computer at the same time (Read: Girlfriend gets me to download horribly boring soap operas) 

 

Stop spending so much time on the computer and she might watch less soaps !!   :Laughing: 

Seriously, this thread is great help. Alsa is powerful but so poorly documented most of that power is lost. I must have spent weeks over the time I've been using Linux battling to get things to work right.  

Thanks for a great confribution. It actually sorted out a problem I had since removing my second sound card (I gave up with things coming out wrong, maybe now I can fix it to work right.)

Nice work.   :Cool: 

Almost forgot , I add a line for the joystick config as well , I only found this worked in kernel-2.6 not in /etc/modules.d/alsa. Dont know why.

```
joydev

analog

gameport

snd-ens1371 joystick_port=1

```

May be worth a note in your guide.   :Cool: 

----------

## weeroona

I have 12 usb sound cards that I am using for a museum exhibit (outputs to many different speakers at the same time). I have been testing two of the devices while developing the software and just received the other 10 (all are the same model of sound card). When I plugged them all in, only 8 show up under /proc/asound/cards but all 12 are listed by lsusb:

```

localhost portage # lsusb

Bus 002 Device 040: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 039: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 038: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 037: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 036: ID 050d:0234 Belkin Components F5U234 USB 2.0 4-Port Hub

Bus 002 Device 035: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 034: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 033: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 032: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 031: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 026: ID 050d:0234 Belkin Components F5U234 USB 2.0 4-Port Hub

Bus 002 Device 022: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 021: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO

Bus 002 Device 018: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 014: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO

Bus 002 Device 013: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO

Bus 002 Device 012: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO

Bus 002 Device 011: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO

Bus 002 Device 008: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 007: ID 05e3:0604 Genesys Logic, Inc. USB 1.1 Hub

Bus 002 Device 005: ID 07cc:0501 Carry Computer Eng., Co., Ltd

Bus 002 Device 004: ID 050d:0234 Belkin Components F5U234 USB 2.0 4-Port Hub

Bus 002 Device 003: ID 050d:0234 Belkin Components F5U234 USB 2.0 4-Port Hub

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 002: ID 046d:c016 Logitech, Inc. M-UV69a Optical Wheel Mouse

Bus 001 Device 001: ID 0000:0000

localhost portage # cat /proc/asound/cards

0 [default        ]: USB-Audio - C-Media USB Headphone Set

                     C-Media USB Headphone Set   at usb-0000:00:0b.1-3.3, full speed

1 [default_1      ]: USB-Audio - C-Media USB Headphone Set

                     C-Media USB Headphone Set   at usb-0000:00:0b.1-3.4, full speed

2 [default_2      ]: USB-Audio - C-Media USB Headphone Set

                     C-Media USB Headphone Set   at usb-0000:00:0b.1-4.1, full speed

3 [default_3      ]: USB-Audio - C-Media USB Headphone Set

                     C-Media USB Headphone Set   at usb-0000:00:0b.1-1.1, full speed

4 [default_4      ]: USB-Audio - C-Media USB Headphone Set

                     C-Media USB Headphone Set   at usb-0000:00:0b.1-1.2, full speed

5 [default_5      ]: USB-Audio - C-Media USB Headphone Set

                     C-Media USB Headphone Set   at usb-0000:00:0b.1-1.3, full speed

6 [default_6      ]: USB-Audio - C-Media USB Headphone Set

                     C-Media USB Headphone Set   at usb-0000:00:0b.1-1.4, full speed

7 [default_7      ]: USB-Audio - C-Media USB Headphone Set

                     C-Media USB Headphone Set   at usb-0000:00:0b.1-4.4.4, full speed

```

I have 'options snd cards_limit=12' in my /etc/modules.d/alsa. 

Any thoughts? 

I will supply any more info if needed.

thanks!

----------

## Root Moose

Do the 8 that appear seem to work?

If they do my thought is that there might be something hard coded and/or not-coded in ALSA itself. Devices 0-7 looks very obvious.

I'd be inclined to post to alsa-users and see what the developers say.

----------

## Dominique_71

This thread is very good to do a basic configuration, but a musician will need to get more of the sound card(s).

They will use jack as the sound server. For the live and audigy sound cards, it is 3 files in /usr/src/linux/Documentation/sound/alsa that they must read.

It is possible to archieve a very low latency with jack and a 8 channel mixing capability with those sound cards.

Another issue is the kernel. The best kernel for serious audio work is a realtime kernel with Ingo Molnar patch. You can look at that thread: realtime-preempt

Another good thread with music apps is pro audio production applications portage overlay

----------

## weeroona

After getting referred to the alsa-users mailing list, I posted there and got a quick response. The stable 'alsa-driver' 1.0.10 does not allow more than 8 cards, but 1.0.11-rc3 does.

so, add 'media-sound/alsa-driver' to your /etc/portage/packages.keywords plus any other dependencies that need to be upgraded to testing version.

alsa-driver must be compiled seperately from the kernel with the '--enable-dynamic-minors' flag. so add that to the 1.0.11rc3 ebuild:

```

src_compile() {

   # Should fix bug #46901

   is-flag "-malign-double" && filter-flags "-fomit-frame-pointer"

   append-flags "-I${KV_DIR}/arch/$(tc-arch-kernel)/include"

   econf $(use_with oss) \

      $(use_with debug debug full) \

      --with-kernel="${KV_DIR}" \

      --with-build="${KV_OUT_DIR}" \

      --with-isapnp=yes \

      --with-sequencer=yes \

      --with-cards="${ALSA_CARDS}" \

      --enable-dynamic-minors || die "econf failed"  # <--------added flag

```

emerge --digest alsa-driver

for my /etc/modules.d/alsa:

```

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

alias char-major-116 snd

alias char-major-14 soundcore

alias snd-card-0 snd-usb-audio

alias sound-slot-0 snd-card-0

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

alias snd-card-1 snd-usb-audio

alias sound-slot-1 snd-card-1

alias sound-service-1-0 snd-mixer-oss

alias sound-service-1-1 snd-seq-oss

alias sound-service-1-3 snd-pcm-oss

alias sound-service-1-8 snd-seq-oss

alias sound-service-1-12 snd-pcm-oss

alias snd-card-N snd-usb-audio   # (continue for each additional card with N getting incremented)

alias sound-slot-N snd-card-N

alias sound-service-N-0 snd-mixer-oss

alias sound-service-N-1 snd-seq-oss

alias sound-service-N-3 snd-pcm-oss

alias sound-service-N-8 snd-seq-oss

alias sound-service-N-12 snd-pcm-oss

options snd_cards_limit=11   # set to your total number of cards

```

run 'modules-update'

then probably reload the modules. I ran '/etc/init.d/alsasound restart' but this didn't work. Only 4 cards showed up. I was frustrated and restarted. Upon the fresh boot, all the cards were found and working. I'm pretty sure I just didn't reload enough modules after recompiling 'alsa-driver'. 

```

 0 [default        ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.2.1, full speed

 1 [default_1      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.2.2, full speed

 2 [default_2      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.2.3, full speed

 3 [default_3      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.2.4, full speed

 4 [default_4      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.3.1, full speed

 5 [default_5      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.3.2, full speed

 6 [default_6      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.3.3, full speed

 7 [default_7      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.3.4, full speed

 8 [default_8      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.4.1, full speed

 9 [default_9      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.4.2, full speed

10 [default_A      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.4.3, full speed

11 [default_B      ]: USB-Audio - C-Media USB Headphone Set

                      C-Media USB Headphone Set   at usb-0000:00:0b.1-4.4.4, full speed

```

I know this is a rediculous number of cards to be using. I had to use alsa rather than jack because the pymedia library, I don't believe, have support for Jack. actually I won't even be using the alsa support, I'll be using OSS emulation. I haven't tested that out yet but am hopeful it will work since it seems to be attached to the alsa configuration.

more info on the snd-usb-audio driver from alsa-project.org.

I also found this helpful.

Thanks for folks help in leading me down the right path!

----------

## nivw

 *Quote:*   

> If someone else knows a better way to set up the module loading order, ping the thread and I will add it. This seemed like the most simple way to me. 

 

I do http://gentoo-wiki.com/UDEV_Overview

using udev I can staticly set the devices each sound card gets.

----------

## Dominique_71

For a realtime kernel configuration, a good article is Low-latency Kernel Building How-to

To install the source, a good way is the pro audio production applications portage overlay. Don't forget to install sys-process/rtirq (description: Change the realtime scheduling policy and priority of relevant system driver IRQ handlers) with a such kernel.

----------

## HackingM2

Hi all.

Sorry to post such a shameless plug for my own how-to thread but it does contain some information you may find useful, including details of how to use the microphone from one card (in the example USB) and the line-out on another as the defaults.  

Check it out at  [HOWTO] ALSA - Application specific volume controls

----------

## lukaz

hi there,

I got a ozone keyboard with a integrated audio-interface and a yahama usb-midi port. both use the same (usb-audio) driver. to keep the order of those devices, the indexoption does obviously not help. the usb-devices will be orderd in the order you connect them.

to get rid of this behaviour, I set the "pid" (idProduct) & the "vid" (idVendor) of the devices in "/etc/modules.d/alsa" like this.

```
alias snd-card-0 snd-intel8x0

options snd-intel8x0 index=0 id="Onboard"

alias snd-card-1 snd-usb-audio

options snd-usb-audio index=1 nrpacks=1 vid=0x0763 pid=0x2008 id="Ozone"

alias snd-card-2 snd-usb-audio

options snd-usb-audio index=2 vid=0x0499 pid=0x1009 id="usb-midi"

# Set this to the correct number of cards.

options snd cards_limit=3
```

to get the vid and pid of your devices use "lsusb -v"!

put it in your "/etc/modules.d/alsa", module-update, reboot...

lukaz

----------

