Bug 207139

Summary: snd_hda_intel access overflow
Product: Drivers Reporter: Matthew (wsdmatty)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: normal CC: anon.amish, holo-doc, tiwai
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 5.6.2 Subsystem:
Regression: No Bisected commit-id:
Attachments: Fix for HD-audio beep error
Fix for ice1724 ctl error

Description Matthew 2020-04-06 15:41:27 UTC
Running Arch Linux distro, upgraded kernel to testing release linux-5.6.2-arch2-1. After rebooting, there was no sound. I checked the system journal and it showed these errors:

pulseaudio[904]: W: [pulseaudio] alsa-util.c: Unable to load mixer: Invalid argument
kernel: snd_hda_intel 0000:00:1b.0: control 2:0:0:Beep Playback Switch:0: access overflow

Downgrading kernel to 5.5.13 resolved the issue and I once again was able to play sound.

Audio device is:

00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
        Subsystem: Dell 6 Series/C200 Series Chipset Family High Definition Audio Controller
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

If any more information is required I am happy to provide it, I'm just not sure what is relevant and what isn't at this point.
Comment 1 holo-doc 2020-04-06 17:39:59 UTC
Hi

On Manjaro I have the same problem with kernel 5.6.1 and 5.6.2 (5.6.0 worked fine).
My soundcard uses the snd_ice1724 driver and during boot I get this error message:

kernel: snd_ice1724 0000:04:00.0: control 2:0:0:Analog Capture Source:0: access overflow

Alsamixer can no longer open this soundcard. I still get sound but I have to raise the volume much higher in Pulseaudio (as it probably can not raise the hardware volume).
Comment 2 Jaroslav Kysela 2020-04-06 17:54:23 UTC
You can disable the control element check - CONFIG_SND_CTL_VALIDATION kernel configuration.

Takashi? Driver issues? But I don't see any problem in ice1724 / prodigy_hifi.c - 
wm_adc_mux_* functions.
Comment 3 holo-doc 2020-04-06 18:48:29 UTC
Recompiled the Manjaro 5.6.2 kernel with CONFIG_SND_CTL_VALIDATION=n and everything is working again as expected.
Comment 4 Takashi Iwai 2020-04-07 08:39:47 UTC
(In reply to Matthew from comment #0)
> Running Arch Linux distro, upgraded kernel to testing release
> linux-5.6.2-arch2-1. After rebooting, there was no sound. I checked the
> system journal and it showed these errors:
> 
> pulseaudio[904]: W: [pulseaudio] alsa-util.c: Unable to load mixer: Invalid
> argument
> kernel: snd_hda_intel 0000:00:1b.0: control 2:0:0:Beep Playback Switch:0:

This one is indeed a bug but rather harmless one.  The fix patch is below.
Comment 5 Takashi Iwai 2020-04-07 08:40:27 UTC
Created attachment 288239 [details]
Fix for HD-audio beep error
Comment 6 Takashi Iwai 2020-04-07 08:41:07 UTC
(In reply to holo-doc from comment #1)
> kernel: snd_ice1724 0000:04:00.0: control 2:0:0:Analog Capture Source:0:
> access overflow

... and this one is a real bug.  The driver accesses to a wrong type.
The fix patch is below.
Comment 7 Takashi Iwai 2020-04-07 08:41:42 UTC
Created attachment 288241 [details]
Fix for ice1724 ctl error
Comment 8 Matthew 2020-04-07 09:15:42 UTC
(In reply to Takashi Iwai from comment #4)
> (In reply to Matthew from comment #0)
> This one is indeed a bug but rather harmless one.  The fix patch is below.

The beep error wasn't the bug. I had no sound at all. That's simply the only error message the kernel gave me.
Comment 9 Takashi Iwai 2020-04-07 09:28:55 UTC
I meant the access pattern in HD-audio wasn't a real bug but it's treated as if a real error by the validator.

In anyway, please try the patch.
Comment 10 AMM 2020-04-07 10:27:41 UTC
I use Arch too and I also have no sound.

I also get the error in dmesg:
[ 1545.634891] snd_hda_intel 0000:00:1b.0: control 2:0:0:Beep Playback Switch:0: access overflow

Is there a workaround because I have no idea how to apply the patch and also dont have resources to do that. (very slow system)
Comment 11 Takashi Iwai 2020-04-07 10:52:09 UTC
At best ask your distributor to provide a patched test kernel.
Comment 12 Matthew 2020-04-07 12:13:27 UTC
(In reply to Takashi Iwai from comment #5)
> Created attachment 288239 [details]
> Fix for HD-audio beep error

Kernel compiled and this patch appears to solve the no sound issue.
Thank you kindly!
Comment 13 Takashi Iwai 2020-04-07 13:11:06 UTC
Thanks for confirmation!
The patches have been merged to sound git tree, and will be included in the next pull request to Linus for 5.7-rc1, then they'll be backported to stable branches.
Comment 14 Matthew 2020-04-07 13:16:16 UTC
(In reply to Takashi Iwai from comment #13)
> Thanks for confirmation!
> The patches have been merged to sound git tree, and will be included in the
> next pull request to Linus for 5.7-rc1, then they'll be backported to stable
> branches.

To be clear, I did not test the ice1724 patch, only the hd-audio patch. I cannot confirm whether the other patch functions as expected as I do not use that sound card.
Comment 15 holo-doc 2020-04-08 18:09:12 UTC
I applied both patches to Manjaros 5.6.3 kernel and my ESI Prodigy 7.1 HiFi card is working again.
The CONFIG_SND_CTL_VALIDATION variable is now unconfigured in Manjaros default kernel, so i will recompile the kernel again with this variable set to yes to see if everything will still work.
Comment 16 holo-doc 2020-04-08 19:01:31 UTC
OK - Everything is still working with CONFIG_SND_CTL_VALIDATION=y
Thanks @Takashi for the quick fix.