Multilple Sound Cards Setup

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
EclecticallySound
Posts: 1
Joined: Sun Oct 19, 2014 12:55 am

Multilple Sound Cards Setup

Post by EclecticallySound »

I am newbie looking for some guidence for setting up multilple sound cards on my Linux Box. I hope that I have posted this in the correct forum, appolgies if I have not.

OS - Ubuntu 14.04.1 LTS, (Trusty Tahr), KXStudio Spin – 64 Bit

Hardware - AMD Atholon 64 3200+ 2GHz

Sound Card(s)

Audigy2 - SB Audigy 2 ZS [SB0350] – PCI
Focusrite Scarlett 6i6 Novation EMS - USB
Roland Corp. USB MIDI Interface UM-ONE – USB {Connection to Yamaha MIDI Keyboard}

Code: Select all

$ cat /proc/asound/modules

0 snd_aloop
1 snd_emu10k1
2 snd_usb_audio
3 snd_usb_audio
I have backed up my alsa-base.conf


My question is may I just edit my “/etc/modprobe.d/alsa-base.conf” to make my Scarlett 6i6 USB default, “snd-card-0” with the following:

Code: Select all

alias snd-card-0 snd-usb-audio
alias snd-card-1 snd_emu10k1
alias snd-card-2 snd-usb-audio
alias snd-card-3 snd-virmidi
options snd cards_limit=4
options snd-card-1 snd_emu10k1
options snd-usb-audio index=0,2 vid=0x1235,0x0582 pid=0x8012,012
options snd-virmidi index=3 midi_devs=2
As a newbie I am unclear on wether I may just add that to the end of my alsa-base.conf file or if there are other steps I must do like commenting out certain lines etc, so before I soil the sheets I would greatly appreciate input from anyone with the time and knowledge to guide me in the right direction, thank you kindly in adavnce

Current alsa-base.conf :

Code: Select all

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7

# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
User avatar
khz
Established Member
Posts: 1679
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 48 times
Been thanked: 105 times

Re: Multilple Sound Cards Setup

Post by khz »

EclecticallySound wrote:My question is may I just edit my “/etc/modprobe.d/alsa-base.conf” to make my Scarlett 6i6 USB default, “snd-card-0” with the following:
installed: jack-audio-connection-kit-2.9999

Show your SC:

Code: Select all

cat /proc/asound/cards
I put the default SC in

Code: Select all

/etc/modprobe.d/alsa.conf
(*buntu maybe "/etc/modprobe.d/alsa-base.conf")
example for several SC:

Code: Select all

options snd-emu10k1 index=0
options snd-via82xx index=1
or for 2 SC with the same driver:

Code: Select all

options snd-ymfpci index=0
options snd-hda-intel index=1,2
and everything fine now (boot sequence).
German: https://www.gentoo.org/doc/de/alsa-guide.xml <-- Mehrere Soundkarten (multiple SC)
.en: http://gentoo-en.vfose.ru/wiki/ALSA_Mul ... figuration

To storage alsamixer settings use (as root)

Code: Select all

alsactl store
for each SC.

. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW

  • 𝝞|𝝞|I don't care about the freedom of speech because I have nothing to say. 𝝞|𝝞𝝞|𝝞|𝝞

User avatar
khz
Established Member
Posts: 1679
Joined: Thu Apr 17, 2008 6:29 am
Location: German
Has thanked: 48 times
Been thanked: 105 times

Re: Multilple Sound Cards Setup

Post by khz »

installed: jack-audio-connection-kit-2.9999

1. Show your SC:

Code: Select all

cat /proc/asound/cards
edit

Code: Select all

/etc/modprobe.d/alsa.conf
(*buntu maybe "/etc/modprobe.d/alsa-base.conf")
example for several SC, use the output from "/proc/asound/cards":

- different driver:

Code: Select all

    options snd-emu10k1 index=0
    options snd-via82xx index=1
- or for 2 SC with the same driver:

Code: Select all

    options snd-ymfpci index=0
    options snd-hda-intel index=1,2

2. To storage alsamixer settings use (as root)

Code: Select all

alsactl store
for each SC.


3. Default SC for a program (example Firefox):
edit:

Code: Select all

~/.asoundrc

Code: Select all

    defaults.ctl.card 0
    defaults.pcm.card 0
    defaults.timer.card 0
4. Bring your Soundcards together in qjackctl:
A)
Setup >> Options >> [X] Execute script on Startup

Code: Select all

jack_load -i "-d hw:1 -i16 -o16" 9632 audioadapter && jack_bufsize 128 &
hw: you like to bind (hw:0 / ...)
-i <-- your number of SC inputs
-o <-- your number SC outputs
9632 <-- how do you like to name the jackport
jack_bufsize <-- JACK toolkit client to change the JACK buffer size

B)
For Alsa2jack (MIDI):
install:

Code: Select all

a2jmidid
Setup >> Options >> [X] Execute script after Startup

Code: Select all

sleep 5 && a2jmidid -e &

5. Flash & jack

install

Code: Select all

alsa-plugins
edit

Code: Select all

nano .asoundrc

Code: Select all

# convert alsa API over jack API
# use it with
# % aplay foo.wav

# use this as default
pcm.!default {
    type plug
    slave { pcm "jack" }
}

ctl.mixer0 {
    type hw
    card 1
}

# pcm type jack
pcm.jack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
    }
    capture_ports {
        0 system:capture_1
        1 system:capture_2
    }
}
card 1 <-- if you like the "card 1" (or "card 0" ...).

. . . FZ - Does humor belongs in Music?
. . GNU/LINUX@AUDIO ~ /Wiki $ Howto.Info && GNU/Linux Debian installing >> Linux Audio Workstation LAW

  • 𝝞|𝝞|I don't care about the freedom of speech because I have nothing to say. 𝝞|𝝞𝝞|𝝞|𝝞

Post Reply