All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/hdmi: always check pin power status in i915 pin fixup
@ 2020-08-26 17:03 Kai Vehmanen
  2020-08-26 18:52 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Vehmanen @ 2020-08-26 17:03 UTC (permalink / raw)
  To: alsa-devel, tiwai; +Cc: kai.vehmanen

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>
---
 sound/pci/hda/patch_hdmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 3259d713ace9..1e1b13eb7829 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2794,6 +2794,7 @@ static void i915_pin_cvt_fixup(struct hda_codec *codec,
 			       hda_nid_t cvt_nid)
 {
 	if (per_pin) {
+		haswell_verify_D0(codec, per_pin->cvt_nid, per_pin->pin_nid);
 		snd_hda_set_dev_select(codec, per_pin->pin_nid,
 			       per_pin->dev_id);
 		intel_verify_pin_cvt_connect(codec, per_pin);
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/hdmi: always check pin power status in i915 pin fixup
  2020-08-26 17:03 [PATCH] ALSA: hda/hdmi: always check pin power status in i915 pin fixup Kai Vehmanen
@ 2020-08-26 18:52 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-08-26 18:52 UTC (permalink / raw)
  To: Kai Vehmanen; +Cc: alsa-devel

On Wed, 26 Aug 2020 19:03:06 +0200,
Kai Vehmanen wrote:
> 
> 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>

Applied with Cc to stable now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-26 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 17:03 [PATCH] ALSA: hda/hdmi: always check pin power status in i915 pin fixup Kai Vehmanen
2020-08-26 18:52 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.