]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: hda - Optimize resume for codecs without jack detection
authorTakashi Iwai <tiwai@suse.de>
Tue, 16 Jul 2019 09:52:00 +0000 (11:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 18 Jul 2019 12:03:17 +0000 (14:03 +0200)
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.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c

index e30e86ca6b72d5d1dd3ef34446315892c4119538..51f10ed9bc43205c8de07545f48588e050207d69 100644 (file)
@@ -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