Skip to content

Commit

Permalink
ALSA: hda - Optimize resume for codecs without jack detection
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jul 18, 2019
1 parent 4914da2 commit 59d81c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 59d81c1

Please sign in to comment.