linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Enable runtime PM for SOF device
@ 2020-09-24 15:15 Daniel Baluta
  2020-09-24 15:15 ` [PATCH 1/2] ASoC: SOF: Activate runtime PM with SOF OF device Daniel Baluta
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Baluta @ 2020-09-24 15:15 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

This enables runtime PM for SOF device. Next patchseries will
provide PM suspend/resume handlers for i.MX8 specific devices.

Daniel Baluta (2):
  ASoC: SOF: Activate runtime PM with SOF OF device
  ASoC: SOF: Add .prepare/.complete callbacks

 sound/soc/sof/sof-of-dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.17.1


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

* [PATCH 1/2] ASoC: SOF: Activate runtime PM with SOF OF device
  2020-09-24 15:15 [PATCH 0/2] Enable runtime PM for SOF device Daniel Baluta
@ 2020-09-24 15:15 ` Daniel Baluta
  2020-09-24 15:15 ` [PATCH 2/2] ASoC: SOF: Add .prepare/.complete callbacks Daniel Baluta
  2020-09-25 20:41 ` [PATCH 0/2] Enable runtime PM for SOF device Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Baluta @ 2020-09-24 15:15 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

SOF boots the DSP at probe and keeps it up all the time.
With this change, after booting if no one is using the DSP
the SOF core will turn off the DSP to save power.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 sound/soc/sof/sof-of-dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index f492c5dfa659..de9acc0e33cb 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -56,7 +56,11 @@ 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_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.17.1


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

* [PATCH 2/2] ASoC: SOF: Add .prepare/.complete callbacks
  2020-09-24 15:15 [PATCH 0/2] Enable runtime PM for SOF device Daniel Baluta
  2020-09-24 15:15 ` [PATCH 1/2] ASoC: SOF: Activate runtime PM with SOF OF device Daniel Baluta
@ 2020-09-24 15:15 ` Daniel Baluta
  2020-09-25 20:41 ` [PATCH 0/2] Enable runtime PM for SOF device Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Baluta @ 2020-09-24 15:15 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

Use SOF defined callbacks (snd_sof_prepare/snd_sof_complete)
in order to update internal SOF system suspend target.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
 sound/soc/sof/sof-of-dev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c
index de9acc0e33cb..85ff0db88eb7 100644
--- a/sound/soc/sof/sof-of-dev.c
+++ b/sound/soc/sof/sof-of-dev.c
@@ -46,6 +46,8 @@ static struct sof_dev_desc sof_of_imx8mp_desc = {
 #endif
 
 static const struct dev_pm_ops sof_of_pm = {
+	.prepare = snd_sof_prepare,
+	.complete = snd_sof_complete,
 	SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
 	SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
 			   NULL)
-- 
2.17.1


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

* Re: [PATCH 0/2] Enable runtime PM for SOF device
  2020-09-24 15:15 [PATCH 0/2] Enable runtime PM for SOF device Daniel Baluta
  2020-09-24 15:15 ` [PATCH 1/2] ASoC: SOF: Activate runtime PM with SOF OF device Daniel Baluta
  2020-09-24 15:15 ` [PATCH 2/2] ASoC: SOF: Add .prepare/.complete callbacks Daniel Baluta
@ 2020-09-25 20:41 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-09-25 20:41 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: alsa-devel, linux-kernel

On Thu, 24 Sep 2020 18:15:16 +0300, Daniel Baluta wrote:
> This enables runtime PM for SOF device. Next patchseries will
> provide PM suspend/resume handlers for i.MX8 specific devices.
> 
> Daniel Baluta (2):
>   ASoC: SOF: Activate runtime PM with SOF OF device
>   ASoC: SOF: Add .prepare/.complete callbacks
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: SOF: Activate runtime PM with SOF OF device
      commit: 4fefc39894d8975d58b02b4b5f635d20891778ca
[2/2] ASoC: SOF: Add .prepare/.complete callbacks
      commit: dd759805d6f78262cb9aa63ef37e3bc263ef1978

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2020-09-25 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-24 15:15 [PATCH 0/2] Enable runtime PM for SOF device Daniel Baluta
2020-09-24 15:15 ` [PATCH 1/2] ASoC: SOF: Activate runtime PM with SOF OF device Daniel Baluta
2020-09-24 15:15 ` [PATCH 2/2] ASoC: SOF: Add .prepare/.complete callbacks Daniel Baluta
2020-09-25 20:41 ` [PATCH 0/2] Enable runtime PM for SOF device Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).