]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - sound/soc/pxa/e800_wm9712.c
ASoC: multi-component - ASoC Multi-Component Support
[karo-tx-linux.git] / sound / soc / pxa / e800_wm9712.c
index bc019cdce42922c787f62dfd8bc30cd7a0582d25..d42e5fe832c5d5909176feaa5b3513e95e4b6f85 100644 (file)
@@ -23,7 +23,6 @@
 #include <mach/eseries-gpio.h>
 
 #include "../codecs/wm9712.h"
-#include "pxa2xx-pcm.h"
 #include "pxa2xx-ac97.h"
 
 static int e800_spk_amp_event(struct snd_soc_dapm_widget *w,
@@ -73,8 +72,10 @@ static const struct snd_soc_dapm_route audio_map[] = {
        {"MIC2", NULL, "Mic (Internal2)"},
 };
 
-static int e800_ac97_init(struct snd_soc_codec *codec)
+static int e800_ac97_init(struct snd_soc_pcm_runtime *rtd)
 {
+       struct snd_soc_codec *codec = rtd->codec;
+
        snd_soc_dapm_new_controls(codec, e800_dapm_widgets,
                                        ARRAY_SIZE(e800_dapm_widgets));
 
@@ -88,30 +89,28 @@ static struct snd_soc_dai_link e800_dai[] = {
        {
                .name = "AC97",
                .stream_name = "AC97 HiFi",
-               .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_HIFI],
-               .codec_dai = &wm9712_dai[WM9712_DAI_AC97_HIFI],
+               .cpu_dai_name = "pxa-ac97.0",
+               .codec_dai_name = "wm9712-hifi",
+               .platform_name = "pxa-pcm-audio",
+               .codec_name = "wm9712-codec",
                .init = e800_ac97_init,
        },
        {
                .name = "AC97 Aux",
                .stream_name = "AC97 Aux",
-               .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_AUX],
-               .codec_dai = &wm9712_dai[WM9712_DAI_AC97_AUX],
+               .cpu_dai_name = "pxa-ac97.1",
+               .codec_dai_name ="wm9712-aux",
+               .platform_name = "pxa-pcm-audio",
+               .codec_name = "wm9712-codec",
        },
 };
 
 static struct snd_soc_card e800 = {
        .name = "Toshiba e800",
-       .platform = &pxa2xx_soc_platform,
        .dai_link = e800_dai,
        .num_links = ARRAY_SIZE(e800_dai),
 };
 
-static struct snd_soc_device e800_snd_devdata = {
-       .card = &e800,
-       .codec_dev = &soc_codec_dev_wm9712,
-};
-
 static struct platform_device *e800_snd_device;
 
 static int __init e800_init(void)
@@ -141,8 +140,7 @@ static int __init e800_init(void)
        if (!e800_snd_device)
                return -ENOMEM;
 
-       platform_set_drvdata(e800_snd_device, &e800_snd_devdata);
-       e800_snd_devdata.dev = &e800_snd_device->dev;
+       platform_set_drvdata(e800_snd_device, &e800);
        ret = platform_device_add(e800_snd_device);
 
        if (!ret)