aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-12-07 08:54:50 -0500
committerPeter Ujfalusi <peter.ujfalusi@ti.com>2012-01-26 08:39:05 -0500
commit13f81d65959eb3512b39e8c338e81e018d1c515b (patch)
treeada0cd4a047e93bd40e7b7db77d4cc18f4026d7e /sound/soc/omap
parente15422edd463fbba7f38ffd8a2e2ca8564da1160 (diff)
ASoC: omap-abe-twl6040: Correct internal prefix, Kconfig entry
Change the internal prefixes within the driver from sdp4430. At he same time correct the Kconfig text as well. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/Kconfig7
-rw-r--r--sound/soc/omap/omap-abe-twl6040.c65
2 files changed, 37 insertions, 35 deletions
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 4eae92987fe8..98410b833f1b 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -98,15 +98,16 @@ config SND_OMAP_SOC_SDP3430
98 SDP3430. 98 SDP3430.
99 99
100config SND_OMAP_SOC_OMAP_ABE_TWL6040 100config SND_OMAP_SOC_OMAP_ABE_TWL6040
101 tristate "SoC Audio support for Texas Instruments SDP4430" 101 tristate "SoC Audio support for OMAP boards using ABE and twl6040 codec"
102 depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP_4430SDP 102 depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP_4430SDP
103 select SND_OMAP_SOC_DMIC 103 select SND_OMAP_SOC_DMIC
104 select SND_OMAP_SOC_MCPDM 104 select SND_OMAP_SOC_MCPDM
105 select SND_SOC_TWL6040 105 select SND_SOC_TWL6040
106 select SND_SOC_DMIC 106 select SND_SOC_DMIC
107 help 107 help
108 Say Y if you want to add support for SoC audio on Texas Instruments 108 Say Y if you want to add support for SoC audio on OMAP boards using
109 SDP4430. 109 ABE and twl6040 codec. This driver currently supports:
110 - SDP4430/Blaze boards
110 111
111config SND_OMAP_SOC_OMAP4_HDMI 112config SND_OMAP_SOC_OMAP4_HDMI
112 tristate "SoC Audio support for Texas Instruments OMAP4 HDMI" 113 tristate "SoC Audio support for Texas Instruments OMAP4 HDMI"
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
index ceadb137bf4f..376ca351e092 100644
--- a/sound/soc/omap/omap-abe-twl6040.c
+++ b/sound/soc/omap/omap-abe-twl6040.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * sdp4430.c -- SoC audio for TI OMAP4430 SDP 2 * omap-abe-twl6040.c -- SoC audio for TI OMAP based boards with ABE and
3 * twl6040 codec
3 * 4 *
4 * Author: Misael Lopez Cruz <misael.lopez@ti.com> 5 * Author: Misael Lopez Cruz <misael.lopez@ti.com>
5 * 6 *
@@ -38,7 +39,7 @@
38#include "omap-pcm.h" 39#include "omap-pcm.h"
39#include "../codecs/twl6040.h" 40#include "../codecs/twl6040.h"
40 41
41static int sdp4430_hw_params(struct snd_pcm_substream *substream, 42static int omap_abe_hw_params(struct snd_pcm_substream *substream,
42 struct snd_pcm_hw_params *params) 43 struct snd_pcm_hw_params *params)
43{ 44{
44 struct snd_soc_pcm_runtime *rtd = substream->private_data; 45 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -64,11 +65,11 @@ static int sdp4430_hw_params(struct snd_pcm_substream *substream,
64 return ret; 65 return ret;
65} 66}
66 67
67static struct snd_soc_ops sdp4430_ops = { 68static struct snd_soc_ops omap_abe_ops = {
68 .hw_params = sdp4430_hw_params, 69 .hw_params = omap_abe_hw_params,
69}; 70};
70 71
71static int sdp4430_dmic_hw_params(struct snd_pcm_substream *substream, 72static int omap_abe_dmic_hw_params(struct snd_pcm_substream *substream,
72 struct snd_pcm_hw_params *params) 73 struct snd_pcm_hw_params *params)
73{ 74{
74 struct snd_soc_pcm_runtime *rtd = substream->private_data; 75 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -90,8 +91,8 @@ static int sdp4430_dmic_hw_params(struct snd_pcm_substream *substream,
90 return 0; 91 return 0;
91} 92}
92 93
93static struct snd_soc_ops sdp4430_dmic_ops = { 94static struct snd_soc_ops omap_abe_dmic_ops = {
94 .hw_params = sdp4430_dmic_hw_params, 95 .hw_params = omap_abe_dmic_hw_params,
95}; 96};
96 97
97/* Headset jack */ 98/* Headset jack */
@@ -110,7 +111,7 @@ static struct snd_soc_jack_pin hs_jack_pins[] = {
110}; 111};
111 112
112/* SDP4430 machine DAPM */ 113/* SDP4430 machine DAPM */
113static const struct snd_soc_dapm_widget sdp4430_twl6040_dapm_widgets[] = { 114static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
114 SND_SOC_DAPM_MIC("Ext Mic", NULL), 115 SND_SOC_DAPM_MIC("Ext Mic", NULL),
115 SND_SOC_DAPM_SPK("Ext Spk", NULL), 116 SND_SOC_DAPM_SPK("Ext Spk", NULL),
116 SND_SOC_DAPM_MIC("Headset Mic", NULL), 117 SND_SOC_DAPM_MIC("Headset Mic", NULL),
@@ -145,7 +146,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
145 {"AFMR", NULL, "FM Stereo In"}, 146 {"AFMR", NULL, "FM Stereo In"},
146}; 147};
147 148
148static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd) 149static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)
149{ 150{
150 struct snd_soc_codec *codec = rtd->codec; 151 struct snd_soc_codec *codec = rtd->codec;
151 int ret, hs_trim; 152 int ret, hs_trim;
@@ -175,7 +176,7 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd)
175 return ret; 176 return ret;
176} 177}
177 178
178static const struct snd_soc_dapm_widget sdp4430_dmic_dapm_widgets[] = { 179static const struct snd_soc_dapm_widget dmic_dapm_widgets[] = {
179 SND_SOC_DAPM_MIC("Digital Mic", NULL), 180 SND_SOC_DAPM_MIC("Digital Mic", NULL),
180}; 181};
181 182
@@ -184,14 +185,14 @@ static const struct snd_soc_dapm_route dmic_audio_map[] = {
184 {"Digital Mic1 Bias", NULL, "Digital Mic"}, 185 {"Digital Mic1 Bias", NULL, "Digital Mic"},
185}; 186};
186 187
187static int sdp4430_dmic_init(struct snd_soc_pcm_runtime *rtd) 188static int omap_abe_dmic_init(struct snd_soc_pcm_runtime *rtd)
188{ 189{
189 struct snd_soc_codec *codec = rtd->codec; 190 struct snd_soc_codec *codec = rtd->codec;
190 struct snd_soc_dapm_context *dapm = &codec->dapm; 191 struct snd_soc_dapm_context *dapm = &codec->dapm;
191 int ret; 192 int ret;
192 193
193 ret = snd_soc_dapm_new_controls(dapm, sdp4430_dmic_dapm_widgets, 194 ret = snd_soc_dapm_new_controls(dapm, dmic_dapm_widgets,
194 ARRAY_SIZE(sdp4430_dmic_dapm_widgets)); 195 ARRAY_SIZE(dmic_dapm_widgets));
195 if (ret) 196 if (ret)
196 return ret; 197 return ret;
197 198
@@ -208,8 +209,8 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
208 .codec_dai_name = "twl6040-legacy", 209 .codec_dai_name = "twl6040-legacy",
209 .platform_name = "omap-pcm-audio", 210 .platform_name = "omap-pcm-audio",
210 .codec_name = "twl6040-codec", 211 .codec_name = "twl6040-codec",
211 .init = sdp4430_twl6040_init, 212 .init = omap_abe_twl6040_init,
212 .ops = &sdp4430_ops, 213 .ops = &omap_abe_ops,
213 }, 214 },
214 { 215 {
215 .name = "DMIC", 216 .name = "DMIC",
@@ -218,27 +219,27 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
218 .codec_dai_name = "dmic-hifi", 219 .codec_dai_name = "dmic-hifi",
219 .platform_name = "omap-pcm-audio", 220 .platform_name = "omap-pcm-audio",
220 .codec_name = "dmic-codec", 221 .codec_name = "dmic-codec",
221 .init = sdp4430_dmic_init, 222 .init = omap_abe_dmic_init,
222 .ops = &sdp4430_dmic_ops, 223 .ops = &omap_abe_dmic_ops,
223 }, 224 },
224}; 225};
225 226
226/* Audio machine driver */ 227/* Audio machine driver */
227static struct snd_soc_card snd_soc_sdp4430 = { 228static struct snd_soc_card omap_abe_card = {
228 .name = "SDP4430", 229 .name = "SDP4430",
229 .owner = THIS_MODULE, 230 .owner = THIS_MODULE,
230 .dai_link = sdp4430_dai, 231 .dai_link = sdp4430_dai,
231 .num_links = ARRAY_SIZE(sdp4430_dai), 232 .num_links = ARRAY_SIZE(sdp4430_dai),
232 233
233 .dapm_widgets = sdp4430_twl6040_dapm_widgets, 234 .dapm_widgets = twl6040_dapm_widgets,
234 .num_dapm_widgets = ARRAY_SIZE(sdp4430_twl6040_dapm_widgets), 235 .num_dapm_widgets = ARRAY_SIZE(twl6040_dapm_widgets),
235 .dapm_routes = audio_map, 236 .dapm_routes = audio_map,
236 .num_dapm_routes = ARRAY_SIZE(audio_map), 237 .num_dapm_routes = ARRAY_SIZE(audio_map),
237}; 238};
238 239
239static struct platform_device *sdp4430_snd_device; 240static struct platform_device *omap_abe_snd_device;
240 241
241static int __init sdp4430_soc_init(void) 242static int __init omap_abe_soc_init(void)
242{ 243{
243 int ret; 244 int ret;
244 245
@@ -246,15 +247,15 @@ static int __init sdp4430_soc_init(void)
246 return -ENODEV; 247 return -ENODEV;
247 printk(KERN_INFO "SDP4430 SoC init\n"); 248 printk(KERN_INFO "SDP4430 SoC init\n");
248 249
249 sdp4430_snd_device = platform_device_alloc("soc-audio", -1); 250 omap_abe_snd_device = platform_device_alloc("soc-audio", -1);
250 if (!sdp4430_snd_device) { 251 if (!omap_abe_snd_device) {
251 printk(KERN_ERR "Platform device allocation failed\n"); 252 printk(KERN_ERR "Platform device allocation failed\n");
252 return -ENOMEM; 253 return -ENOMEM;
253 } 254 }
254 255
255 platform_set_drvdata(sdp4430_snd_device, &snd_soc_sdp4430); 256 platform_set_drvdata(omap_abe_snd_device, &omap_abe_card);
256 257
257 ret = platform_device_add(sdp4430_snd_device); 258 ret = platform_device_add(omap_abe_snd_device);
258 if (ret) 259 if (ret)
259 goto err; 260 goto err;
260 261
@@ -262,18 +263,18 @@ static int __init sdp4430_soc_init(void)
262 263
263err: 264err:
264 printk(KERN_ERR "Unable to add platform device\n"); 265 printk(KERN_ERR "Unable to add platform device\n");
265 platform_device_put(sdp4430_snd_device); 266 platform_device_put(omap_abe_snd_device);
266 return ret; 267 return ret;
267} 268}
268module_init(sdp4430_soc_init); 269module_init(omap_abe_soc_init);
269 270
270static void __exit sdp4430_soc_exit(void) 271static void __exit omap_abe_soc_exit(void)
271{ 272{
272 platform_device_unregister(sdp4430_snd_device); 273 platform_device_unregister(omap_abe_snd_device);
273} 274}
274module_exit(sdp4430_soc_exit); 275module_exit(omap_abe_soc_exit);
275 276
276MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>"); 277MODULE_AUTHOR("Misael Lopez Cruz <misael.lopez@ti.com>");
277MODULE_DESCRIPTION("ALSA SoC SDP4430"); 278MODULE_DESCRIPTION("ALSA SoC for OMAP boards with ABE and twl6040 codec");
278MODULE_LICENSE("GPL"); 279MODULE_LICENSE("GPL");
279 280