Bug 211743 - alsa-utils crash with Dual ALC1220 Codec using MSI Godlike X570 Motherboard
Summary: alsa-utils crash with Dual ALC1220 Codec using MSI Godlike X570 Motherboard
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-14 20:59 UTC by Aeonik
Modified: 2021-03-03 14:26 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.10.15
Tree: Mainline
Regression: No


Attachments
alsa-info output (83.40 KB, text/plain)
2021-02-14 20:59 UTC, Aeonik
Details
Fix patch (1.34 KB, patch)
2021-03-03 14:25 UTC, Takashi Iwai
Details | Diff

Description Aeonik 2021-02-14 20:59:18 UTC
Created attachment 295269 [details]
alsa-info output

###Overview
I am running Arch Linux Kernel version 5.10.15 on an MSI Godlike X570 motherboard, and I believe Alsa is having issues with the Dual ALC1220 Codecs. I saw that this has been an issue before in the and looks solved, but for some reason, my Alsa utilities are crashing when trying to access my sound card (using Alsamixer and amixer).

I think this might be related to [Bug ID 195305](https://bugzilla.kernel.org/show\_bug.cgi?id=195305).

###Steps to reproduce
amixer -c 0
ALSA lib simple_none.c:1544:(simple_add1) helem (MIXER,'Master Playback Switch',0,1,0) appears twice or more
cannot load mixer controls: Invalid argument

###Expected Result
amixer should print data about my sound card.

###Actual Result
amixer crashes with the following error messages.
ALSA lib simple_none.c:1544:(simple_add1) helem (MIXER,'Master Playback Switch',0,1,0) appears twice or more
cannot load mixer controls: Invalid argument

###Build Date & Hardware:
Linux aeonik 5.10.15-arch1-1 #1 SMP PREEMPT Wed, 10 Feb 2021 18:32:40 +0000 x86_64 GNU/Linux
MSI Godlike X570 Motherboard
AMD 3900XT Processor

###Additional Information:
[Bug ID 195305](https://bugzilla.kernel.org/show_bug.cgi?id=195305) says this has been fixed, but this motherboard is apparently having the exact same issue.

I have tried solving the issue in a variety of ways, including explicitly setting the kernel module snd-hda_intel model name. I also experience the same bug in a fresh Arch Linux ISO, which rules out most configuration issues, I think.

I reviewed your documentation, and it looks like my next step is to file a bug report. I already reached out to the Arch Linux community, and you can review my post at the following link. I have also attached the output of alsa-info.sh to this post.

https://bbs.archlinux.org/viewtopic.php?pid=1949255#p1949255

Let me know if you need anything else from me, I appreciate all your work, and look forward to your response!

Aeonik
Comment 1 Takashi Iwai 2021-02-15 08:04:21 UTC
Could you try to pass the model=,dual-codecs to snd-hda-intel module (note the first comma that means an empty value for the first slot that is for Nvidia HD-audio)?

If this works, we can cook up a patch to enable the quirk easily.
Comment 2 Aeonik 2021-02-15 16:12:06 UTC
The fix worked! Thanks so much Takashi! 

I am curious what the root cause was.
Comment 3 Takashi Iwai 2021-03-03 14:25:25 UTC
There is a special setup for the boards with the dual codecs, and it's applied only for the known PCI SSID, where your device wasn't listed there.

Now I submitted and merged the fix to upstream.
Comment 4 Takashi Iwai 2021-03-03 14:25:50 UTC
Created attachment 295601 [details]
Fix patch
Comment 5 Takashi Iwai 2021-03-03 14:26:19 UTC
The fix will be included hopefully in 5.12-rc2 kernel and backported to stable trees later on.

Note You need to log in before you can comment on or make changes to this bug.