aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/s3c24xx-i2s.c
diff options
context:
space:
mode:
authorPadmavathi Venna <padma.v@samsung.com>2012-12-07 13:59:21 +0530
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-07 19:36:07 +0900
commita08485d8fdf6f67ca5f173b68d8f873c574745f2 (patch)
treefac9dbea634fef912a5e74434110ad769b8c963f /sound/soc/samsung/s3c24xx-i2s.c
parentASoC: Samsung: Get I2S src_clk from clock alias id. (diff)
downloadlinux-dev-a08485d8fdf6f67ca5f173b68d8f873c574745f2.tar.xz
linux-dev-a08485d8fdf6f67ca5f173b68d8f873c574745f2.zip
ASoC: Samsung: Do not register samsung audio dma device as pdev
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>
Diffstat (limited to 'sound/soc/samsung/s3c24xx-i2s.c')
-rw-r--r--sound/soc/samsung/s3c24xx-i2s.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 0aae3a3883dc..0022d51fd160 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -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;
}