All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda - Optimize resume for codecs without jack detection
@ 2019-07-17 13:55 Takashi Iwai
  2019-07-18 11:59 ` Kai Vehmanen
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2019-07-17 13:55 UTC (permalink / raw)
  To: alsa-devel

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 <tiwai@suse.de>
---
 sound/pci/hda/hda_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.16.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda - Optimize resume for codecs without jack detection
  2019-07-17 13:55 [PATCH] ALSA: hda - Optimize resume for codecs without jack detection Takashi Iwai
@ 2019-07-18 11:59 ` Kai Vehmanen
  0 siblings, 0 replies; 2+ messages in thread
From: Kai Vehmanen @ 2019-07-18 11:59 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Hi,

On Wed, 17 Jul 2019, Takashi Iwai wrote:

> 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 <kai.vehmanen@linux.intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-18 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 13:55 [PATCH] ALSA: hda - Optimize resume for codecs without jack detection Takashi Iwai
2019-07-18 11:59 ` Kai Vehmanen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.