ALSA: hda/hdmi: always check pin power status in i915 pin fixup
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Wed, 26 Aug 2020 17:03:06 +0000 (20:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:27 +0000 (19:14 +0200)
commit7554ad2ffdad73a096c8bc824aaa11bbfb379e75
treeb047a290c90938ce615d267ad092e6fdefbe8ab3
parentdb5d1d51bef18119b6a2ccd261ed637abb15c242
ALSA: hda/hdmi: always check pin power status in i915 pin fixup

commit 858e0ad9301d1270c02b5aca97537d2d6ee9dd68 upstream.

When system is suspended with active audio playback to HDMI/DP, two
alternative sequences can happen at resume:
  a) monitor is detected first and ALSA prepare follows normal
     stream setup sequence, or
  b) ALSA prepare is called first, but monitor is not yet detected,
     so PCM is restarted without a pin,

In case of (b), on i915 systems, haswell_verify_D0() is not called at
resume and the pin power state may be incorrect. Result is lack of audio
after resume with no error reported back to user-space.

Fix the problem by always verifying converter and pin state in the
i915_pin_cvt_fixup().

BugLink: https://github.com/thesofproject/linux/issues/2388
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200826170306.701566-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_hdmi.c