LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-30-2015, 09:00 PM   #1
Invarianz
Member
 
Registered: May 2015
Location: Germany
Distribution: Slackware_64-14.1 on an MSI GP60 2PE
Posts: 30

Rep: Reputation: Disabled
Wrong sound card order in alsa


Hello there!

I have a Problem regarding the order of soundcards in my slackware setup. I tried different solutions provided by alsa.opensrc.org or the arch linux wiki entry for alsa.
This problem is related to me having two sound cards one for the HDMI sound output and one for the speakers or the headphones my two soundcards are:
Code:
00:03.0 Audio device [0403]: Intel Corporation Haswell HD Audio Controller [8086:0c0c] (rev 06)
00:1b.0 Audio device [0403]: Intel Corporation Lynx Point High Definition Audio Controller [8086:8c20] (rev 05)
Whereas the Haswell HD Audio Controller is specified as card 0 and the Lynx Point Audio Controller as card 1.
The general suggestion for this kind of problem was to change the order of the sound card indices or to reorder them. This is done with the help of the /etc/modprobe.d/alsa-base.conf file. I have tried the following two approaches:
Code:
alias char-major-116 snd
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel
options snd-hda-intel index=0 vid=8086 pid=8c20
options snd-hda-intel index=1 vid=8086 pid=0c0c
The values for vid/pid are obtained from the lspci -nn | grep Audio output defined on top.
The second configuration i have tried was the reordering of cards
Code:
alias char-major-116 snd
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel
options snd-hda-intel index=0,1 vid=8086,8086 pid=8c20,0c0c
Both approaches lead to the same error: If those are written into the configuration file alsa-base.conf after reboot no sound card is recognized anymore and i can't hear anything.
My goal would be to have the Lynx Point Audio Controller as primary card.
Did anyone have the same problem and does maybe know of an error in my configuration file?
I hope there is someone out there that is able to help me!

regards
 
Old 05-30-2015, 10:17 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,961

Rep: Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167
I've read of that approach being used successfully before, but in your case it is likely down to the driver version in use.

The supported parameters can be obtained from
Code:
modinfo -p snd-hda-intel
I can tell you that I'm using a version that does not support pid/vid options.Anyway, another similar approach might work here provided that the two HDA cards have different ID's.

Check with
Code:
cat /proc/asound/card0/id
Code:
cat /proc/asound/card1/id
or
Code:
aplay -l
For example, if one is reported as 'Intel' and the other as 'HDMI', then ordering can be configured using
Code:
options snd-hda-intel id=Intel index=0
options snd-hda-intel id=HDMI index=1
or perhaps as a single line with
Code:
options snd-hda-intel id=Intel,HDMI index=0,1
 
1 members found this post helpful.
Old 05-30-2015, 10:20 PM   #3
dolphin_oracle
MX Linux
 
Registered: Dec 2013
Posts: 402

Rep: Reputation: Disabled
on my MX machine and a chromebook, I used this setup to solve the same problem you are having.

Code:
root@mx1:/etc/modprobe.d# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
and the alsa-base.conf file to go with it.

Code:
root@mx1:/etc/modprobe.d# nano alsa-base.conf 

options snd_hda_intel id=PCH index=0
options snd_hda_intel id=HDMI index=1
and the new aplay -l with the new order (PCH is now 0). restarting alsa or just rebooting is required for the new order to kick in.

Code:
root@mx1:/etc/modprobe.d# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
I hope that helps.
 
1 members found this post helpful.
Old 05-30-2015, 10:54 PM   #4
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,961

Rep: Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167
Yes, so you're using the 'id=' option that the snd-hda-intel driver provides. It is what I am suggesting to the OP too. The 'pid=' and 'vid=' option is newer, so older driver builds won't necessarily support it.
 
Old 05-31-2015, 01:34 AM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,525

Rep: Reputation: 2812Reputation: 2812Reputation: 2812Reputation: 2812Reputation: 2812Reputation: 2812Reputation: 2812Reputation: 2812Reputation: 2812Reputation: 2812Reputation: 2812
Quote:
I have a Problem regarding the order of soundcards in my slackware setup. I tried different solutions provided by alsa.opensrc.org or the arch linux wiki entry for alsa.
The advice at SlackDocs is to use the output from 'aplay -l' to set the 'id=' option http://docs.slackware.com/howtos:har..._snd-hda-intel
 
Old 05-31-2015, 08:17 AM   #6
Invarianz
Member
 
Registered: May 2015
Location: Germany
Distribution: Slackware_64-14.1 on an MSI GP60 2PE
Posts: 30

Original Poster
Rep: Reputation: Disabled
Thanks for the fast and effective responses! Ordering the cards using the 'id=' parameter does indeed help. I want to add that using the statement in one line as suggested does not work. This strangely just renames the card ids.
Quote:
Originally Posted by ferrari View Post
or perhaps as a single line with
Code:
options snd-hda-intel id=Intel,HDMI index=0,1
@allend
I have read the linked entry at http://docs.slackware.com/howtos:har..._snd-hda-intel and it also supplies the right solution (actually i have read through it before using the information from arch wiki and alsa.opensrc.org). I guess at this time i was a bit tired and did not see the Generic and Generic_1 words in the provided aplay -l output so i was unsure on how to obtain the card id. Now it is clear!

To sum it up the sound works now and i will only use vid and pid again with newer alsa versions. Have a nice weekend!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
sound card order on lenovo x120e, HDMI vs sound card npdawson Slackware 15 05-15-2011 07:46 PM
USB sound card not detected by ALSA but is by lsusb, using alsa 1.0.15 mjkelly93 Linux - Hardware 1 10-20-2007 11:23 AM
How to manage order of sound devices in alsa? funkynesh Slackware 3 02-24-2007 10:46 AM
Multiple sound devices -- configured in the wrong order kwr2k Linux - Hardware 2 08-18-2006 03:51 AM
ALSA Problem: 2 soundcards, wrong order PrivatePanic Linux - Hardware 4 09-04-2003 02:15 PM

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

All times are GMT -5. The time now is 09:40 PM.

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