ASoC: samsung: Initialise DMA data at device probe time
authorMark Brown <broonie@linaro.org>
Thu, 17 Oct 2013 20:18:40 +0000 (21:18 +0100)
committerMark Brown <broonie@linaro.org>
Sun, 20 Oct 2013 16:26:37 +0000 (17:26 +0100)
This is a minor simplification and will help with converting the platform
to use the dmaengine helpers.

Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/samsung/i2s.c

index b302f3b7a587f3e480586419affc8e300c80ad8d..3e08b6c0f7baacf5ebfa145fa989c0af4332a6d6 100644 (file)
@@ -702,13 +702,6 @@ static int i2s_hw_params(struct snd_pcm_substream *substream,
        }
        writel(mod, i2s->addr + I2SMOD);
 
-       if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-               snd_soc_dai_set_dma_data(dai, substream,
-                       (void *)&i2s->dma_playback);
-       else
-               snd_soc_dai_set_dma_data(dai, substream,
-                       (void *)&i2s->dma_capture);
-
        i2s->frmclk = params_rate(params);
 
        return 0;
@@ -970,6 +963,8 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)
        }
        clk_prepare_enable(i2s->clk);
 
+       snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, &i2s->dma_capture);
+
        if (other) {
                other->addr = i2s->addr;
                other->clk = i2s->clk;