Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283900
b: refs/heads/master
c: d6652ef
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 8, 2011
1 parent 812377c commit fd08747
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf4df93593af5dea01c93740956f6c77270b3036
refs/heads/master: d6652ef8229e9953543f41d8e081c23e653f0044
15 changes: 15 additions & 0 deletions trunk/sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <sound/core.h>
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit fd08747

Please sign in to comment.