summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-07-16 12:52:00 +0300
committerTakashi Iwai <tiwai@suse.de>2019-07-18 15:03:17 +0300
commit59d81c1e3cade953a0cb3f66ce9a3f2398fdfac3 (patch)
treedaf5601a25eed31313aa8f4bc8ecf8c4de4f8001 /sound
parent4914da2fb0c89205790503f20dfdde854f3afdd8 (diff)
downloadlinux-59d81c1e3cade953a0cb3f66ce9a3f2398fdfac3.tar.xz
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. Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index e30e86ca6b72..51f10ed9bc43 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -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