aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap3beagle.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/omap3beagle.c')
-rw-r--r--sound/soc/omap/omap3beagle.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/sound/soc/omap/omap3beagle.c b/sound/soc/omap/omap3beagle.c
index 240e0975dd6a..7c11e1afe9e6 100644
--- a/sound/soc/omap/omap3beagle.c
+++ b/sound/soc/omap/omap3beagle.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 omap3beagle_hw_params(struct snd_pcm_substream *substream, 37static int omap3beagle_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 unsigned int fmt; 43 unsigned int fmt;
45 int ret; 44 int ret;
46 45
@@ -92,25 +91,21 @@ static struct snd_soc_ops omap3beagle_ops = {
92static struct snd_soc_dai_link omap3beagle_dai = { 91static struct snd_soc_dai_link omap3beagle_dai = {
93 .name = "TWL4030", 92 .name = "TWL4030",
94 .stream_name = "TWL4030", 93 .stream_name = "TWL4030",
95 .cpu_dai = &omap_mcbsp_dai[0], 94 .cpu_dai_name = "omap-mcbsp-dai.1",
96 .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], 95 .platform_name = "omap-pcm-audio",
96 .codec_dai_name = "twl4030-hifi",
97 .codec_name = "twl4030-codec",
97 .ops = &omap3beagle_ops, 98 .ops = &omap3beagle_ops,
98}; 99};
99 100
100/* Audio machine driver */ 101/* Audio machine driver */
101static struct snd_soc_card snd_soc_omap3beagle = { 102static struct snd_soc_card snd_soc_omap3beagle = {
102 .name = "omap3beagle", 103 .name = "omap3beagle",
103 .platform = &omap_soc_platform, 104 .owner = THIS_MODULE,
104 .dai_link = &omap3beagle_dai, 105 .dai_link = &omap3beagle_dai,
105 .num_links = 1, 106 .num_links = 1,
106}; 107};
107 108
108/* Audio subsystem */
109static struct snd_soc_device omap3beagle_snd_devdata = {
110 .card = &snd_soc_omap3beagle,
111 .codec_dev = &soc_codec_dev_twl4030,
112};
113
114static struct platform_device *omap3beagle_snd_device; 109static struct platform_device *omap3beagle_snd_device;
115 110
116static int __init omap3beagle_soc_init(void) 111static int __init omap3beagle_soc_init(void)
@@ -129,9 +124,7 @@ static int __init omap3beagle_soc_init(void)
129 return -ENOMEM; 124 return -ENOMEM;
130 } 125 }
131 126
132 platform_set_drvdata(omap3beagle_snd_device, &omap3beagle_snd_devdata); 127 platform_set_drvdata(omap3beagle_snd_device, &snd_soc_omap3beagle);
133 omap3beagle_snd_devdata.dev = &omap3beagle_snd_device->dev;
134 *(unsigned int *)omap3beagle_dai.cpu_dai->private_data = 1; /* McBSP2 */
135 128
136 ret = platform_device_add(omap3beagle_snd_device); 129 ret = platform_device_add(omap3beagle_snd_device);
137 if (ret) 130 if (ret)