aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-08-29 09:32:13 -0400
committerMark Brown <broonie@linaro.org>2013-09-01 11:29:27 -0400
commitd6bead020d8f8bcaca5cdcb035250c44b21c93e7 (patch)
treecca1acff1246987d91bffe6906e82f0d38136e6b /sound
parent6b4c80f947df9d92b97eb62afc29dda6d7220c7d (diff)
ASoC: soc-pcm: Allow to specify unidirectional dai_link
Add 'playback_only' and 'capture_only' fields that can be used for specifying that a dai_link has a unidirectional capability. The motivation for this is for the cases of systems, such as Freescale MX28, that has two unidirectional DAIs. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-pcm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index b6c640332a17..9abaa52efb2e 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2027,6 +2027,16 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
2027 capture = 1; 2027 capture = 1;
2028 } 2028 }
2029 2029
2030 if (rtd->dai_link->playback_only) {
2031 playback = 1;
2032 capture = 0;
2033 }
2034
2035 if (rtd->dai_link->capture_only) {
2036 playback = 0;
2037 capture = 1;
2038 }
2039
2030 /* create the PCM */ 2040 /* create the PCM */
2031 if (rtd->dai_link->no_pcm) { 2041 if (rtd->dai_link->no_pcm) {
2032 snprintf(new_name, sizeof(new_name), "(%s)", 2042 snprintf(new_name, sizeof(new_name), "(%s)",