Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: sound/soc/omap/sdp3430.c

Issue 6577007: CHROMIUM: ASoC: Import entire upstream ASoC tree (Closed)
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sound/soc/omap/rx51.c ('k') | sound/soc/omap/sdp4430.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * sdp3430.c -- SoC audio for TI OMAP3430 SDP 2 * sdp3430.c -- SoC audio for TI OMAP3430 SDP
3 * 3 *
4 * Author: Misael Lopez Cruz <x0052729@ti.com> 4 * Author: Misael Lopez Cruz <x0052729@ti.com>
5 * 5 *
6 * Based on: 6 * Based on:
7 * Author: Steve Sakoman <steve@sakoman.com> 7 * Author: Steve Sakoman <steve@sakoman.com>
8 * 8 *
9 * This program is free software; you can redistribute it and/or 9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License 10 * modify it under the terms of the GNU General Public License
(...skipping 10 matching lines...) Expand all
21 * 02110-1301 USA 21 * 02110-1301 USA
22 * 22 *
23 */ 23 */
24 24
25 #include <linux/clk.h> 25 #include <linux/clk.h>
26 #include <linux/platform_device.h> 26 #include <linux/platform_device.h>
27 #include <linux/i2c/twl.h> 27 #include <linux/i2c/twl.h>
28 #include <sound/core.h> 28 #include <sound/core.h>
29 #include <sound/pcm.h> 29 #include <sound/pcm.h>
30 #include <sound/soc.h> 30 #include <sound/soc.h>
31 #include <sound/soc-dapm.h>
32 #include <sound/jack.h> 31 #include <sound/jack.h>
33 32
34 #include <asm/mach-types.h> 33 #include <asm/mach-types.h>
35 #include <mach/hardware.h> 34 #include <mach/hardware.h>
36 #include <mach/gpio.h> 35 #include <mach/gpio.h>
37 #include <plat/mcbsp.h> 36 #include <plat/mcbsp.h>
38 37
39 /* Register descriptions for twl4030 codec part */ 38 /* Register descriptions for twl4030 codec part */
40 #include <linux/mfd/twl4030-codec.h> 39 #include <linux/mfd/twl4030-codec.h>
41 40
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 {"Headset Mic Bias", NULL, "Headset Mic"}, 183 {"Headset Mic Bias", NULL, "Headset Mic"},
185 184
186 /* Headset Stereophone (Headphone): HSOL, HSOR */ 185 /* Headset Stereophone (Headphone): HSOL, HSOR */
187 {"Headset Stereophone", NULL, "HSOL"}, 186 {"Headset Stereophone", NULL, "HSOL"},
188 {"Headset Stereophone", NULL, "HSOR"}, 187 {"Headset Stereophone", NULL, "HSOR"},
189 }; 188 };
190 189
191 static int sdp3430_twl4030_init(struct snd_soc_pcm_runtime *rtd) 190 static int sdp3430_twl4030_init(struct snd_soc_pcm_runtime *rtd)
192 { 191 {
193 struct snd_soc_codec *codec = rtd->codec; 192 struct snd_soc_codec *codec = rtd->codec;
193 struct snd_soc_dapm_context *dapm = &codec->dapm;
194 int ret; 194 int ret;
195 195
196 /* Add SDP3430 specific widgets */ 196 /* Add SDP3430 specific widgets */
197 » ret = snd_soc_dapm_new_controls(codec, sdp3430_twl4030_dapm_widgets, 197 » ret = snd_soc_dapm_new_controls(dapm, sdp3430_twl4030_dapm_widgets,
198 ARRAY_SIZE(sdp3430_twl4030_dapm_widgets)); 198 ARRAY_SIZE(sdp3430_twl4030_dapm_widgets));
199 if (ret) 199 if (ret)
200 return ret; 200 return ret;
201 201
202 /* Set up SDP3430 specific audio path audio_map */ 202 /* Set up SDP3430 specific audio path audio_map */
203 » snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 203 » snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
204 204
205 /* SDP3430 connected pins */ 205 /* SDP3430 connected pins */
206 » snd_soc_dapm_enable_pin(codec, "Ext Mic"); 206 » snd_soc_dapm_enable_pin(dapm, "Ext Mic");
207 » snd_soc_dapm_enable_pin(codec, "Ext Spk"); 207 » snd_soc_dapm_enable_pin(dapm, "Ext Spk");
208 » snd_soc_dapm_disable_pin(codec, "Headset Mic"); 208 » snd_soc_dapm_disable_pin(dapm, "Headset Mic");
209 » snd_soc_dapm_disable_pin(codec, "Headset Stereophone"); 209 » snd_soc_dapm_disable_pin(dapm, "Headset Stereophone");
210 210
211 /* TWL4030 not connected pins */ 211 /* TWL4030 not connected pins */
212 » snd_soc_dapm_nc_pin(codec, "AUXL"); 212 » snd_soc_dapm_nc_pin(dapm, "AUXL");
213 » snd_soc_dapm_nc_pin(codec, "AUXR"); 213 » snd_soc_dapm_nc_pin(dapm, "AUXR");
214 » snd_soc_dapm_nc_pin(codec, "CARKITMIC"); 214 » snd_soc_dapm_nc_pin(dapm, "CARKITMIC");
215 » snd_soc_dapm_nc_pin(codec, "DIGIMIC0"); 215 » snd_soc_dapm_nc_pin(dapm, "DIGIMIC0");
216 » snd_soc_dapm_nc_pin(codec, "DIGIMIC1"); 216 » snd_soc_dapm_nc_pin(dapm, "DIGIMIC1");
217 217
218 » snd_soc_dapm_nc_pin(codec, "OUTL"); 218 » snd_soc_dapm_nc_pin(dapm, "OUTL");
219 » snd_soc_dapm_nc_pin(codec, "OUTR"); 219 » snd_soc_dapm_nc_pin(dapm, "OUTR");
220 » snd_soc_dapm_nc_pin(codec, "EARPIECE"); 220 » snd_soc_dapm_nc_pin(dapm, "EARPIECE");
221 » snd_soc_dapm_nc_pin(codec, "PREDRIVEL"); 221 » snd_soc_dapm_nc_pin(dapm, "PREDRIVEL");
222 » snd_soc_dapm_nc_pin(codec, "PREDRIVER"); 222 » snd_soc_dapm_nc_pin(dapm, "PREDRIVER");
223 » snd_soc_dapm_nc_pin(codec, "CARKITL"); 223 » snd_soc_dapm_nc_pin(dapm, "CARKITL");
224 » snd_soc_dapm_nc_pin(codec, "CARKITR"); 224 » snd_soc_dapm_nc_pin(dapm, "CARKITR");
225 225
226 » ret = snd_soc_dapm_sync(codec); 226 » ret = snd_soc_dapm_sync(dapm);
227 if (ret) 227 if (ret)
228 return ret; 228 return ret;
229 229
230 /* Headset jack detection */ 230 /* Headset jack detection */
231 ret = snd_soc_jack_new(codec, "Headset Jack", 231 ret = snd_soc_jack_new(codec, "Headset Jack",
232 SND_JACK_HEADSET, &hs_jack); 232 SND_JACK_HEADSET, &hs_jack);
233 if (ret) 233 if (ret)
234 return ret; 234 return ret;
235 235
236 ret = snd_soc_jack_add_pins(&hs_jack, ARRAY_SIZE(hs_jack_pins), 236 ret = snd_soc_jack_add_pins(&hs_jack, ARRAY_SIZE(hs_jack_pins),
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 hs_jack_gpios); 336 hs_jack_gpios);
337 337
338 platform_device_unregister(sdp3430_snd_device); 338 platform_device_unregister(sdp3430_snd_device);
339 } 339 }
340 module_exit(sdp3430_soc_exit); 340 module_exit(sdp3430_soc_exit);
341 341
342 MODULE_AUTHOR("Misael Lopez Cruz <x0052729@ti.com>"); 342 MODULE_AUTHOR("Misael Lopez Cruz <x0052729@ti.com>");
343 MODULE_DESCRIPTION("ALSA SoC SDP3430"); 343 MODULE_DESCRIPTION("ALSA SoC SDP3430");
344 MODULE_LICENSE("GPL"); 344 MODULE_LICENSE("GPL");
345 345
OLDNEW
« no previous file with comments | « sound/soc/omap/rx51.c ('k') | sound/soc/omap/sdp4430.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698