Default Sound Card = Random

Problems and successes with specific brands/models of computer audio hardware
Post Reply
Message
Author
User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

Default Sound Card = Random

#1 Post by OscarTalks »

I posted this in the "Bugs" section because I encountered it testing the beta of Racy 5.2.2.9 but it may not be a bug as such and it is possible that this may be a more appropriate section of the forum in which to ask about this. I hope I can be forgiven for copying it here as well.

I like to run 2 sound cards in my computers so I can route audio from different applications to different places.

So I have "Soundcard A" (which is integrated on the motherboard) and "Soundcard B" (which is a PCI card).

My problem is that the process of establishing the default soundcard appears to be random.

At first I thought that the Multiple Sound Card Wizard just wasn't working, but I see that there is a file at /etc/asound.conf which appears to define the default soundcard.

But it only specifies a card and device NUMBER eg:

defaults.pcm.card 1
defaults.pcm.device 0

Am I looking at the correct file for this?
Note that the cards are not named.

The big problem arises from the fact that at each boot-up the process of allocating the card numbers seems totally random. Sometimes Soundcard A will be given the number 0 and Soundcard B will be given the number 1 and on another boot-up they can be allocated the other way round.

Would it be possible to have the file set the default card by specifying it by name?

Alternatively (and probably the ideal solution), is there a way to ensure that the allocation of number to name remains the same at every boot-up?

UPDATE - Think I may have solved it. Running the ALSA Wizard (despite my reluctance because of the scary dialog that pops up) seems to have enabled me to lock down the allocation of "Card 0" to the integrated soundcard on the motherboard.

I see that lines have been added to the file /etc/modprobe.d/alsa.conf thus:-

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.21 ---
alias snd-card-0 snd-intel8x0
alias sound-slot-0 snd-intel8x0
# --- END: Generated by ALSACONF, do not edit. ---

The other soundcard does disappear from the options displayed in Multiple Sound Card Wizard when you do this, so I was worried that I may have lost my internal connection to it, but on re-boot they were both there again and on a couple of re-boots the order was staying the same.
I then had to use Multiple Sound Card Wizard (again) to change the default back from "Card 1" to "Card 0". This creates a new file at /etc/asound.conf leaving the previous one there with the suffix "old".

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#2 Post by darkcity »

altering the alsa-base.conf file worked for me - using index to control the order modules load...
Added code to/etc/modprobe.d/alsa-base.conf

Code: Select all

#choose order of sound modules
options snd-ca0106 index=0
options snd-intel8x0 index=1
:arrow:
http://murga-linux.com/puppy/viewtopic. ... 932#606932

Post Reply