]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/soc/omap/omap3beagle.c
Merge branch 'master' into csb1725
[mv-sheeva.git] / sound / soc / omap / omap3beagle.c
index 240e0975dd6a716e47546a54deb83cecffb9b960..e56832b0c444083def074b75f3c788d9c89d07d3 100644 (file)
 
 #include "omap-mcbsp.h"
 #include "omap-pcm.h"
-#include "../codecs/twl4030.h"
 
 static int omap3beagle_hw_params(struct snd_pcm_substream *substream,
        struct snd_pcm_hw_params *params)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
-       struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+       struct snd_soc_dai *codec_dai = rtd->codec_dai;
+       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        unsigned int fmt;
        int ret;
 
@@ -92,35 +91,29 @@ static struct snd_soc_ops omap3beagle_ops = {
 static struct snd_soc_dai_link omap3beagle_dai = {
        .name = "TWL4030",
        .stream_name = "TWL4030",
-       .cpu_dai = &omap_mcbsp_dai[0],
-       .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI],
+       .cpu_dai_name = "omap-mcbsp-dai.1",
+       .platform_name = "omap-pcm-audio",
+       .codec_dai_name = "twl4030-hifi",
+       .codec_name = "twl4030-codec",
        .ops = &omap3beagle_ops,
 };
 
 /* Audio machine driver */
 static struct snd_soc_card snd_soc_omap3beagle = {
        .name = "omap3beagle",
-       .platform = &omap_soc_platform,
+       .owner = THIS_MODULE,
        .dai_link = &omap3beagle_dai,
        .num_links = 1,
 };
 
-/* Audio subsystem */
-static struct snd_soc_device omap3beagle_snd_devdata = {
-       .card = &snd_soc_omap3beagle,
-       .codec_dev = &soc_codec_dev_twl4030,
-};
-
 static struct platform_device *omap3beagle_snd_device;
 
 static int __init omap3beagle_soc_init(void)
 {
        int ret;
 
-       if (!(machine_is_omap3_beagle() || machine_is_devkit8000())) {
-               pr_debug("Not OMAP3 Beagle or Devkit8000!\n");
+       if (!(machine_is_omap3_beagle() || machine_is_devkit8000()))
                return -ENODEV;
-       }
        pr_info("OMAP3 Beagle/Devkit8000 SoC init\n");
 
        omap3beagle_snd_device = platform_device_alloc("soc-audio", -1);
@@ -129,9 +122,7 @@ static int __init omap3beagle_soc_init(void)
                return -ENOMEM;
        }
 
-       platform_set_drvdata(omap3beagle_snd_device, &omap3beagle_snd_devdata);
-       omap3beagle_snd_devdata.dev = &omap3beagle_snd_device->dev;
-       *(unsigned int *)omap3beagle_dai.cpu_dai->private_data = 1; /* McBSP2 */
+       platform_set_drvdata(omap3beagle_snd_device, &snd_soc_omap3beagle);
 
        ret = platform_device_add(omap3beagle_snd_device);
        if (ret)