LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-29-2019, 08:26 PM   #1
gregors
Member
 
Registered: Mar 2018
Posts: 177

Rep: Reputation: Disabled
Order of sound cards changes


Hi there!

My audio amplifier can act as an external sound card. But almost after every second (not just "sometimes") reboot it's not the first but second audio device - so I can't listen to my music or watch tv.

Since I tried a whole bunch of things with /etc/modprobe.d/alsa-base.conf I don't think that this is the right place to fix this.

Some years ago I found some kind of "the last, ultimative solution" which consists of entering the order of sound cards in a special file - the problem is I can't find that page again.

If you know what I'm talking about and know the solution ... I hate rebooting.

TIA

Gregor
 
Old 12-29-2019, 10:47 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
See if the advice in this thread helps...
https://www.linuxquestions.org/quest...sa-4175544059/
 
Old 12-29-2019, 10:53 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
If you need further help, let us know the hardware (chipset and driver) details. For example...
Code:
lspci -nnk|grep -iA3 audio
 
Old 12-30-2019, 01:30 AM   #4
gregors
Member
 
Registered: Mar 2018
Posts: 177

Original Poster
Rep: Reputation: Disabled
Thanks!

After adding

Code:
options snd-usb-audio id=PCM2701 index=0
options snd_emu10k1 id=live index=1
to /etc/modprobe.d/alsa-base.conf and rebooting everything works fine. I hope this time it stays that way.

Gregor
 
Old 12-30-2019, 01:31 AM   #5
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Glad to have been of guidance.
 
Old 01-01-2020, 12:24 AM   #6
gregors
Member
 
Registered: Mar 2018
Posts: 177

Original Poster
Rep: Reputation: Disabled
Unfortunately the order of soundcards in my configuration still changes from time to time. I still cannot turn on my PC and go to fetch some coffee - I have to stay and watch boot messages.

Here's my /etc/modprobe.d/alsa-base.conf:

Code:
# Added GS 26.12.19
#blacklist snd_hda_intel
#blacklist snd_ac97_codec
# Geaendert 3.12.19 GS, id hinzu am 30.12.19
options snd-usb-audio id=PCM2701 index=0
options snd_emu10k1 id=live index=1
# Added GS 26.12.19
#install snd-usb-audio
# 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 && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; : ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
Well, it seems Linux' best days are definitely over. I can't trust it to end up in the same state after turning on my computer anymore.

So ... what would you suggest to try now?

TIA

Gregor

PS: Output of 'lspci -nnk|grep -iA3 audio':

Code:
04:00.0 Multimedia audio controller [0401]: Creative Labs SB Live! EMU10k1 [1102:0002] (rev 07)
        Subsystem: Creative Labs SBLive! Player 5.1 [1102:8061]
        Kernel driver in use: snd_emu10k1
04:00.1 Input device controller [0980]: Creative Labs SB Live! Game Port [1102:7002] (rev 07)
--
05:00.1 Audio device [0403]: NVIDIA Corporation High Definition Audio Controller [10de:0be3] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device [1043:8490]
        Kernel driver in use: snd_hda_intel

Last edited by gregors; 01-01-2020 at 12:57 AM.
 
Old 01-01-2020, 01:45 AM   #7
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Your manually configured audio drivers are
Code:
options snd-usb-audio id=PCM2701 index=0
options snd_emu10k1 id=live index=1
but your lspci output shows hardware using the 'snd_emu10k1' and 'snd_hda_intel' drivers. If you have USB audio hardware in the mix, you can get the chipset and driver details using
Code:
usb-devices
So best to provide the complete picture for further advice here.

BTW, an alternative way to configure sound card order manually involves using the 'pid=' and 'vid=' (vendor and product ID) options. For example...
Code:
options snd_emu10k1 index=1 vid=1102 pid=0002
options snd_hda_intel index=0 vid=10de pid=0be3

Last edited by ferrari; 01-01-2020 at 01:52 AM.
 
Old 01-01-2020, 02:39 AM   #8
gregors
Member
 
Registered: Mar 2018
Posts: 177

Original Poster
Rep: Reputation: Disabled
[Please ignore this posting. Just want to save what I wrote before rebooting. Is there a way to save a posting as draft?]

Oh my ...

Sorry if I mix things up and I caused unnecessary work.

So, here's what I have right now:

/etc/modprobe.d/alsa-base.conf
Code:
# Geaendert 1.1.20
options snd-usb-audio id=PCM2701 index=0 vid=08bb pid=2702
options snd_emu10k1 id=live index=1
#options snd_hda_intel id=? index=2 <------ what do I have to enter for id=?

# 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 && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; : ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
'lspci -nnk | grep -iA3 audio' returns:
Code:
04:00.0 Multimedia audio controller [0401]: Creative Labs SB Live! EMU10k1 [1102:0002] (rev 07)
        Subsystem: Creative Labs SBLive! Player 5.1 [1102:8061]
        Kernel driver in use: snd_emu10k1
04:00.1 Input device controller [0980]: Creative Labs SB Live! Game Port [1102:7002] (rev 07)
--
05:00.1 Audio device [0403]: NVIDIA Corporation High Definition Audio Controller [10de:0be3] (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device [1043:8490]
        Kernel driver in use: snd_hda_intel
And 'usb-devices' results in (among other USB devices like keyboard and mouse):
Code:
...
T:  Bus=04 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=08bb ProdID=2702 Rev=01.00
S:  Manufacturer=Burr-Brown Japan
S:  Product=Burr-Brown Japan PCM2702
C:  #Ifs= 2 Cfg#= 1 Atr=40 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:  If#= 1 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
...
 
Old 01-01-2020, 02:51 AM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
I recommend you try something like the following
Code:
options snd-usb-audio id=PCM2701 index=0 vid=08bb pid=2702
options snd_emu10k1 index=1 vid=1102 pid=0002
options snd_hda_intel index=2 vid=10de pid=0be3
Quote:
what do I have to enter for id=?
I assume that can be got via
Code:
cat /proc/asound/card*/id
but probably just easier to use the vendor ID and product ID matching instead.
 
Old 01-01-2020, 03:50 AM   #10
gregors
Member
 
Registered: Mar 2018
Posts: 177

Original Poster
Rep: Reputation: Disabled
Your suggested options resulted in some "invalid value for parameter ...". And I remembered that I had to convert hex values to decimals when using such pid and vid values with qemu.

And it seems like vid and pid parameters are invalid for non-usb sound cards.

Well, now /etc/modprobe.d/alsa-base.conf reads:
Code:
# Geaendert 1.1.20
options snd-usb-audio id=PCM2701 index=0 vid=2235 pid=9986
options snd_emu10k1 id=live index=1
options snd_hda_intel id=NVidia index=2

#options snd-usb-audio id=PCM2701 index=0 #vid=08bb pid=2702
#options snd_emu10k1 id=live index=1 #vid=1102 pid=0002
#options snd_hda_intel id=NVidia index=2 #vid=10de pid=0be3

# 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 && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; : ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
and that seems to work.

Thanks again! Well, for now ... :-)

Gregor

Oh, BTW: Happy new year to all of you!

Last edited by gregors; 01-01-2020 at 03:53 AM.
 
Old 01-01-2020, 04:05 AM   #11
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Quote:
And it seems like vid and pid parameters are invalid for non-usb sound cards.
Now that I've checked further both 'modinfo snd-hda-intel' and 'modinfo snd-emu10k1' indeed don't appear to have the pid and vid options. My bad. Anyway, it looks like you've made progress here. The main thing is setting the explicit order of all audio devices that may be present.
 
Old 01-03-2020, 12:06 PM   #12
gregors
Member
 
Registered: Mar 2018
Posts: 177

Original Poster
Rep: Reputation: Disabled
Since there were no problems for the last 15-20 reboots I mark this thread as solved.

I hope I won't have to take this back :-)

Gregor
 
Old 01-04-2020, 05:57 PM   #13
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Now that the sound card order is explicitly configured, there should be no reason for any problems occurring.
 
Old 01-04-2020, 07:09 PM   #14
gregors
Member
 
Registered: Mar 2018
Posts: 177

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
Now that the sound card order is explicitly configured, there should be no reason for any problems occurring.
Well, not *these* kind of problems, <german>gell</german> :-)))

Gregor

Last edited by gregors; 01-04-2020 at 07:26 PM.
 
Old 01-04-2020, 07:20 PM   #15
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,803

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Exactly.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Logi Sales Manager on Ncurses (invoice, invoicing, orders, order, sale order, sales order...)? Xeratul Linux - Software 0 03-25-2017 02:45 PM
How do I change the order of sound cards? lucmove Linux - Hardware 15 03-03-2017 07:59 AM
LXer: Technology Changes Us, Changes Society, and Changes Governments LXer Syndicated Linux News 0 10-10-2016 02:00 PM
Sound Cards loading in Different order on bootup... digitolx Red Hat 5 11-14-2009 09:02 AM
Ethernet Cards and Sound Cards SchizoIV Linux - Newbie 2 07-05-2002 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration