diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-25 10:00:30 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-25 10:00:30 +0200 |
commit | aa5c14d5c0d3e4c587db4a1b220b9c86415c538f (patch) | |
tree | 0114637e8be2b38176e7e91e6cea3501b22cb66a /sound/soc/omap/omap2evm.c | |
parent | 79fc84c7e0d2fe89c4e82f3a26fd8b0d13c31703 (diff) | |
parent | b11bdb5254ff17cb63e4ae5088b73fdcd2cc2602 (diff) |
Merge branch 'topic/asoc' into for-linus
Conflicts:
arch/powerpc/platforms/85xx/p1022_ds.c
Diffstat (limited to 'sound/soc/omap/omap2evm.c')
-rw-r--r-- | sound/soc/omap/omap2evm.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/sound/soc/omap/omap2evm.c b/sound/soc/omap/omap2evm.c index c7adea38274c..cf3fc8a675b5 100644 --- a/sound/soc/omap/omap2evm.c +++ b/sound/soc/omap/omap2evm.c @@ -35,15 +35,13 @@ #include "omap-mcbsp.h" #include "omap-pcm.h" -#include "../codecs/twl4030.h" static int omap2evm_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params, - struct snd_soc_dai *dai) + 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; int ret; /* Set codec DAI configuration */ @@ -85,35 +83,28 @@ static struct snd_soc_ops omap2evm_ops = { static struct snd_soc_dai_link omap2evm_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", + .codec_dai_name = "twl4030-hifi", + .platform_name = "omap-pcm-audio", + .codec_name = "twl4030-codec", .ops = &omap2evm_ops, }; /* Audio machine driver */ static struct snd_soc_card snd_soc_omap2evm = { .name = "omap2evm", - .platform = &omap_soc_platform, .dai_link = &omap2evm_dai, .num_links = 1, }; -/* Audio subsystem */ -static struct snd_soc_device omap2evm_snd_devdata = { - .card = &snd_soc_omap2evm, - .codec_dev = &soc_codec_dev_twl4030, -}; - static struct platform_device *omap2evm_snd_device; static int __init omap2evm_soc_init(void) { int ret; - if (!machine_is_omap2evm()) { - pr_debug("Not omap2evm!\n"); + if (!machine_is_omap2evm()) return -ENODEV; - } printk(KERN_INFO "omap2evm SoC init\n"); omap2evm_snd_device = platform_device_alloc("soc-audio", -1); @@ -122,9 +113,7 @@ static int __init omap2evm_soc_init(void) return -ENOMEM; } - platform_set_drvdata(omap2evm_snd_device, &omap2evm_snd_devdata); - omap2evm_snd_devdata.dev = &omap2evm_snd_device->dev; - *(unsigned int *)omap2evm_dai.cpu_dai->private_data = 1; /* McBSP2 */ + platform_set_drvdata(omap2evm_snd_device, &snd_soc_omap2evm); ret = platform_device_add(omap2evm_snd_device); if (ret) |