We tested mainline kernel v5.2-rc7 on the Intel ICL platform, the hdmi audio sometimes can't work, the fail rate is about 1/5. When hdmi audio doesn't work, we can see error log from dmesg: [ 11.006074] snd_hda_intel 0000:00:1f.3: No response from codec, disabling MSI: last cmd=0x202f8100 [ 12.018190] snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to single_cmd mode: last cmd=0x202f8100 [ 12.018373] azx_single_wait_for_response: 21 callbacks suppressed [ 12.303601] snd_hda_codec_hdmi hdaudioC0D2: Unable to sync register 0x2f8100. -5 [ 12.920238] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 12.920728] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 I don't know if it is a alsa bug or a i915 driver's bug.
Created attachment 283615 [details] dmesg with hdim audio worked
Created attachment 283617 [details] dmesg with the hdmi audio failed
0xf81 is Intel-specific verb and the stall implies that something went wrong in GPU side. Better to report to Intel people.
BTW, the error below appears frequently: snd_hda_codec_hdmi hdaudioC0D2: HDMI: pin nid 5 not registered I guess this is a bug due to the lack of reverse port/pin mapping in HDMI codec driver. The patch below should address it. Could you check it? But I'm not sure whether this is relevant with the codec stall at all. Please check which code path triggers the codec error. You can put a WARN_ON() at the error message line, for example. It's likely the runtime PM resume path, and if so, it's either intel_haswell_enable_all_pins() or intel_haswell_fixup_enable_dp12() call. Both of them are basically superfluous for runtime PM resume, and we may skip it conditionally.
Created attachment 283711 [details] A fix for invalid port/pin mapping
Thank you, saw your patch in the ML, and I will test the patch and update the test result soon (you could merge your patch first, no need to wait for my testing result since your patch really fix sth).
Tested the patch, it worked very well, the problem is fixed. And close this bug.