diff options
Diffstat (limited to 'sound/soc/omap/omap3evm.c')
-rw-r--r-- | sound/soc/omap/omap3evm.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c index dfcb344092e4..1ac5babef00d 100644 --- a/sound/soc/omap/omap3evm.c +++ b/sound/soc/omap/omap3evm.c | |||
@@ -31,14 +31,13 @@ | |||
31 | 31 | ||
32 | #include "omap-mcbsp.h" | 32 | #include "omap-mcbsp.h" |
33 | #include "omap-pcm.h" | 33 | #include "omap-pcm.h" |
34 | #include "../codecs/twl4030.h" | ||
35 | 34 | ||
36 | static int omap3evm_hw_params(struct snd_pcm_substream *substream, | 35 | static int omap3evm_hw_params(struct snd_pcm_substream *substream, |
37 | struct snd_pcm_hw_params *params) | 36 | struct snd_pcm_hw_params *params) |
38 | { | 37 | { |
39 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 38 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
40 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 39 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
41 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 40 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
42 | int ret; | 41 | int ret; |
43 | 42 | ||
44 | /* Set codec DAI configuration */ | 43 | /* Set codec DAI configuration */ |
@@ -80,32 +79,20 @@ static struct snd_soc_ops omap3evm_ops = { | |||
80 | static struct snd_soc_dai_link omap3evm_dai = { | 79 | static struct snd_soc_dai_link omap3evm_dai = { |
81 | .name = "TWL4030", | 80 | .name = "TWL4030", |
82 | .stream_name = "TWL4030", | 81 | .stream_name = "TWL4030", |
83 | .cpu_dai = &omap_mcbsp_dai[0], | 82 | .cpu_dai_name = "omap-mcbsp-dai.1", |
84 | .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], | 83 | .codec_dai_name = "twl4030-hifi", |
84 | .platform_name = "omap-pcm-audio", | ||
85 | .codec_name = "twl4030-codec", | ||
85 | .ops = &omap3evm_ops, | 86 | .ops = &omap3evm_ops, |
86 | }; | 87 | }; |
87 | 88 | ||
88 | /* Audio machine driver */ | 89 | /* Audio machine driver */ |
89 | static struct snd_soc_card snd_soc_omap3evm = { | 90 | static struct snd_soc_card snd_soc_omap3evm = { |
90 | .name = "omap3evm", | 91 | .name = "omap3evm", |
91 | .platform = &omap_soc_platform, | ||
92 | .dai_link = &omap3evm_dai, | 92 | .dai_link = &omap3evm_dai, |
93 | .num_links = 1, | 93 | .num_links = 1, |
94 | }; | 94 | }; |
95 | 95 | ||
96 | /* twl4030 setup */ | ||
97 | static struct twl4030_setup_data twl4030_setup = { | ||
98 | .ramp_delay_value = 4, | ||
99 | .sysclk = 26000, | ||
100 | }; | ||
101 | |||
102 | /* Audio subsystem */ | ||
103 | static struct snd_soc_device omap3evm_snd_devdata = { | ||
104 | .card = &snd_soc_omap3evm, | ||
105 | .codec_dev = &soc_codec_dev_twl4030, | ||
106 | .codec_data = &twl4030_setup, | ||
107 | }; | ||
108 | |||
109 | static struct platform_device *omap3evm_snd_device; | 96 | static struct platform_device *omap3evm_snd_device; |
110 | 97 | ||
111 | static int __init omap3evm_soc_init(void) | 98 | static int __init omap3evm_soc_init(void) |
@@ -124,10 +111,7 @@ static int __init omap3evm_soc_init(void) | |||
124 | return -ENOMEM; | 111 | return -ENOMEM; |
125 | } | 112 | } |
126 | 113 | ||
127 | platform_set_drvdata(omap3evm_snd_device, &omap3evm_snd_devdata); | 114 | platform_set_drvdata(omap3evm_snd_device, &snd_soc_omap3evm); |
128 | omap3evm_snd_devdata.dev = &omap3evm_snd_device->dev; | ||
129 | *(unsigned int *)omap3evm_dai.cpu_dai->private_data = 1; | ||
130 | |||
131 | ret = platform_device_add(omap3evm_snd_device); | 115 | ret = platform_device_add(omap3evm_snd_device); |
132 | if (ret) | 116 | if (ret) |
133 | goto err1; | 117 | goto err1; |