From fd08747f66a12b7cea1411c3f2a2f5c02238ff02 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 3 Dec 2011 20:14:31 +0000 Subject: [PATCH] --- yaml --- r: 283900 b: refs/heads/master c: d6652ef8229e9953543f41d8e081c23e653f0044 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-pcm.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5def17d5e151..51cd0f66fef1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bf4df93593af5dea01c93740956f6c77270b3036 +refs/heads/master: d6652ef8229e9953543f41d8e081c23e653f0044 diff --git a/trunk/sound/soc/soc-pcm.c b/trunk/sound/soc/soc-pcm.c index 49aa71e0d7e6..8aa7cec6eab2 100644 --- a/trunk/sound/soc/soc-pcm.c +++ b/trunk/sound/soc/soc-pcm.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -77,6 +78,10 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) struct snd_soc_dai_driver *codec_dai_drv = codec_dai->driver; int ret = 0; + pm_runtime_get_sync(cpu_dai->dev); + pm_runtime_get_sync(codec_dai->dev); + pm_runtime_get_sync(platform->dev); + mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass); /* startup the audio subsystem */ @@ -233,6 +238,11 @@ static int soc_pcm_open(struct snd_pcm_substream *substream) cpu_dai->driver->ops->shutdown(substream, cpu_dai); out: mutex_unlock(&rtd->pcm_mutex); + + pm_runtime_put(platform->dev); + pm_runtime_put(codec_dai->dev); + pm_runtime_put(cpu_dai->dev); + return ret; } @@ -339,6 +349,11 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) } mutex_unlock(&rtd->pcm_mutex); + + pm_runtime_put(platform->dev); + pm_runtime_put(codec_dai->dev); + pm_runtime_put(cpu_dai->dev); + return 0; }