mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
@ 2021-12-09 17:46 Daniel Baluta
  2021-12-09 19:16 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Baluta @ 2021-12-09 17:46 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, linux-kernel, pierre-louis.bossart, kai.vehmanen,
	perex, linux-mediatek, lgirdwood, Allen-KH Cheng, Daniel Baluta,
	Paul Olaru

From: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>

In SOF OF device, pm_runtime_put_autosuspend() is not
matching any pm_runtime_get_sync().

This is imbalanced for PM runtime.

Also, for consistency we call pm_runtime_mark_last_busy()
before enabling PM runtime.

1. Remove pm_runtime_put_autosuspend() in probe_complete
2. Reorder PM runtime calls int probe_complete

Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/sof/sof-of-dev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index 412cbb824b84..b0089698eecb 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -74,11 +74,9 @@ static void sof_of_probe_complete(struct device *dev)
 	/* allow runtime_pm */
 	pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS);
 	pm_runtime_use_autosuspend(dev);
+	pm_runtime_mark_last_busy(dev);
 	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
-
-	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
 }
 
 static int sof_of_probe(struct platform_device *pdev)
-- 
2.27.0


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

* Re: [PATCH] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device
  2021-12-09 17:46 [PATCH] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device Daniel Baluta
@ 2021-12-09 19:16 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-12-09 19:16 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: alsa-devel, linux-kernel, pierre-louis.bossart, kai.vehmanen,
	perex, linux-mediatek, lgirdwood, Allen-KH Cheng, Daniel Baluta,
	Paul Olaru

[-- Attachment #1: Type: text/plain, Size: 512 bytes --]

On Thu, Dec 09, 2021 at 07:46:57PM +0200, Daniel Baluta wrote:
> 
> Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com>
> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
> Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---


You've not provided a Signed-off-by for this so I can't do anything with
it, please see Documentation/process/submitting-patches.rst for details
on what this is and why it's important.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-12-09 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 17:46 [PATCH] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device Daniel Baluta
2021-12-09 19:16 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®