View Full Version : swapping sound cards if you have 2 or more

24th March 2017, 01:24 AM
This is a quick how to swap sound cards (by software config) if you have 2 or more sound cards.

It does not include making your usb sound device the default.....that needs more info.

So most of us have with recent PC a hdmi sound detected first and an analog.

For those who use only cables from the coloured holes to surround speakers or external speakers or headphones and never use hdmi sound....read on.

Alsa detects hdmi first so open a terminal and run these commands

alsamixer -c0
alsamixer -c1

top command will show just pulseaudio
middle one the hdmi output device
bottom one your analog device.

alsa counts sound devices from 0 and calls them cards even if you have all onboard sound devices.

2) Most of us also have the same kernel module for both sound devices.

lspci -vvv
and check what the kernel module is for each detected onboard or pci card sound device....most are intel

so we create a config file that can be used by alsa on reboot.

copy and paste the following into a terminal

sudo echo 'options snd_hda_intel index=1' > /etc/modprobe.d/intel.conf

when you are ready do a full reboot to test you have swapped cards.
alsamixer -c0 should now be analog.

3) if you have installed a fancy pci card for sound and if the kernel modules are not the same, I don't have any pci cards myself

lets pretend the computer has
intel hdmi
intel analog
pci card .....hdmi and analog.....but not intel kernel module

then you will need to run more alsamixer -c<number> to find your target output device.
Note the number....eg c3 brings up your fancy card.

then change it to

sudo echo 'options <insert kernel module name> index=1' > /etc/modprobe.d/pci-soundconf

Good luck

24th March 2017, 04:17 AM
If your card is not an intel one, and if above post did not swap your sound device.

Use the info from lspci -vvv to check the actual module name.

then try this with example as showing

modinfo <insert-your-sound-modulename>

what you are looking for .....does module allow index=

modinfo snd-trident
filename: /lib/modules/4.9.14-200.fc25.x86_64/kernel/sound/pci/trident/snd-trident.ko.xz
license: GPL
description: Trident 4D-WaveDX/NX & SiS SI7018
author: Jaroslav Kysela <perex@perex.cz>, <audio@tridentmicro.com>
alias: pci:v00001039d00007018sv*sd*bc*sc*i*
alias: pci:v00001023d00002001sv*sd*bc*sc*i*
alias: pci:v00001023d00002000sv*sd*bc04sc01i*
depends: snd-pcm,snd-util-mem,snd-mpu401-uart,snd,gameport,snd-ac97-codec
intree: Y
vermagic: 4.9.14-200.fc25.x86_64 SMP mod_unload
signat: PKCS#7
sig_hashalgo: md4
parm: index:Index value for Trident 4DWave PCI soundcard. (array of int)
parm: id:ID string for Trident 4DWave PCI soundcard. (array of charp)
parm: enable:Enable Trident 4DWave PCI soundcard. (array of bool)
parm: pcm_channels:Number of hardware channels assigned for PCM. (array of int)
parm: wavetable_size:Maximum memory size in kB for wavetable synth. (array of int)