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>
This commit is contained in:
@@ -2292,8 +2292,10 @@ static void generic_hdmi_free(struct hda_codec *codec)
|
||||
struct hdmi_spec *spec = codec->spec;
|
||||
int pin_idx, pcm_idx;
|
||||
|
||||
if (codec_has_acomp(codec))
|
||||
if (codec_has_acomp(codec)) {
|
||||
snd_hdac_acomp_register_notifier(&codec->bus->core, NULL);
|
||||
codec->relaxed_resume = 0;
|
||||
}
|
||||
|
||||
for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
|
||||
struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
|
||||
@@ -2579,6 +2581,8 @@ static void register_i915_notifier(struct hda_codec *codec)
|
||||
spec->drm_audio_ops.pin_eld_notify = intel_pin_eld_notify;
|
||||
snd_hdac_acomp_register_notifier(&codec->bus->core,
|
||||
&spec->drm_audio_ops);
|
||||
/* no need for forcible resume for jack check thanks to notifier */
|
||||
codec->relaxed_resume = 1;
|
||||
}
|
||||
|
||||
/* setup_stream ops override for HSW+ */
|
||||
|
Reference in New Issue
Block a user