Bug 101501 - Realtek ALC892 codec keeps crashing under kernel 4.1.0
Summary: Realtek ALC892 codec keeps crashing under kernel 4.1.0
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: i386 Linux
: P1 high
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-14 14:39 UTC by Artem S. Tashkinov
Modified: 2018-11-12 22:25 UTC (History)
3 users (show)

See Also:
Kernel Version: 4.1.0
Tree: Mainline
Regression: Yes


Attachments
/proc/asound/card0/codec#0 (16.02 KB, text/plain)
2015-07-14 14:39 UTC, Artem S. Tashkinov
Details
alsa-info.txt (55.18 KB, text/plain)
2015-07-14 15:35 UTC, Artem S. Tashkinov
Details

Description Artem S. Tashkinov 2015-07-14 14:39:22 UTC
Created attachment 182601 [details]
/proc/asound/card0/codec#0

Under Linux 3.9 and earlier I never had this problem, it only appeared under Linux 4.1.0 (I skipped 4.0 altogether).

It manifests itself when my audio players start producing some garbage instead of audio. Restarting a playing helps.

When audio output (analogue) goes wrong, I get these messages in dmesg:

[ 3545.880378] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 12
[ 5738.529098] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 11
[15338.360331] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 12
[46127.388296] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 14
[46200.203063] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 13
[85227.801675] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 11

My initial dmesg output:

[    6.156771] snd_hda_intel 0000:00:1b.0: azx_get_response timeout, switching to polling mode: last cmd=0x300f0000
[    7.159161] snd_hda_intel 0000:00:1b.0: No response from codec, disabling MSI: last cmd=0x300f0000
[    8.164874] snd_hda_intel 0000:00:1b.0: Codec #3 probe error; disabling it...
[    8.196648] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC892: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
[    8.196653] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    8.196657] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    8.196659] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    8.196661] snd_hda_codec_realtek hdaudioC0D0:    dig-out=0x11/0x1e
[    8.196663] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    8.196667] snd_hda_codec_realtek hdaudioC0D0:      Front Mic=0x19
[    8.196670] snd_hda_codec_realtek hdaudioC0D0:      Rear Mic=0x18
[    8.196672] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1a
[   10.466014] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 7
Comment 1 Artem S. Tashkinov 2015-07-14 14:43:06 UTC
It's weird to see HDMI type errors/warnings because my speakers are connected via an analogue port (I have six analogue input/outputs).

My LCD monitor (which is capable of producing audio) is connected to the NVIDIA GPU that I have installed but that's a different sound card (the second here).
Comment 2 Takashi Iwai 2015-07-14 15:18:59 UTC
It's hard to tell what went wrong.  The code change in 4.1 is pretty large, but most of changes are rather restructuring.  The best would be to identify the regression point via git bisect.

The boot time message already looks strange, though:
[    6.156771] snd_hda_intel 0000:00:1b.0: azx_get_response timeout, switching to polling mode: last cmd=0x300f0000
[    7.159161] snd_hda_intel 0000:00:1b.0: No response from codec, disabling MSI: last cmd=0x300f0000
[    8.164874] snd_hda_intel 0000:00:1b.0: Codec #3 probe error; disabling it...

The PCI entry 00:1b.0 is the onboard chipset, right?  It has already spurious connection, maybe BIOS wrongly declared.  You should pass probe_mask option to snd-hda-intel for either first or second slot.

And, if you don't need HDMI audio, you can disable it via enable option to snd-hda-intel module.  If the first second entry is HDMI, pass like enable=1,0.

In anyway, please give alsa-info.sh output for checking more details.
Comment 3 Artem S. Tashkinov 2015-07-14 15:35:39 UTC
Created attachment 182631 [details]
alsa-info.txt

> The PCI entry 00:1b.0 is the onboard chipset, right?

Yes.

> You should pass probe_mask option to snd-hda-intel for either first or second
> slot.

What exactly should I pass?

> And, if you don't need HDMI audio, you can disable it via enable option to
> snd-hda-intel module.

I'm wondering how it can possibly work here. My motherboard (Asus P8P67 Pro, http://www.asus.com/Motherboards/P8P67_PRO/specifications/ ), which is based the P67 chipset, doesn't have any HDMI outputs at all.
Comment 4 Artem S. Tashkinov 2015-07-14 15:39:19 UTC
Bisecting is not an option since this glitch occurs randomly, once per several hours. It will most likely take several months before I find the bad commit.
Comment 5 Takashi Iwai 2015-07-14 15:41:56 UTC
(In reply to Artem S. Tashkinov from comment #3)
> Created attachment 182631 [details]
> alsa-info.txt
> 
> > The PCI entry 00:1b.0 is the onboard chipset, right?
> 
> Yes.
> 
> > You should pass probe_mask option to snd-hda-intel for either first or
> second slot.
> 
> What exactly should I pass?

probe_mask=0x01

> > And, if you don't need HDMI audio, you can disable it via enable option to
> snd-hda-intel module.
> 
> I'm wondering how it can possibly work here. My motherboard (Asus P8P67 Pro,
> http://www.asus.com/Motherboards/P8P67_PRO/specifications/ ), which is based
> the P67 chipset, doesn't have any HDMI outputs at all.

The chipset can have a HDMI output.  The HDMI over Intel onboard graphics would be connected to the same controller chip as Realtek codec.  Although the onboard graphics is by BIOS with the use of Nvidia board, the BIOS setup might be wrong (as you see in the boot log) and still something might be interfered.

So in short, try to pass like
   options snd-hda-intel probe_mask=0x01 enable=1,0
Comment 6 Takashi Iwai 2015-07-14 15:42:53 UTC
(In reply to Artem S. Tashkinov from comment #4)
> Bisecting is not an option since this glitch occurs randomly, once per
> several hours. It will most likely take several months before I find the bad
> commit.

Very same for developers, too :)  It'd cost so much to diagnose this kind of problem remotely without the actual hardware...
Comment 8 Raymond 2015-07-15 02:46:02 UTC
Seem bug in modprobe options

id of two cards are IntelHDA



Modprobe options (Sound related)
!!--------------------------------

snd-hda-intel: id="RadeonHD6800" power_save=1 enable_msi=1
snd-hda-intel: id="IntelHDA" power_save=0 enable_msi=1 power_save_controller=0
snd-usb-audio: id="LogitechUSB"


!!Loaded sound module options
!!--------------------------

!!Module: snd_hda_intel
	align_buffer_size : -1
	bdl_pos_adj : 1,32,-1,-1,-1,-1,-1,-1
	beep_mode : Y,Y,Y,Y,Y,Y,Y,Y
	enable : Y,Y,Y,Y,Y,Y,Y,Y
	enable_msi : 1
	id : IntelHDA,(null),(null),(null),(null),(null),(null),(null)
	index : -1,-1,-1,-1,-1,-1,-1,-1
	jackpoll_ms : 0,0,0,0,0,0,0,0
	model : (null),(null),(null),(null),(null),(null),(null),(null)
	position_fix : -1,-1,-1,-1,-1,-1,-1,-1
	power_save : 0
	power_save_controller : N
	probe_mask : -1,-1,-1,-1,-1,-1,-1,-1
	probe_only : 0,0,0,0,0,0,0,0
	single_cmd : N
	snoop : -1

!!Module: snd_hda_intel
	align_buffer_size : -1
	bdl_pos_adj : 1,32,-1,-1,-1,-1,-1,-1
	beep_mode : Y,Y,Y,Y,Y,Y,Y,Y
	enable : Y,Y,Y,Y,Y,Y,Y,Y
	enable_msi : 1
	id : IntelHDA,(null),(null),(null),(null),(null),(null),(null)
	index : -1,-1,-1,-1,-1,-1,-1,-1
	jackpoll_ms : 0,0,0,0,0,0,0,0
	model : (null),(null),(null),(null),(null),(null),(null),(null)
	position_fix : -1,-1,-1,-1,-1,-1,-1,-1
	power_save : 0
	power_save_controller : N
	probe_mask : -1,-1,-1,-1,-1,-1,-1,-1
	probe_only : 0,0,0,0,0,0,0,0
	single_cmd : N
	snoop : -1
Comment 9 Takashi Iwai 2015-07-20 08:41:19 UTC
Right, you should remove all the rest snd-hda-intel options but for the requested ones.  Especially enable_msi=1 doesn't look good.

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