aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>2014-01-07 12:51:42 -0500
committerMark Brown <broonie@linaro.org>2014-01-07 12:57:48 -0500
commit1e9de42f4324b91ce2e9da0939cab8fc6ae93893 (patch)
treed482178030e7a5c78fc8b7c1f48724446358fcc1
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
ASoC: dpcm: Explicitly set BE DAI link supported stream directions
Some BE DAIs can be "dummy" (when the DSP is controlling the DAI) and as such wont have set a minimum number of playback or capture channels required for BE DAI registration (to establish supported stream directions). Force machine drivers to explicitly set whether they support playback and capture stream directions for every BE DAIs. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--include/sound/soc.h4
-rw-r--r--sound/soc/soc-pcm.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 1f741cb24f33..a5ef14f06124 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -886,6 +886,10 @@ struct snd_soc_dai_link {
886 /* This DAI link can route to other DAI links at runtime (Frontend)*/ 886 /* This DAI link can route to other DAI links at runtime (Frontend)*/
887 unsigned int dynamic:1; 887 unsigned int dynamic:1;
888 888
889 /* DPCM capture and Playback support */
890 unsigned int dpcm_capture:1;
891 unsigned int dpcm_playback:1;
892
889 /* pmdown_time is ignored at stop */ 893 /* pmdown_time is ignored at stop */
890 unsigned int ignore_pmdown_time:1; 894 unsigned int ignore_pmdown_time:1;
891 895
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 42782c01e413..141a302e4e77 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2026,10 +2026,8 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
2026 int ret = 0, playback = 0, capture = 0; 2026 int ret = 0, playback = 0, capture = 0;
2027 2027
2028 if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { 2028 if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) {
2029 if (cpu_dai->driver->playback.channels_min) 2029 playback = rtd->dai_link->dpcm_playback;
2030 playback = 1; 2030 capture = rtd->dai_link->dpcm_capture;
2031 if (cpu_dai->driver->capture.channels_min)
2032 capture = 1;
2033 } else { 2031 } else {
2034 if (codec_dai->driver->playback.channels_min && 2032 if (codec_dai->driver->playback.channels_min &&
2035 cpu_dai->driver->playback.channels_min) 2033 cpu_dai->driver->playback.channels_min)