ASoC: samsung: Drop usage of of struct s3c_dma_params from pcm.c
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 4 Aug 2016 09:30:31 +0000 (11:30 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 8 Aug 2016 10:55:20 +0000 (11:55 +0100)
struct s3c_dma_params already includes struct snd_dmaengine_dai_dma_data,
there is no need for such an indirection so switch to using struct
snd_dmaengine_dai_dma_data instead of struct s3c_dma_params.  This also
allows us to use snd_soc_dai_init_dma_data() function instead of the
platform specific samsung_asoc_init_dma_data helper.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/samsung/pcm.c

index 490c1a87fd66232c798741ed13452802cfcf7223..43e367a9acc368d148c0a5afbe777c2874f2ea30 100644 (file)
@@ -127,25 +127,25 @@ struct s3c_pcm_info {
        struct clk      *pclk;
        struct clk      *cclk;
 
-       struct s3c_dma_params   *dma_playback;
-       struct s3c_dma_params   *dma_capture;
+       struct snd_dmaengine_dai_dma_data *dma_playback;
+       struct snd_dmaengine_dai_dma_data *dma_capture;
 };
 
-static struct s3c_dma_params s3c_pcm_stereo_out[] = {
+static struct snd_dmaengine_dai_dma_data s3c_pcm_stereo_out[] = {
        [0] = {
-               .dma_size       = 4,
+               .addr_width     = 4,
        },
        [1] = {
-               .dma_size       = 4,
+               .addr_width     = 4,
        },
 };
 
-static struct s3c_dma_params s3c_pcm_stereo_in[] = {
+static struct snd_dmaengine_dai_dma_data s3c_pcm_stereo_in[] = {
        [0] = {
-               .dma_size       = 4,
+               .addr_width     = 4,
        },
        [1] = {
-               .dma_size       = 4,
+               .addr_width     = 4,
        },
 };
 
@@ -552,15 +552,13 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
        }
        clk_prepare_enable(pcm->pclk);
 
-       s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start
-                                                       + S3C_PCM_RXFIFO;
-       s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start
-                                                       + S3C_PCM_TXFIFO;
+       s3c_pcm_stereo_in[pdev->id].addr = mem_res->start + S3C_PCM_RXFIFO;
+       s3c_pcm_stereo_out[pdev->id].addr = mem_res->start + S3C_PCM_TXFIFO;
 
        filter = NULL;
        if (pcm_pdata) {
-               s3c_pcm_stereo_in[pdev->id].slave = pcm_pdata->dma_capture;
-               s3c_pcm_stereo_out[pdev->id].slave = pcm_pdata->dma_playback;
+               s3c_pcm_stereo_in[pdev->id].filter_data = pcm_pdata->dma_capture;
+               s3c_pcm_stereo_out[pdev->id].filter_data = pcm_pdata->dma_playback;
                filter = pcm_pdata->dma_filter;
        }