Bug 809519

Summary: Swap HDMI and SB audio on Asus EeePC 1215b [solved]
Product: [openSUSE] openSUSE Tumbleweed Reporter: Bernd Paysan <bernd.paysan>
Component: YaST2Assignee: Ladislav Slezák <lslezak>
Status: RESOLVED WONTFIX QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P3 - Medium CC: ancor, asarai, hvogel, jcheung, lslezak, mfilka, ncutler, os.gnome.maintainers, tiwai
Version: Current   
Target Milestone: Current   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Bernd Paysan 2013-03-15 02:27:14 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.32 (KHTML, like Gecko) Chrome/27.0.1425.0 Safari/537.32 SUSE/27.0.1425.0

The Asus EeePC has two sound drivers, one for HDMI, the other for analog (SB).  Both use the snd_hda_intel.  By default, Linux assigns the HDMI as card 0 and the SB as card 1:

root@xxxx:~# cat /proc/asound/cards
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfeb44000 irq 44
 1 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xfeb40000 irq 16
root@xxxx:~# aplay -l
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: Generic [HD-Audio Generic], Gerät 3: HDMI 0 [HDMI 0]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: SB [HDA ATI SB], Gerät 0: ALC269VB Analog [ALC269VB Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

This doesn't work very well, too many programs simply assume that the default Alsa device is card 0 device 0 (mplayer, Adobe flash, etc.).  The order you setup the two devices in Yast doesn't matter, and since it's the same driver for both, it doesn't even help if you configure only one of the two - both of them will be found and active.  I've googled for the problem, it happens on all Linux systems, and nobody in the top 10 Google results was intelligent enough to find a solution.  So I had to find one myself (which is pretty frustrating if Google doesn't help):

Add the following option to /etc/modprobe.d/50-alsa.conf:

options snd-hda-intel index=1,0

This swaps both cards.  The resulting aplay -l gives:
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: SB [HDA ATI SB], Gerät 0: ALC269VB Analog [ALC269VB Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: Generic [HD-Audio Generic], Gerät 3: HDMI 0 [HDMI 0]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

This then works out of the box, the HDMI sound isn't the most important feature of a laptop, which usually is not plugged into a TV.

Suggestion: Yast should add this line if the user configures two devices which use the same driver in the reverse order as they appeared during the hardware detection.  Yast also should add this by default for AMD's netbook APUs, which all have the same chipset.

Reproducible: Always

Steps to Reproduce:
1. Get a device like the Asus EeePC 1215b, which has two different soundcards with the same driver
2. Try to use Yast to set the order in which these cards are mapped
3. Watch it being uneffective



As I found a workaround, I should probably severity to "minor".  However, it is frustrating to search for this.  This additional configuration line should quite likely be default on E-350/E-450 APUs from AMD, which all share that problem, and Yast's approach to add an option line like this:

options snd slots=snd-hda-intel,snd-hda-intel
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel

is stupid and for obvious reasons doesn't (and can't) work.  So this is really a bug, and it should be fixed.
Comment 1 Ladislav Slezák 2013-04-16 08:58:21 UTC
Oh, thanks for finding the solution for this ("options snd-hda-intel index=1,0")!

Yast does not handle the situation correctly when the cards share the same driver.
Comment 2 Aleksa Sarai 2016-06-22 00:03:39 UTC
*** Bug 985392 has been marked as a duplicate of this bug. ***
Comment 3 Hendrik Vogelsang 2016-09-27 08:15:26 UTC
BTW it's not only Yast which can't handle this situation. Somehow the latest Tumbleweed update changed the order in which the interfaces on my Laptop (Lenovo x250) where initialized. I found this report and after changing the index I ran into the situation that GNOME was stuck on the old interface for output and for the life of me I did not find anything in the GNOME settings to change this.
Comment 4 Nathan Cutler 2017-08-15 23:26:23 UTC
Moving to Tumbleweed and setting needinfo on assignee for an update.
Comment 5 Ladislav Slezák 2017-09-07 06:45:44 UTC
Sorry, no time for this yet, but I'd like to fix it eventually...
Comment 6 Ancor Gonzalez Sosa 2019-12-19 11:45:55 UTC
Lada, does this bug report still make sense after that much time open?
Comment 7 Ladislav Slezák 2020-01-08 13:01:55 UTC
Um, I believe that with the current sound stack with the PulseAudio layer it is not needed anymore. And it happens only on some specific hardware.

Moreover I'd like to actually drop the sound module in the future as it does not provide any value for most users. (The autoconfiguration works fine with the modern cards.)


So let's close it as WONTFIX...