Message ID | 20200828025304.7390-2-hui.wang@canonical.com |
---|---|
State | New |
Headers | show |
Series | The DP/HDMI audio via USB-C to DP dongle or Dell Zeus adapter can't work after suspend | expand |
On 2020-08-27 8:53 p.m., Hui Wang wrote: > From: Kai Vehmanen <kai.vehmanen@linux.intel.com> > > BugLink: https://bugs.launchpad.net/bugs/1893290 > > 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> > (cherry picked from commit 858e0ad9301d1270c02b5aca97537d2d6ee9dd68 linux-next) > Signed-off-by: Hui Wang <hui.wang@canonical.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 f4956ccd64bd..aa185f29fb04 100644 > --- a/sound/pci/hda/patch_hdmi.c > +++ b/sound/pci/hda/patch_hdmi.c > @@ -2859,6 +2859,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); > Acked-by: Alex Hung <alex.hung@canonical.com>
On 28.08.20 04:53, Hui Wang wrote: > From: Kai Vehmanen <kai.vehmanen@linux.intel.com> > > BugLink: https://bugs.launchpad.net/bugs/1893290 > > 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> > (cherry picked from commit 858e0ad9301d1270c02b5aca97537d2d6ee9dd68 linux-next) > Signed-off-by: Hui Wang <hui.wang@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.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 f4956ccd64bd..aa185f29fb04 100644 > --- a/sound/pci/hda/patch_hdmi.c > +++ b/sound/pci/hda/patch_hdmi.c > @@ -2859,6 +2859,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); >
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index f4956ccd64bd..aa185f29fb04 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2859,6 +2859,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);