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

Side by Side Diff: sound/soc/omap/osk5912.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/omap3pandora.c ('k') | sound/soc/omap/overo.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 * osk5912.c -- SoC audio for OSK 5912 2 * osk5912.c -- SoC audio for OSK 5912
3 * 3 *
4 * Copyright (C) 2008 Mistral Solutions 4 * Copyright (C) 2008 Mistral Solutions
5 * 5 *
6 * Contact: Arun KS <arunks@mistralsolutions.com> 6 * Contact: Arun KS <arunks@mistralsolutions.com>
7 * 7 *
8 * This program is free software; you can redistribute it and/or 8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation. 10 * version 2 as published by the Free Software Foundation.
11 * 11 *
12 * This program is distributed in the hope that it will be useful, but 12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details. 15 * General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA 20 * 02110-1301 USA
21 * 21 *
22 */ 22 */
23 23
24 #include <linux/clk.h> 24 #include <linux/clk.h>
25 #include <linux/platform_device.h> 25 #include <linux/platform_device.h>
26 #include <sound/core.h> 26 #include <sound/core.h>
27 #include <sound/pcm.h> 27 #include <sound/pcm.h>
28 #include <sound/soc.h> 28 #include <sound/soc.h>
29 #include <sound/soc-dapm.h>
30 29
31 #include <asm/mach-types.h> 30 #include <asm/mach-types.h>
32 #include <mach/hardware.h> 31 #include <mach/hardware.h>
33 #include <linux/gpio.h> 32 #include <linux/gpio.h>
34 #include <plat/mcbsp.h> 33 #include <plat/mcbsp.h>
35 34
36 #include "omap-mcbsp.h" 35 #include "omap-mcbsp.h"
37 #include "omap-pcm.h" 36 #include "omap-pcm.h"
38 #include "../codecs/tlv320aic23.h" 37 #include "../codecs/tlv320aic23.h"
39 38
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 108
110 {"LLINEIN", NULL, "Line In"}, 109 {"LLINEIN", NULL, "Line In"},
111 {"RLINEIN", NULL, "Line In"}, 110 {"RLINEIN", NULL, "Line In"},
112 111
113 {"MICIN", NULL, "Mic Jack"}, 112 {"MICIN", NULL, "Mic Jack"},
114 }; 113 };
115 114
116 static int osk_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) 115 static int osk_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
117 { 116 {
118 struct snd_soc_codec *codec = rtd->codec; 117 struct snd_soc_codec *codec = rtd->codec;
118 struct snd_soc_dapm_context *dapm = &codec->dapm;
119 119
120 /* Add osk5912 specific widgets */ 120 /* Add osk5912 specific widgets */
121 » snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, 121 » snd_soc_dapm_new_controls(dapm, tlv320aic23_dapm_widgets,
122 ARRAY_SIZE(tlv320aic23_dapm_widgets)); 122 ARRAY_SIZE(tlv320aic23_dapm_widgets));
123 123
124 /* Set up osk5912 specific audio path audio_map */ 124 /* Set up osk5912 specific audio path audio_map */
125 » snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 125 » snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
126 126
127 » snd_soc_dapm_enable_pin(codec, "Headphone Jack"); 127 » snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
128 » snd_soc_dapm_enable_pin(codec, "Line In"); 128 » snd_soc_dapm_enable_pin(dapm, "Line In");
129 » snd_soc_dapm_enable_pin(codec, "Mic Jack"); 129 » snd_soc_dapm_enable_pin(dapm, "Mic Jack");
130 130
131 » snd_soc_dapm_sync(codec); 131 » snd_soc_dapm_sync(dapm);
132 132
133 return 0; 133 return 0;
134 } 134 }
135 135
136 /* Digital audio interface glue - connects codec <--> CPU */ 136 /* Digital audio interface glue - connects codec <--> CPU */
137 static struct snd_soc_dai_link osk_dai = { 137 static struct snd_soc_dai_link osk_dai = {
138 .name = "TLV320AIC23", 138 .name = "TLV320AIC23",
139 .stream_name = "AIC23", 139 .stream_name = "AIC23",
140 .cpu_dai_name = "omap-mcbsp-dai.0", 140 .cpu_dai_name = "omap-mcbsp-dai.0",
141 .codec_dai_name = "tlv320aic23-hifi", 141 .codec_dai_name = "tlv320aic23-hifi",
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 clk_put(tlv320aic23_mclk); 214 clk_put(tlv320aic23_mclk);
215 platform_device_unregister(osk_snd_device); 215 platform_device_unregister(osk_snd_device);
216 } 216 }
217 217
218 module_init(osk_soc_init); 218 module_init(osk_soc_init);
219 module_exit(osk_soc_exit); 219 module_exit(osk_soc_exit);
220 220
221 MODULE_AUTHOR("Arun KS <arunks@mistralsolutions.com>"); 221 MODULE_AUTHOR("Arun KS <arunks@mistralsolutions.com>");
222 MODULE_DESCRIPTION("ALSA SoC OSK 5912"); 222 MODULE_DESCRIPTION("ALSA SoC OSK 5912");
223 MODULE_LICENSE("GPL"); 223 MODULE_LICENSE("GPL");
OLDNEW
« no previous file with comments | « sound/soc/omap/omap3pandora.c ('k') | sound/soc/omap/overo.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698