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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-29-2019, 08:26 PM
|
#1
|
Member
Registered: Mar 2018
Posts: 180
Rep: 
|
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
|
|
|
12-29-2019, 10:47 PM
|
#2
|
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 6,016
|
|
|
|
12-29-2019, 10:53 PM
|
#3
|
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 6,016
|
If you need further help, let us know the hardware (chipset and driver) details. For example...
Code:
lspci -nnk|grep -iA3 audio
|
|
|
12-30-2019, 01:30 AM
|
#4
|
Member
Registered: Mar 2018
Posts: 180
Original Poster
Rep: 
|
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
|
|
|
12-30-2019, 01:31 AM
|
#5
|
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 6,016
|
Glad to have been of guidance. 
|
|
|
01-01-2020, 12:24 AM
|
#6
|
Member
Registered: Mar 2018
Posts: 180
Original Poster
Rep: 
|
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.
|
|
|
01-01-2020, 01:45 AM
|
#7
|
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 6,016
|
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
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.
|
|
|
01-01-2020, 02:39 AM
|
#8
|
Member
Registered: Mar 2018
Posts: 180
Original Poster
Rep: 
|
[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
...
|
|
|
01-01-2020, 02:51 AM
|
#9
|
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 6,016
|
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.
|
|
|
01-01-2020, 03:50 AM
|
#10
|
Member
Registered: Mar 2018
Posts: 180
Original Poster
Rep: 
|
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.
|
|
|
01-01-2020, 04:05 AM
|
#11
|
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 6,016
|
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.
|
|
|
01-03-2020, 12:06 PM
|
#12
|
Member
Registered: Mar 2018
Posts: 180
Original Poster
Rep: 
|
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
|
|
|
01-04-2020, 05:57 PM
|
#13
|
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 6,016
|
Now that the sound card order is explicitly configured, there should be no reason for any problems occurring.
|
|
|
01-04-2020, 07:09 PM
|
#14
|
Member
Registered: Mar 2018
Posts: 180
Original Poster
Rep: 
|
Quote:
Originally Posted by ferrari
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.
|
|
|
01-04-2020, 07:20 PM
|
#15
|
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 6,016
|
Exactly. 
|
|
|
All times are GMT -5. The time now is 07:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|