aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/overo.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/overo.c')
-rw-r--r--sound/soc/omap/overo.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/sound/soc/omap/overo.c b/sound/soc/omap/overo.c
index c25f5276ad6f..e95a607937de 100644
--- a/sound/soc/omap/overo.c
+++ b/sound/soc/omap/overo.c
@@ -33,14 +33,13 @@
33 33
34#include "omap-mcbsp.h" 34#include "omap-mcbsp.h"
35#include "omap-pcm.h" 35#include "omap-pcm.h"
36#include "../codecs/twl4030.h"
37 36
38static int overo_hw_params(struct snd_pcm_substream *substream, 37static int overo_hw_params(struct snd_pcm_substream *substream,
39 struct snd_pcm_hw_params *params) 38 struct snd_pcm_hw_params *params)
40{ 39{
41 struct snd_soc_pcm_runtime *rtd = substream->private_data; 40 struct snd_soc_pcm_runtime *rtd = substream->private_data;
42 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 41 struct snd_soc_dai *codec_dai = rtd->codec_dai;
43 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 42 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
44 int ret; 43 int ret;
45 44
46 /* Set codec DAI configuration */ 45 /* Set codec DAI configuration */
@@ -82,25 +81,20 @@ static struct snd_soc_ops overo_ops = {
82static struct snd_soc_dai_link overo_dai = { 81static struct snd_soc_dai_link overo_dai = {
83 .name = "TWL4030", 82 .name = "TWL4030",
84 .stream_name = "TWL4030", 83 .stream_name = "TWL4030",
85 .cpu_dai = &omap_mcbsp_dai[0], 84 .cpu_dai_name = "omap-mcbsp-dai.1",
86 .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], 85 .codec_dai_name = "twl4030-hifi",
86 .platform_name = "omap-pcm-audio",
87 .codec_name = "twl4030-codec",
87 .ops = &overo_ops, 88 .ops = &overo_ops,
88}; 89};
89 90
90/* Audio machine driver */ 91/* Audio machine driver */
91static struct snd_soc_card snd_soc_card_overo = { 92static struct snd_soc_card snd_soc_card_overo = {
92 .name = "overo", 93 .name = "overo",
93 .platform = &omap_soc_platform,
94 .dai_link = &overo_dai, 94 .dai_link = &overo_dai,
95 .num_links = 1, 95 .num_links = 1,
96}; 96};
97 97
98/* Audio subsystem */
99static struct snd_soc_device overo_snd_devdata = {
100 .card = &snd_soc_card_overo,
101 .codec_dev = &soc_codec_dev_twl4030,
102};
103
104static struct platform_device *overo_snd_device; 98static struct platform_device *overo_snd_device;
105 99
106static int __init overo_soc_init(void) 100static int __init overo_soc_init(void)
@@ -119,9 +113,7 @@ static int __init overo_soc_init(void)
119 return -ENOMEM; 113 return -ENOMEM;
120 } 114 }
121 115
122 platform_set_drvdata(overo_snd_device, &overo_snd_devdata); 116 platform_set_drvdata(overo_snd_device, &snd_soc_card_overo);
123 overo_snd_devdata.dev = &overo_snd_device->dev;
124 *(unsigned int *)overo_dai.cpu_dai->private_data = 1; /* McBSP2 */
125 117
126 ret = platform_device_add(overo_snd_device); 118 ret = platform_device_add(overo_snd_device);
127 if (ret) 119 if (ret)