]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ASoC: Samsung: Do not register samsung audio dma device as pdev
authorPadmavathi Venna <padma.v@samsung.com>
Fri, 7 Dec 2012 08:29:21 +0000 (13:59 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 7 Dec 2012 10:36:07 +0000 (19:36 +0900)
Previously, the ASoC 'platform' (PCM/DMA) object was instantiated via a
platform_device. This didn't represent the hardware well, since there
was no separate hardware associated with this platform_device; it was a
virtual device with sole purpose to call snd_soc_register_platform().

This change removes the platform_device completely. Each Samsung DAI now
registers the ASoC 'platform' itself. Machine drivers are adjusted for
the new 'platform' name.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
45 files changed:
arch/arm/mach-exynos/mach-armlex4210.c
arch/arm/mach-exynos/mach-smdkv310.c
arch/arm/mach-s3c24xx/mach-gta02.c
arch/arm/mach-s3c24xx/mach-h1940.c
arch/arm/mach-s3c24xx/mach-mini2440.c
arch/arm/mach-s3c24xx/mach-rx1950.c
arch/arm/mach-s3c64xx/mach-crag6410.c
arch/arm/mach-s3c64xx/mach-smdk6410.c
arch/arm/mach-s5p64x0/mach-smdk6440.c
arch/arm/mach-s5p64x0/mach-smdk6450.c
arch/arm/mach-s5pc100/mach-smdkc100.c
arch/arm/mach-s5pv210/mach-smdkc110.c
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/plat-samsung/devs.c
arch/arm/plat-samsung/include/plat/devs.h
sound/soc/samsung/ac97.c
sound/soc/samsung/bells.c
sound/soc/samsung/dma.c
sound/soc/samsung/dma.h
sound/soc/samsung/goni_wm8994.c
sound/soc/samsung/h1940_uda1380.c
sound/soc/samsung/i2s.c
sound/soc/samsung/jive_wm8750.c
sound/soc/samsung/littlemill.c
sound/soc/samsung/ln2440sbc_alc650.c
sound/soc/samsung/lowland.c
sound/soc/samsung/neo1973_wm8753.c
sound/soc/samsung/pcm.c
sound/soc/samsung/rx1950_uda1380.c
sound/soc/samsung/s3c2412-i2s.c
sound/soc/samsung/s3c24xx-i2s.c
sound/soc/samsung/s3c24xx_simtec_hermes.c
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c
sound/soc/samsung/s3c24xx_uda134x.c
sound/soc/samsung/smartq_wm8987.c
sound/soc/samsung/smdk2443_wm9710.c
sound/soc/samsung/smdk_spdif.c
sound/soc/samsung/smdk_wm8580.c
sound/soc/samsung/smdk_wm8580pcm.c
sound/soc/samsung/smdk_wm8994.c
sound/soc/samsung/smdk_wm8994pcm.c
sound/soc/samsung/smdk_wm9713.c
sound/soc/samsung/spdif.c
sound/soc/samsung/speyside.c
sound/soc/samsung/tobermory.c

index 3f37a5e8a1f450d4d4e6797d0570c51df5b2805c..b938f9fc1dd1288d781241366daaa90d65582907 100644 (file)
@@ -147,7 +147,6 @@ static struct platform_device *armlex4210_devices[] __initdata = {
        &s3c_device_hsmmc3,
        &s3c_device_rtc,
        &s3c_device_wdt,
-       &samsung_asoc_dma,
        &armlex4210_smsc911x,
        &exynos4_device_ahci,
 };
index ee4fb1a9cb7207b226fdffc24f4e4016fafc7618..5de9ee28a50892fad491e5a1425ff448eed9f892 100644 (file)
@@ -311,7 +311,6 @@ static struct platform_device *smdkv310_devices[] __initdata = {
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &exynos4_device_spdif,
-       &samsung_asoc_dma,
        &samsung_asoc_idma,
        &s5p_device_fimd0,
        &smdkv310_device_audio,
index 4a963467b7eeb46b272d13dde73ea652473961d9..973b87ca87f4a065fd212090ab67eb68fbfe5b73 100644 (file)
@@ -521,7 +521,6 @@ static struct platform_device *gta02_devices[] __initdata = {
        &gta02_nor_flash,
        &s3c24xx_pwm_device,
        &s3c_device_iis,
-       &samsung_asoc_dma,
        &s3c_device_i2c0,
        &gta02_dfbmcs320_device,
        &gta02_buttons_device,
index 63aaf076f61198cb6cdad6e69a93c443b46eaa5a..b23dd1b106e8a6d132578097aba863d48750a18c 100644 (file)
@@ -632,7 +632,6 @@ static struct platform_device *h1940_devices[] __initdata = {
        &s3c_device_wdt,
        &s3c_device_i2c0,
        &s3c_device_iis,
-       &samsung_asoc_dma,
        &s3c_device_usbgadget,
        &h1940_device_leds,
        &h1940_device_bluetooth,
index 393c0f1ac11aa38c5921827b9e6229ec61bcea16..a31d5b83e5f77f9218f19b959ea5ccb0f6d0be39 100644 (file)
@@ -519,7 +519,6 @@ static struct platform_device *mini2440_devices[] __initdata = {
        &s3c_device_iis,
        &uda1340_codec,
        &mini2440_audio,
-       &samsung_asoc_dma,
 };
 
 static void __init mini2440_map_io(void)
index 379fde521d3704cee3817aff65e01b7390f0bf3e..0606f2faaa5c5261eaa916fe374aa21f7bb5da4f 100644 (file)
@@ -712,7 +712,6 @@ static struct platform_device *rx1950_devices[] __initdata = {
        &s3c_device_wdt,
        &s3c_device_i2c0,
        &s3c_device_iis,
-       &samsung_asoc_dma,
        &s3c_device_usbgadget,
        &s3c_device_rtc,
        &s3c_device_nand,
index 13b7eaa45fd04de2627e35111526a38737567d5f..ef2117d7391b6423743b3734e8516981d02d052e 100644 (file)
@@ -357,7 +357,6 @@ static struct platform_device *crag6410_devices[] __initdata = {
        &s3c_device_timer[0],
        &s3c64xx_device_iis0,
        &s3c64xx_device_iis1,
-       &samsung_asoc_dma,
        &samsung_device_keypad,
        &crag6410_gpio_keydev,
        &crag6410_dm9k_device,
index da1a771a29e9f1493ce192d35fde34f6fa23ed01..574a9eef588dc4b6fd764449d3893811e27e7c3f 100644 (file)
@@ -275,7 +275,6 @@ static struct platform_device *smdk6410_devices[] __initdata = {
        &s3c_device_fb,
        &s3c_device_ohci,
        &s3c_device_usb_hsotg,
-       &samsung_asoc_dma,
        &s3c64xx_device_iisv4,
        &samsung_device_keypad,
 
index 96ea1fe0ec94a9d3b0393704b9bf63cbd63bf89b..1af823558c60509d571ee0024b9fca2492496ba4 100644 (file)
@@ -165,7 +165,6 @@ static struct platform_device *smdk6440_devices[] __initdata = {
        &s3c_device_i2c1,
        &s3c_device_ts,
        &s3c_device_wdt,
-       &samsung_asoc_dma,
        &s5p6440_device_iis,
        &s3c_device_fb,
        &smdk6440_lcd_lte480wv,
index 12748b6eaa7b8af25e6ab9033a535e61cae98326..62526ccf6b70243be2e6e4c2f5834b7a87f0aedb 100644 (file)
@@ -183,7 +183,6 @@ static struct platform_device *smdk6450_devices[] __initdata = {
        &s3c_device_i2c1,
        &s3c_device_ts,
        &s3c_device_wdt,
-       &samsung_asoc_dma,
        &s5p6450_device_iis0,
        &s3c_device_fb,
        &smdk6450_lcd_lte480wv,
index dba7384a87bde67d48256dd3e0a95cc61735be55..9abe95e806abfe3bd9a85bc6eee3cd964d9d92af 100644 (file)
@@ -197,7 +197,6 @@ static struct platform_device *smdkc100_devices[] __initdata = {
        &s3c_device_ts,
        &s3c_device_wdt,
        &smdkc100_lcd_powerdev,
-       &samsung_asoc_dma,
        &s5pc100_device_iis0,
        &samsung_device_keypad,
        &s5pc100_device_ac97,
index d9c99fcc1aa7fa97e81b1d930e2523457128f836..f1f3bd37ecda7d53db021a9f69d1cc3432b3159f 100644 (file)
@@ -85,7 +85,6 @@ static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = {
 };
 
 static struct platform_device *smdkc110_devices[] __initdata = {
-       &samsung_asoc_dma,
        &s5pv210_device_iis0,
        &s5pv210_device_ac97,
        &s5pv210_device_spdif,
index 4cdb5bb7bbcf024613689228d746b914c9140de5..6bc8404bf6784cfee3751eed9e6fdd0f24b18152 100644 (file)
@@ -234,7 +234,6 @@ static struct platform_device *smdkv210_devices[] __initdata = {
        &s5pv210_device_ac97,
        &s5pv210_device_iis0,
        &s5pv210_device_spdif,
-       &samsung_asoc_dma,
        &samsung_asoc_idma,
        &samsung_device_keypad,
        &smdkv210_dm9000,
index 03f654d55effb2f10355c914ab206730928759f7..7d27a241f98413701f4305b75bd12269b235bb41 100644 (file)
@@ -146,15 +146,6 @@ struct platform_device s3c_device_camif = {
 
 /* ASOC DMA */
 
-struct platform_device samsung_asoc_dma = {
-       .name           = "samsung-audio",
-       .id             = -1,
-       .dev            = {
-               .dma_mask               = &samsung_device_dma_mask,
-               .coherent_dma_mask      = DMA_BIT_MASK(32),
-       }
-};
-
 struct platform_device samsung_asoc_idma = {
        .name           = "samsung-idma",
        .id             = -1,
index 5da4b4f38f40ebb41c076fbe74bd205aefefdacf..c45f70cbbfb701703f6eb1e6fe9cb71d5391d131 100644 (file)
@@ -135,7 +135,6 @@ extern struct platform_device exynos4_device_spdif;
 
 extern struct platform_device exynos_device_drm;
 
-extern struct platform_device samsung_asoc_dma;
 extern struct platform_device samsung_asoc_idma;
 extern struct platform_device samsung_device_keypad;
 
index 386bab1f99abe9d05032dbbe819edddace9fe42f..cd6c7073c50d0cb13d490ff9b68a052008c1bec9 100644 (file)
@@ -462,8 +462,15 @@ static __devinit int s3c_ac97_probe(struct platform_device *pdev)
        if (ret)
                goto err5;
 
-       return 0;
+       ret = asoc_dma_platform_register(&pdev->dev);
+       if (ret) {
+               dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret);
+               goto err6;
+       }
 
+       return 0;
+err6:
+       snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(s3c_ac97_dai));
 err5:
        free_irq(irq_res->start, NULL);
 err4:
@@ -482,6 +489,7 @@ static __devexit int s3c_ac97_remove(struct platform_device *pdev)
 {
        struct resource *mem_res, *irq_res;
 
+       asoc_dma_platform_unregister(&pdev->dev);
        snd_soc_unregister_dais(&pdev->dev, ARRAY_SIZE(s3c_ac97_dai));
 
        irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
index 59ffd6c7ee3037379e99825515ff866adf91f964..01c1c5a2d321b0067b26cfac36fa87024cf4337c 100644 (file)
@@ -233,7 +233,7 @@ static struct snd_soc_dai_link bells_dai_wm2200[] = {
                .stream_name = "CPU-DSP",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm0010-sdi1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "spi0.0",
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
                                | SND_SOC_DAIFMT_CBM_CFM,
@@ -257,7 +257,7 @@ static struct snd_soc_dai_link bells_dai_wm5102[] = {
                .stream_name = "CPU-DSP",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm0010-sdi1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "spi0.0",
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
                                | SND_SOC_DAIFMT_CBM_CFM,
@@ -303,7 +303,7 @@ static struct snd_soc_dai_link bells_dai_wm5110[] = {
                .stream_name = "CPU-DSP",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm0010-sdi1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "spi0.0",
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
                                | SND_SOC_DAIFMT_CBM_CFM,
index b70964ea448cef264bf540597850558e7c9fd23c..64529904a95f4bb3a999ff5d2831a98366e9a0e5 100644 (file)
@@ -432,30 +432,18 @@ static struct snd_soc_platform_driver samsung_asoc_platform = {
        .pcm_free       = dma_free_dma_buffers,
 };
 
-static int __devinit samsung_asoc_platform_probe(struct platform_device *pdev)
+int __devinit asoc_dma_platform_register(struct device *dev)
 {
-       return snd_soc_register_platform(&pdev->dev, &samsung_asoc_platform);
+       return snd_soc_register_platform(dev, &samsung_asoc_platform);
 }
+EXPORT_SYMBOL_GPL(asoc_dma_platform_register);
 
-static int __devexit samsung_asoc_platform_remove(struct platform_device *pdev)
+void __devexit asoc_dma_platform_unregister(struct device *dev)
 {
-       snd_soc_unregister_platform(&pdev->dev);
-       return 0;
+       snd_soc_unregister_platform(dev);
 }
-
-static struct platform_driver asoc_dma_driver = {
-       .driver = {
-               .name = "samsung-audio",
-               .owner = THIS_MODULE,
-       },
-
-       .probe = samsung_asoc_platform_probe,
-       .remove = __devexit_p(samsung_asoc_platform_remove),
-};
-
-module_platform_driver(asoc_dma_driver);
+EXPORT_SYMBOL_GPL(asoc_dma_platform_unregister);
 
 MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
 MODULE_DESCRIPTION("Samsung ASoC DMA Driver");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:samsung-audio");
index 7d1ead77ef2121751269bb74ca80681033f5d00c..73d8c7c8a1e8458119d9c2b5afecece3b64bfe1a 100644 (file)
@@ -21,4 +21,7 @@ struct s3c_dma_params {
        struct samsung_dma_ops *ops;
 };
 
+int asoc_dma_platform_register(struct device *dev);
+void asoc_dma_platform_unregister(struct device *dev);
+
 #endif
index c23c2ae91f58e441ae095ba30f7cbadcd9f1d000..d37ede58e0a8620eb21ba317a8885b7601d02c3b 100644 (file)
@@ -228,7 +228,7 @@ static struct snd_soc_dai_link goni_dai[] = {
        .stream_name = "WM8994 HiFi",
        .cpu_dai_name = "samsung-i2s.0",
        .codec_dai_name = "wm8994-aif1",
-       .platform_name = "samsung-audio",
+       .platform_name = "samsung-i2s.0",
        .codec_name = "wm8994-codec.0-001a",
        .init = goni_wm8994_init,
        .ops = &goni_hifi_ops,
index 6e3257717c54b24c49fa840e8696ccd169612d86..3870e9678b5d2a8a9d843d3f0766628df67bea48 100644 (file)
@@ -207,7 +207,7 @@ static struct snd_soc_dai_link h1940_uda1380_dai[] = {
                .cpu_dai_name   = "s3c24xx-iis",
                .codec_dai_name = "uda1380-hifi",
                .init           = h1940_uda1380_init,
-               .platform_name  = "samsung-audio",
+               .platform_name  = "s3c24xx-iis",
                .codec_name     = "uda1380-codec.0-001a",
                .ops            = &h1940_ops,
        },
index aaf57b7caebb7e625c19c1cded7cbb4cc001341b..0aa0451823ce791b68d9a67fb07baeeb5f740ac0 100644 (file)
@@ -1009,6 +1009,7 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev)
                sec_dai = dev_get_drvdata(&pdev->dev);
                snd_soc_register_dai(&sec_dai->pdev->dev,
                        &sec_dai->i2s_dai_drv);
+               asoc_dma_platform_register(&pdev->dev);
                return 0;
        }
 
@@ -1107,6 +1108,8 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev)
 
        pm_runtime_enable(&pdev->dev);
 
+       asoc_dma_platform_register(&pdev->dev);
+
        return 0;
 err:
        release_mem_region(regs_base, resource_size(res));
@@ -1135,6 +1138,7 @@ static __devexit int samsung_i2s_remove(struct platform_device *pdev)
        i2s->pri_dai = NULL;
        i2s->sec_dai = NULL;
 
+       asoc_dma_platform_unregister(&pdev->dev);
        snd_soc_unregister_dai(&pdev->dev);
 
        return 0;
index 1578663a1faa55de01e5d9110ef41dfe9963f4d4..b5f6abd9d2216d7f9664ca337468ff7792c93b0d 100644 (file)
@@ -118,7 +118,7 @@ static struct snd_soc_dai_link jive_dai = {
        .stream_name    = "WM8750",
        .cpu_dai_name   = "s3c2412-i2s",
        .codec_dai_name = "wm8750-hifi",
-       .platform_name  = "samsung-audio",
+       .platform_name  = "s3c2412-i2s",
        .codec_name     = "wm8750.0-001a",
        .init           = jive_wm8750_init,
        .ops            = &jive_ops,
index ee52c8a007790972a62e9a84bdf196650a27e06b..0908bb05a5e711e03b21d51585ed7d5077a9ef5d 100644 (file)
@@ -145,7 +145,7 @@ static struct snd_soc_dai_link littlemill_dai[] = {
                .stream_name = "CPU",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm8994-aif1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "wm8994-codec",
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
                                | SND_SOC_DAIFMT_CBM_CFM,
index 69c4a5934a4d936c2dc48af9dcf980c987825ed2..9342fc270c2ba2ba62414ad388aaae1e92ad4660 100644 (file)
@@ -28,7 +28,7 @@ static struct snd_soc_dai_link ln2440sbc_dai[] = {
        .cpu_dai_name = "samsung-ac97",
        .codec_dai_name = "ac97-hifi",
        .codec_name = "ac97-codec",
-       .platform_name = "samsung-audio",
+       .platform_name = "samsung-ac97",
 },
 };
 
index 6abf341c4a2ab3f4a224f1161770228dc07da93a..a71c31af4e0ef8c12c01a80b09cf8efccec67c17 100644 (file)
@@ -99,7 +99,7 @@ static struct snd_soc_dai_link lowland_dai[] = {
                .stream_name = "CPU",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm5100-aif1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "wm5100.1-001a",
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
                                SND_SOC_DAIFMT_CBM_CFM,
index 321d51134e47789a02c6d6483a0cb508a5b187c1..c7e965f80d2e41d46b7525cd21992ae8b7aec5d9 100644 (file)
@@ -364,7 +364,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
 { /* Hifi Playback - for similatious use with voice below */
        .name = "WM8753",
        .stream_name = "WM8753 HiFi",
-       .platform_name = "samsung-audio",
+       .platform_name = "s3c24xx-iis",
        .cpu_dai_name = "s3c24xx-iis",
        .codec_dai_name = "wm8753-hifi",
        .codec_name = "wm8753.0-001a",
index 45f4a752d2a007a476bbfdf1aec2efec2f43c2ce..ecd509048771aff073c1e8ae1ba546944b0431d3 100644 (file)
@@ -589,8 +589,16 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
                goto err5;
        }
 
+       ret = asoc_dma_platform_register(&pdev->dev);
+       if (ret) {
+               dev_err(&pdev->dev, "failed to get register DMA: %d\n", ret);
+               goto err6;
+       }
+
        return 0;
 
+err6:
+       snd_soc_unregister_dai(&pdev->dev);
 err5:
        clk_disable_unprepare(pcm->pclk);
        clk_put(pcm->pclk);
@@ -610,6 +618,7 @@ static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev)
        struct s3c_pcm_info *pcm = &s3c_pcm[pdev->id];
        struct resource *mem_res;
 
+       asoc_dma_platform_unregister(&pdev->dev);
        snd_soc_unregister_dai(&pdev->dev);
 
        pm_runtime_disable(&pdev->dev);
index 21e12361a9cd137e1ae595a20c50210dcce9283a..a5826ea9cad63af16d20612155744c42c94320f0 100644 (file)
@@ -85,7 +85,7 @@ static struct snd_soc_dai_link rx1950_uda1380_dai[] = {
                .cpu_dai_name   = "s3c24xx-iis",
                .codec_dai_name = "uda1380-hifi",
                .init           = rx1950_uda1380_init,
-               .platform_name  = "samsung-audio",
+               .platform_name  = "s3c24xx-iis",
                .codec_name     = "uda1380-codec.0-001a",
                .ops            = &rx1950_ops,
        },
index ac7701b3c5dc01a95138b3c5c72ecfe25eeacce5..edf5f527c5a243632d6830be7fae6c9b9a85a08e 100644 (file)
@@ -162,11 +162,29 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
 
 static __devinit int s3c2412_iis_dev_probe(struct platform_device *pdev)
 {
-       return s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai);
+       int ret = 0;
+
+       ret = s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai);
+       if (ret) {
+               pr_err("failed to register the dai\n");
+               return ret;
+       }
+
+       ret = asoc_dma_platform_register(&pdev->dev);
+       if (ret) {
+               pr_err("failed to register the DMA: %d\n", ret);
+               goto err;
+       }
+
+       return 0;
+err:
+       snd_soc_unregister_dai(&pdev->dev);
+       return ret;
 }
 
 static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev)
 {
+       asoc_dma_platform_unregister(&pdev->dev);
        snd_soc_unregister_dai(&pdev->dev);
        return 0;
 }
index 0aae3a3883dc4d348870a8db3aae43fc558065f7..0022d51fd160988d665c24b60032c89228607b93 100644 (file)
@@ -467,11 +467,29 @@ static struct snd_soc_dai_driver s3c24xx_i2s_dai = {
 
 static __devinit int s3c24xx_iis_dev_probe(struct platform_device *pdev)
 {
-       return snd_soc_register_dai(&pdev->dev, &s3c24xx_i2s_dai);
+       int ret = 0;
+
+       ret = s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai);
+       if (ret) {
+               pr_err("failed to register the dai\n");
+               return ret;
+       }
+
+       ret = asoc_dma_platform_register(&pdev->dev);
+       if (ret) {
+               pr_err("failed to register the dma: %d\n", ret);
+               goto err;
+       }
+
+       return 0;
+err:
+       snd_soc_unregister_dai(&pdev->dev);
+       return ret;
 }
 
 static __devexit int s3c24xx_iis_dev_remove(struct platform_device *pdev)
 {
+       asoc_dma_platform_unregister(&pdev->dev);
        snd_soc_unregister_dai(&pdev->dev);
        return 0;
 }
index 7ace6a87f41b5e673a49f87f1e659be6ea11cd73..befabe8979f7b8ca84871eca4f962bf05076e702 100644 (file)
@@ -82,7 +82,7 @@ static struct snd_soc_dai_link simtec_dai_aic33 = {
        .codec_name     = "tlv320aic3x-codec.0-001a",
        .cpu_dai_name   = "s3c24xx-iis",
        .codec_dai_name = "tlv320aic3x-hifi",
-       .platform_name  = "samsung-audio",
+       .platform_name  = "s3c24xx-iis",
        .init           = simtec_hermes_init,
 };
 
index c42d5f00b0e1cc2cdc75bfcd625bc02a35aa7825..5552f82c92a7ece30e5320053ab96b946f1400d8 100644 (file)
@@ -71,7 +71,7 @@ static struct snd_soc_dai_link simtec_dai_aic23 = {
        .codec_name     = "tlv320aic3x-codec.0-001a",
        .cpu_dai_name   = "s3c24xx-iis",
        .codec_dai_name = "tlv320aic3x-hifi",
-       .platform_name  = "samsung-audio",
+       .platform_name  = "s3c24xx-iis",
        .init           = simtec_tlv320aic23_init,
 };
 
index d731042e51b07db12aff2adc6685d97f3af6e00e..333e1b7f06c799307d2f9d7b46fc14074bd04caa 100644 (file)
@@ -224,7 +224,7 @@ static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = {
        .codec_dai_name = "uda134x-hifi",
        .cpu_dai_name = "s3c24xx-iis",
        .ops = &s3c24xx_uda134x_ops,
-       .platform_name  = "samsung-audio",
+       .platform_name  = "s3c24xx-iis",
 };
 
 static struct snd_soc_card snd_soc_s3c24xx_uda134x = {
index f2dcb424ea255056aa6f3dbe224d9f0bfe14dfe7..58ae3237ef6945c0f4e29f890ad5ddc8bd526fac 100644 (file)
@@ -189,7 +189,7 @@ static struct snd_soc_dai_link smartq_dai[] = {
                .stream_name    = "SmartQ Hi-Fi",
                .cpu_dai_name   = "samsung-i2s.0",
                .codec_dai_name = "wm8750-hifi",
-               .platform_name  = "samsung-audio",
+               .platform_name  = "samsung-i2s.0",
                .codec_name     = "wm8750.0-0x1a",
                .init           = smartq_wm8987_init,
                .ops            = &smartq_hifi_ops,
index 720ba29bb7e4174e0929a77490f55b7f72c88f09..c390aad68cfbcf729292d3797a9c3e0340fac4bd 100644 (file)
@@ -24,7 +24,7 @@ static struct snd_soc_dai_link smdk2443_dai[] = {
        .cpu_dai_name = "samsung-ac97",
        .codec_dai_name = "ac97-hifi",
        .codec_name = "ac97-codec",
-       .platform_name = "samsung-audio",
+       .platform_name = "samsung-ac97",
 },
 };
 
index beaa9c15d6978c64f3899596a7239f829fddb63d..a2f2363fe1c29d136434121377ccb5d3f4363f71 100644 (file)
@@ -151,7 +151,7 @@ static struct snd_soc_ops smdk_spdif_ops = {
 static struct snd_soc_dai_link smdk_dai = {
        .name = "S/PDIF",
        .stream_name = "S/PDIF PCM Playback",
-       .platform_name = "samsung-audio",
+       .platform_name = "samsung-spdif",
        .cpu_dai_name = "samsung-spdif",
        .codec_dai_name = "dit-hifi",
        .codec_name = "spdif-dit",
index ade2809cf393eebc97d74952b44c65aaa35835ac..7e2b710763be05c96537214189612fae3c538aa9 100644 (file)
@@ -176,7 +176,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .stream_name = "Playback",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm8580-hifi-playback",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "wm8580.0-001b",
                .ops = &smdk_ops,
        },
@@ -185,7 +185,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .stream_name = "Capture",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm8580-hifi-capture",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "wm8580.0-001b",
                .init = smdk_wm8580_init_paiftx,
                .ops = &smdk_ops,
@@ -195,7 +195,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .stream_name = "Playback",
                .cpu_dai_name = "samsung-i2s.x",
                .codec_dai_name = "wm8580-hifi-playback",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.x",
                .codec_name = "wm8580.0-001b",
                .ops = &smdk_ops,
        },
index fab5322e9f055002a3acb8a1d6b0bae06f457f38..34239fe9afde3db1dc9a5b798a9db7a17ca7a745 100644 (file)
@@ -135,7 +135,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .stream_name = "Capture",
                .cpu_dai_name = "samsung-pcm.0",
                .codec_dai_name = "wm8580-hifi-capture",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-pcm.0",
                .codec_name = "wm8580.0-001b",
                .ops = &smdk_wm8580_pcm_ops,
        },
index 48dd4dd9ee08dc7f51c6e523e633f52e922307fb..dd0aa8cb1a9e6a1f40476c39addf1a676bfa1a97 100644 (file)
@@ -127,7 +127,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .stream_name = "Pri_Dai",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm8994-aif1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "wm8994-codec",
                .init = smdk_wm8994_init_paiftx,
                .ops = &smdk_ops,
@@ -136,7 +136,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .stream_name = "Sec_Dai",
                .cpu_dai_name = "samsung-i2s.4",
                .codec_dai_name = "wm8994-aif1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.4",
                .codec_name = "wm8994-codec",
                .ops = &smdk_ops,
        },
index 77ecba9351193c0ad2a8e6c6951449192e7bf3d2..15f6b44e9de37d658ace50270ea275d82d88f62e 100644 (file)
@@ -116,7 +116,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .stream_name = "Primary PCM",
                .cpu_dai_name = "samsung-pcm.0",
                .codec_dai_name = "wm8994-aif1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-pcm.0",
                .codec_name = "wm8994-codec",
                .ops = &smdk_wm8994_pcm_ops,
        },
index 55b2ca7f3290a624d1b63145eb5997eafa770e7e..0d20e4ed27aacd4bf4ce989ad0eada0a25191765 100644 (file)
@@ -42,7 +42,7 @@ static struct snd_soc_card smdk;
 static struct snd_soc_dai_link smdk_dai = {
        .name = "AC97",
        .stream_name = "AC97 PCM",
-       .platform_name = "samsung-audio",
+       .platform_name = "samsung-ac97",
        .cpu_dai_name = "samsung-ac97",
        .codec_dai_name = "wm9713-hifi",
        .codec_name = "wm9713-codec",
index 5f3b06d36e9cfcd24cb84e26c78e5937e76836ad..8606fc6cb37d11f8c6ecc2e717b81c2798152016 100644 (file)
@@ -437,8 +437,15 @@ static __devinit int spdif_probe(struct platform_device *pdev)
 
        spdif->dma_playback = &spdif_stereo_out;
 
-       return 0;
+       ret = asoc_dma_platform_register(&pdev->dev);
+       if (ret) {
+               dev_err(&pdev->dev, "failed to register DMA: %d\n", ret);
+               goto err5;
+       }
 
+       return 0;
+err5:
+       snd_soc_unregister_dai(&pdev->dev);
 err4:
        iounmap(spdif->regs);
 err3:
@@ -458,6 +465,7 @@ static __devexit int spdif_remove(struct platform_device *pdev)
        struct samsung_spdif_info *spdif = &spdif_info;
        struct resource *mem_res;
 
+       asoc_dma_platform_unregister(&pdev->dev);
        snd_soc_unregister_dai(&pdev->dev);
 
        iounmap(spdif->regs);
index c7e1c28528a4a6861593539a30afa1e41de30dd6..d7906a144195f809dde6fc484f3a15b2245df051 100644 (file)
@@ -198,7 +198,7 @@ static struct snd_soc_dai_link speyside_dai[] = {
                .stream_name = "CPU-DSP",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm0010-sdi1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "spi0.0",
                .init = speyside_wm0010_init,
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
index 9199649bf78628db3bab47a61f1fb02ffa2e4902..42e4c8e6b03ed5cacbe9bcd60223fc474dbdaf66 100644 (file)
@@ -110,7 +110,7 @@ static struct snd_soc_dai_link tobermory_dai[] = {
                .stream_name = "CPU",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm8962",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-i2s.0",
                .codec_name = "wm8962.1-001a",
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
                                | SND_SOC_DAIFMT_CBM_CFM,