Bug 208061

Summary: snd_hda_intel: regression on ALC892 - no sound
Product: Drivers Reporter: dezifit
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: NEW ---    
Severity: normal CC: tiwai
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.4 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: alsa-info of working driver
alsa-info of failed driver

Description dezifit 2020-06-04 18:41:05 UTC
Created attachment 289501 [details]
alsa-info of working driver

Device is fully functional until kernel 5.4.36. The very same system fails to play audio on newer kernels: card is detected but the codec proc-file shows "Invalid AFG subtree" and doesn't list any PCM format at all.

Attached is alsa-info of working and broken kernel versions.
Comment 1 dezifit 2020-06-04 18:41:59 UTC
Created attachment 289503 [details]
alsa-info of failed driver
Comment 2 Takashi Iwai 2020-06-16 13:15:59 UTC
The proc output is empty in the bad state, so something went wrong completely.
As it's 5.4.y stable update, could you try to bisect the regression?  At least, pointing the exact 5.4.y version number that starts regression would be helpful.
Comment 3 dezifit 2020-06-16 14:06:15 UTC
Unfortunately this system isn't equipped well for repeated kernel builds, but I'm fairly confident that the trouble started with 5.4.37 (maybe commit 135e10232fb592975db86cf51c797872be23f3ec?). Please let me know if there is any other information to provide or test to perform.
Comment 4 Takashi Iwai 2020-06-16 16:16:42 UTC
I don't think the suggested commit as the cause; it's only about the error path, and if your driver did work beforehand, it must not hit.

I saw that you're using 32bit kernel, right?  Then it might be something other than the sound stuff that broke.

In anyway, it's hard to judge without more testing.  If you're using a distro kernel, you may ask distro guys for the certain 5.4.x kernel package?
Or if you can test with the latest upstream (5.7.x), it's more interesting.
Comment 5 dezifit 2020-06-22 08:14:46 UTC
Additional tests show that 64bit kernal (5.4.46) has the same issue. As it turns out, the system uses a udev rule to deactivate jack detection:
ACTION=="add", SUBSYSTEM=="sound", ATTRS{chip_name}=="ALC892", ATTR{hints}="jack_detect=false"
ACTION=="add", SUBSYSTEM=="sound", ATTRS{chip_name}=="ALC892", ATTR{reconfig}="1"

Without this rule, pulseaudio shows all profiles as inactive (pacmd list-cards) and refuses to use the device. Until kernel 5.4.36 [HD-Audio Reconfiguration][1] works. In more recent kernels it fails.

Audio is working in Kernel 5.4.46 (32 and 64bit) if booted without udev rule (or only with line 1). As soon as a reconfiguration is done, the audio device fails. The latest 5.7 line is not yet available as package for testing.

I don't know which part of the interaction between PA, Alsa and the Intel sound driver is responsible for the broken jack detection, but as it is, sound either isn't available without (PA fails) or with udev rule (driver fails).

[1]: https://www.kernel.org/doc/html/v5.2/sound/hd-audio/notes.html#hd-audio-reconfiguration