ALSA: hda - Optimize resume for codecs without jack detection
PATCH 1/1 ALSA: hda - Optimize resume for codecs without jack detection
The codecs without jack detection also don't have to be resumed forcibly because, obviously, they have no jack. Skip the forced resume in such a case as optimization as well.
Signed-off-by Takashi Iwai <[email protected]>
--- sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/hda_codec.c +1 -1
@@ -2942,7 +2942,7 @@ static int hda_codec_runtime_resume(struct device *dev)static int hda_codec_force_resume (struct device *dev) {struct hda_codec *codec =dev_to_hda_codec (dev); -bool forced_resume = !codec->relaxed_resume; +bool forced_resume = !codec->relaxed_resume && codec->jacktbl.used;int ret;/* The get/put pair below enforces the runtime resume even if the
Signature · 1 line
2.16.4
Hi,
Quoted 3 lines · Takashi Iwai
The codecs without jack detection also don't have to be resumed forcibly because, obviously, they have no jack. Skip the forced resume in such a case as optimization as well.
looks good. I did a light test round for this, together with the previous "ALSA: hda - Don't resume forcibly i915 HDMI/DP codec" and seem good.
Reviewed-by Kai Vehmanen <[email protected]>