aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-06-09 12:04:39 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-09 14:29:29 -0400
commitb8c0dab9bf3373010e857a8d3f1b594c60a348dd (patch)
tree9ea917827ed56fc655c3528431dfb234e8231660 /include/sound
parent2c36c2ce00987a416bf75681742617a0f85335eb (diff)
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 'include/sound')
-rw-r--r--include/sound/soc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index d5db87e82c6..4334ab25c5d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -269,6 +269,11 @@ enum snd_soc_compress_type {
269 SND_SOC_RBTREE_COMPRESSION 269 SND_SOC_RBTREE_COMPRESSION
270}; 270};
271 271
272enum snd_soc_pcm_subclass {
273 SND_SOC_PCM_CLASS_PCM = 0,
274 SND_SOC_PCM_CLASS_BE = 1,
275};
276
272int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id, 277int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
273 unsigned int freq, int dir); 278 unsigned int freq, int dir);
274int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, 279int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
@@ -809,6 +814,9 @@ struct snd_soc_pcm_runtime {
809 struct device dev; 814 struct device dev;
810 struct snd_soc_card *card; 815 struct snd_soc_card *card;
811 struct snd_soc_dai_link *dai_link; 816 struct snd_soc_dai_link *dai_link;
817 struct mutex pcm_mutex;
818 enum snd_soc_pcm_subclass pcm_subclass;
819 struct snd_pcm_ops ops;
812 820
813 unsigned int complete:1; 821 unsigned int complete:1;
814 unsigned int dev_registered:1; 822 unsigned int dev_registered:1;