summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-06-09 16:04:39 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-09 18:29:29 (GMT)
commitb8c0dab9bf3373010e857a8d3f1b594c60a348dd (patch)
tree9ea917827ed56fc655c3528431dfb234e8231660 /sound/soc/soc-core.c
parent2c36c2ce00987a416bf75681742617a0f85335eb (diff)
downloadlinux-fsl-qoriq-b8c0dab9bf3373010e857a8d3f1b594c60a348dd.tar.xz
ASoC: core - PCM mutex per rtd
In preparation for the new ASoC Dynamic PCM support (AKA DSP support). The new ASoC Dynamic PCM core allows DAIs to be dynamically re-routed at runtime between the PCM device end (or Frontend - FE) and the physical DAI (Backend - BE) using regular kcontrols (just like a hardware CODEC routes audio in the analog domain). The Dynamic PCM core therefore must be able to call PCM operations for both the Frontend and Backend(s) DAIs at the same time. Currently we have a global pcm_mutex that is used to serialise the ASoC PCM operations. This patch removes the global mutex and adds a mutex per RTD allowing the PCM operations to be reentrant and allow control of more than one DAI at at time. e.g. a frontend PCM hw_params() could configure multiple backend DAI hw_params() with similar or different hw parameters at the same time. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 32d7d2f..32bc503 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1032,6 +1032,7 @@ static int soc_post_component_init(struct snd_soc_card *card,
rtd->dev.parent = card->dev;
rtd->dev.release = rtd_release;
rtd->dev.init_name = name;
+ mutex_init(&rtd->pcm_mutex);
ret = device_register(&rtd->dev);
if (ret < 0) {
dev_err(card->dev,