ALSA: hda - Don't resume forcibly i915 HDMI/DP codec
authorTakashi Iwai <tiwai@suse.de>
Tue, 16 Jul 2019 06:56:51 +0000 (08:56 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 16 Jul 2019 20:46:13 +0000 (22:46 +0200)
commit4914da2fb0c89205790503f20dfdde854f3afdd8
tree952855c2a68b60fa0f106c163ae29b69df819149
parent3140aafb22edeab0cc41f15f53b12a118c0ac215
ALSA: hda - Don't resume forcibly i915 HDMI/DP codec

We apply the codec resume forcibly at system resume callback for
updating and syncing the jack detection state that may have changed
during sleeping.  This is, however, superfluous for the codec like
Intel HDMI/DP, where the jack detection is managed via the audio
component notification; i.e. the jack state change shall be reported
sooner or later from the graphics side at mode change.

This patch changes the codec resume callback to avoid the forcible
resume conditionally with a new flag, codec->relaxed_resume, for
reducing the resume time.  The flag is set in the codec probe.

Although this doesn't fix the entire bug mentioned in the bugzilla
entry below, it's still a good optimization and some improvements are
seen.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201901
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/hda_codec.h
sound/pci/hda/hda_codec.c
sound/pci/hda/patch_hdmi.c