.cpu_dai_name = "davinci-mcbsp",
.codec_dai_name = "tlv320aic3x-hifi",
.codec_name = "tlv320aic3x-codec.1-001b",
- .platform_name = "davinci-pcm-audio",
+ .platform_name = "davinci-mcbsp",
.init = evm_aic3x_init,
.ops = &evm_ops,
};
.cpu_dai_name = "davinci-mcbsp.1",
.codec_dai_name = "tlv320aic3x-hifi",
.codec_name = "tlv320aic3x-codec.1-001b",
- .platform_name = "davinci-pcm-audio",
+ .platform_name = "davinci-mcbsp.1",
.init = evm_aic3x_init,
.ops = &evm_ops,
};
.init = evm_aic3x_init,
.codec_name = "tlv320aic3x-codec.1-0018",
.ops = &evm_ops,
+ .platform_name = "davinci-mcbsp",
#elif defined(CONFIG_SND_DM365_VOICE_CODEC)
.name = "Voice Codec - CQ93VC",
.stream_name = "CQ93",
.cpu_dai_name = "davinci-vcif",
.codec_dai_name = "cq93vc-hifi",
.codec_name = "cq93vc-codec",
+ .platform_name = "avinci-vcif",
#endif
- .platform_name = "davinci-pcm-audio",
};
static struct snd_soc_dai_link dm6467_evm_dai[] = {
.stream_name = "AIC3X",
.cpu_dai_name= "davinci-mcasp.0",
.codec_dai_name = "tlv320aic3x-hifi",
- .platform_name ="davinci-pcm-audio",
+ .platform_name = "davinci-mcasp.0",
.codec_name = "tlv320aic3x-codec.0-001a",
.init = evm_aic3x_init,
.ops = &evm_ops,
.cpu_dai_name= "davinci-mcasp.1",
.codec_dai_name = "dit-hifi",
.codec_name = "spdif_dit",
- .platform_name = "davinci-pcm-audio",
+ .platform_name = "davinci-mcasp.1",
.ops = &evm_spdif_ops,
},
};
.cpu_dai_name = "davinci-mcasp.1",
.codec_dai_name = "tlv320aic3x-hifi",
.codec_name = "tlv320aic3x-codec.1-0018",
- .platform_name = "davinci-pcm-audio",
+ .platform_name = "davinci-mcasp.1",
.init = evm_aic3x_init,
.ops = &evm_ops,
};
.cpu_dai_name= "davinci-mcasp.0",
.codec_dai_name = "tlv320aic3x-hifi",
.codec_name = "tlv320aic3x-codec.1-0018",
- .platform_name = "davinci-pcm-audio",
+ .platform_name = "davinci-mcasp.0",
.init = evm_aic3x_init,
.ops = &evm_ops,
};
if (ret != 0)
goto err_release_clk;
+
+ ret = davinci_soc_platform_register(&pdev->dev);
+ if (ret) {
+ dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
+ goto err_unregister_dai;
+ }
+
return 0;
+err_unregister_dai:
+ snd_soc_unregister_dai(&pdev->dev);
err_release_clk:
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
{
snd_soc_unregister_dai(&pdev->dev);
+ davinci_soc_platform_unregister(&pdev->dev);
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
.pcm_free = davinci_pcm_free,
};
-static int __devinit davinci_soc_platform_probe(struct platform_device *pdev)
+int davinci_soc_platform_register(struct device *dev)
{
- return snd_soc_register_platform(&pdev->dev, &davinci_soc_platform);
+ return snd_soc_register_platform(dev, &davinci_soc_platform);
}
+EXPORT_SYMBOL_GPL(davinci_soc_platform_register);
-static int __devexit davinci_soc_platform_remove(struct platform_device *pdev)
+void davinci_soc_platform_unregister(struct device *dev)
{
- snd_soc_unregister_platform(&pdev->dev);
- return 0;
+ snd_soc_unregister_platform(dev);
}
-
-static struct platform_driver davinci_pcm_driver = {
- .driver = {
- .name = "davinci-pcm-audio",
- .owner = THIS_MODULE,
- },
-
- .probe = davinci_soc_platform_probe,
- .remove = __devexit_p(davinci_soc_platform_remove),
-};
-
-module_platform_driver(davinci_pcm_driver);
+EXPORT_SYMBOL_GPL(davinci_soc_platform_unregister);
MODULE_AUTHOR("Vladimir Barinov");
MODULE_DESCRIPTION("TI DAVINCI PCM DMA module");