* [PATCH] ASoC: omap-mcbsp: Add pm_runtime_get/put functions call for McBSP.
@ 2012-06-01 20:12 Sebastien Guiriec
2012-06-01 20:24 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Sebastien Guiriec @ 2012-06-01 20:12 UTC (permalink / raw)
To: Sebastien Guiriec, Peter Ujfalusi, Jarkko Nikula, Liam Girdwood,
Mark Brown, linux-omap, alsa-devel
pm_runtime_get_sync() and put_sync() are not called by McBSP driver.
This is introducing a problem with PM and Audio Backend due to
missing get/put for McBSP IP.
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
---
sound/soc/omap/omap-mcbsp.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 1046083..007d239 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -117,6 +117,8 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream,
struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
int err = 0;
+ pm_runtime_get_sync(mcbsp->dev);
+
if (!cpu_dai->active)
err = omap_mcbsp_request(mcbsp);
@@ -165,6 +167,8 @@ static void omap_mcbsp_dai_shutdown(struct snd_pcm_substream *substream,
omap_mcbsp_free(mcbsp);
mcbsp->configured = 0;
}
+
+ pm_runtime_put_sync(mcbsp->dev);
}
static int omap_mcbsp_dai_trigger(struct snd_pcm_substream *substream, int cmd,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: omap-mcbsp: Add pm_runtime_get/put functions call for McBSP.
2012-06-01 20:12 [PATCH] ASoC: omap-mcbsp: Add pm_runtime_get/put functions call for McBSP Sebastien Guiriec
@ 2012-06-01 20:24 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-06-01 20:24 UTC (permalink / raw)
To: Sebastien Guiriec
Cc: Peter Ujfalusi, Jarkko Nikula, Liam Girdwood, linux-omap,
alsa-devel
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
On Fri, Jun 01, 2012 at 10:12:52PM +0200, Sebastien Guiriec wrote:
> pm_runtime_get_sync() and put_sync() are not called by McBSP driver.
> This is introducing a problem with PM and Audio Backend due to
> missing get/put for McBSP IP.
They are called by the core. Probably you're just pointing your struct
device at some virtual device instead of the physical device, either
enabling runtime PM for the virtual device (assuming it's a child of the
physical device) or changing the pointer to the physical device (which
might make for better dev_ logging potentially) should resolve the
issue.
> + pm_runtime_put_sync(mcbsp->dev);
No need for this, anyway - just use regular _put(). We don't care if
the device is actually suspended before we return, the PM core can do
that at it's leisure.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-01 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-01 20:12 [PATCH] ASoC: omap-mcbsp: Add pm_runtime_get/put functions call for McBSP Sebastien Guiriec
2012-06-01 20:24 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox