ASoC: core utils: Dont set DMA params for BE substreams
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>
Fri, 13 Sep 2013 17:09:47 +0000 (18:09 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 16 Sep 2013 23:37:03 +0000 (00:37 +0100)
BE substreams dont require dummy DMA configs so dont set any.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-utils.c

index 29b211e..5e63365 100644 (file)
@@ -75,7 +75,11 @@ static const struct snd_pcm_hardware dummy_dma_hardware = {
 
 static int dummy_dma_open(struct snd_pcm_substream *substream)
 {
-       snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware);
+       struct snd_soc_pcm_runtime *rtd = substream->private_data;
+
+       /* BE's dont need dummy params */
+       if (!rtd->dai_link->no_pcm)
+               snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware);
 
        return 0;
 }