summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-06-09 17:04:39 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-09 19:29:29 +0100
commitb8c0dab9bf3373010e857a8d3f1b594c60a348dd (patch)
tree9ea917827ed56fc655c3528431dfb234e8231660 /include/sound
parent2c36c2ce00987a416bf75681742617a0f85335eb (diff)
downloadlinux-b8c0dab9bf3373010e857a8d3f1b594c60a348dd.tar.gz
linux-b8c0dab9bf3373010e857a8d3f1b594c60a348dd.tar.bz2
linux-b8c0dab9bf3373010e857a8d3f1b594c60a348dd.zip
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 d5db87e82c6d..4334ab25c5d5 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -269,6 +269,11 @@ enum snd_soc_compress_type {
SND_SOC_RBTREE_COMPRESSION
};
+enum snd_soc_pcm_subclass {
+ SND_SOC_PCM_CLASS_PCM = 0,
+ SND_SOC_PCM_CLASS_BE = 1,
+};
+
int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
unsigned int freq, int dir);
int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
@@ -809,6 +814,9 @@ struct snd_soc_pcm_runtime {
struct device dev;
struct snd_soc_card *card;
struct snd_soc_dai_link *dai_link;
+ struct mutex pcm_mutex;
+ enum snd_soc_pcm_subclass pcm_subclass;
+ struct snd_pcm_ops ops;
unsigned int complete:1;
unsigned int dev_registered:1;