]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: mxs: Setup dma data in DAI probe
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 20 Apr 2013 17:29:02 +0000 (19:29 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 22 Apr 2013 10:27:23 +0000 (11:27 +0100)
This allows us to access the DAI DMA data when we create the PCM. We'll use
this when converting mxs to generic DMA engine PCM driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/mxs/mxs-saif.c

index f13bd8730b0ff08f3fffb1790760cc01a55a6d7d..d796a393968deb8163f6f15e36c40f2fe583a878 100644 (file)
@@ -369,7 +369,6 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream,
                           struct snd_soc_dai *cpu_dai)
 {
        struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
-       snd_soc_dai_set_dma_data(cpu_dai, substream, &saif->dma_param);
 
        /* clear error status to 0 for each re-open */
        saif->fifo_underrun = 0;
@@ -605,6 +604,8 @@ static int mxs_saif_dai_probe(struct snd_soc_dai *dai)
        struct mxs_saif *saif = dev_get_drvdata(dai->dev);
 
        snd_soc_dai_set_drvdata(dai, saif);
+       dai->playback_dma_data = &saif->dma_param;
+       dai->capture_dma_data = &saif->dma_param;
 
        return 0;
 }