ASoC: rockchip: i2s: add default values for registers
[deliverable/linux.git] / sound / soc / samsung / s3c2412-i2s.c
index 2b766d212ce0796a7dd5c9b54b7ad09668e0be02..204029d12f5b2f639f487ffe6ef591636fdf4746 100644 (file)
@@ -25,7 +25,6 @@
 #include <sound/soc.h>
 #include <sound/pcm_params.h>
 
-#include <mach/dma.h>
 #include <mach/gpio-samsung.h>
 #include <plat/gpio-cfg.h>
 
 #include "regs-i2s-v2.h"
 #include "s3c2412-i2s.h"
 
+#include <linux/platform_data/asoc-s3c.h>
+
 static struct s3c_dma_params s3c2412_i2s_pcm_stereo_out = {
-       .channel        = DMACH_I2S_OUT,
        .ch_name        = "tx",
        .dma_size       = 4,
 };
 
 static struct s3c_dma_params s3c2412_i2s_pcm_stereo_in = {
-       .channel        = DMACH_I2S_IN,
        .ch_name        = "rx",
        .dma_size       = 4,
 };
@@ -152,6 +151,12 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev)
 {
        int ret = 0;
        struct resource *res;
+       struct s3c_audio_pdata *pdata = dev_get_platdata(&pdev->dev);
+
+       if (!pdata) {
+               dev_err(&pdev->dev, "missing platform data");
+               return -ENXIO;
+       }
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        s3c2412_i2s.regs = devm_ioremap_resource(&pdev->dev, res);
@@ -159,7 +164,9 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev)
                return PTR_ERR(s3c2412_i2s.regs);
 
        s3c2412_i2s_pcm_stereo_out.dma_addr = res->start + S3C2412_IISTXD;
+       s3c2412_i2s_pcm_stereo_out.slave = pdata->dma_playback;
        s3c2412_i2s_pcm_stereo_in.dma_addr = res->start + S3C2412_IISRXD;
+       s3c2412_i2s_pcm_stereo_in.slave = pdata->dma_capture;
 
        ret = s3c_i2sv2_register_component(&pdev->dev, -1,
                                           &s3c2412_i2s_component,
@@ -169,7 +176,8 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev)
                return ret;
        }
 
-       ret = samsung_asoc_dma_platform_register(&pdev->dev);
+       ret = samsung_asoc_dma_platform_register(&pdev->dev,
+                                                pdata->dma_filter);
        if (ret)
                pr_err("failed to register the DMA: %d\n", ret);
 
This page took 0.026358 seconds and 5 git commands to generate.