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

Side by Side Diff: sound/soc/omap/am3517evm.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/Kconfig ('k') | sound/soc/omap/ams-delta.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 * am3517evm.c -- ALSA SoC support for OMAP3517 / AM3517 EVM 2 * am3517evm.c -- ALSA SoC support for OMAP3517 / AM3517 EVM
3 * 3 *
4 * Author: Anuj Aggarwal <anuj.aggarwal@ti.com> 4 * Author: Anuj Aggarwal <anuj.aggarwal@ti.com>
5 * 5 *
6 * Based on sound/soc/omap/beagle.c by Steve Sakoman 6 * Based on sound/soc/omap/beagle.c by Steve Sakoman
7 * 7 *
8 * Copyright (C) 2009 Texas Instruments Incorporated 8 * Copyright (C) 2009 Texas Instruments Incorporated
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify it 10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the 11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation version 2. 12 * Free Software Foundation version 2.
13 * 13 *
14 * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind, 14 * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
15 * whether express or implied; without even the implied warranty of 15 * whether express or implied; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details. 17 * General Public License for more details.
18 */ 18 */
19 19
20 #include <linux/clk.h> 20 #include <linux/clk.h>
21 #include <linux/platform_device.h> 21 #include <linux/platform_device.h>
22 #include <sound/core.h> 22 #include <sound/core.h>
23 #include <sound/pcm.h> 23 #include <sound/pcm.h>
24 #include <sound/soc.h> 24 #include <sound/soc.h>
25 #include <sound/soc-dapm.h>
26 25
27 #include <asm/mach-types.h> 26 #include <asm/mach-types.h>
28 #include <mach/hardware.h> 27 #include <mach/hardware.h>
29 #include <mach/gpio.h> 28 #include <mach/gpio.h>
30 #include <plat/mcbsp.h> 29 #include <plat/mcbsp.h>
31 30
32 #include "omap-mcbsp.h" 31 #include "omap-mcbsp.h"
33 #include "omap-pcm.h" 32 #include "omap-pcm.h"
34 33
35 #include "../codecs/tlv320aic23.h" 34 #include "../codecs/tlv320aic23.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 106
108 {"LLINEIN", NULL, "Line In"}, 107 {"LLINEIN", NULL, "Line In"},
109 {"RLINEIN", NULL, "Line In"}, 108 {"RLINEIN", NULL, "Line In"},
110 109
111 {"MICIN", NULL, "Mic In"}, 110 {"MICIN", NULL, "Mic In"},
112 }; 111 };
113 112
114 static int am3517evm_aic23_init(struct snd_soc_pcm_runtime *rtd) 113 static int am3517evm_aic23_init(struct snd_soc_pcm_runtime *rtd)
115 { 114 {
116 struct snd_soc_codec *codec = rtd->codec; 115 struct snd_soc_codec *codec = rtd->codec;
116 struct snd_soc_dapm_context *dapm = &codec->dapm;
117 117
118 /* Add am3517-evm specific widgets */ 118 /* Add am3517-evm specific widgets */
119 » snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, 119 » snd_soc_dapm_new_controls(dapm, tlv320aic23_dapm_widgets,
120 ARRAY_SIZE(tlv320aic23_dapm_widgets)); 120 ARRAY_SIZE(tlv320aic23_dapm_widgets));
121 121
122 /* Set up davinci-evm specific audio path audio_map */ 122 /* Set up davinci-evm specific audio path audio_map */
123 » snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 123 » snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
124 124
125 /* always connected */ 125 /* always connected */
126 » snd_soc_dapm_enable_pin(codec, "Line Out"); 126 » snd_soc_dapm_enable_pin(dapm, "Line Out");
127 » snd_soc_dapm_enable_pin(codec, "Line In"); 127 » snd_soc_dapm_enable_pin(dapm, "Line In");
128 » snd_soc_dapm_enable_pin(codec, "Mic In"); 128 » snd_soc_dapm_enable_pin(dapm, "Mic In");
129 129
130 » snd_soc_dapm_sync(codec); 130 » snd_soc_dapm_sync(dapm);
131 131
132 return 0; 132 return 0;
133 } 133 }
134 134
135 /* Digital audio interface glue - connects codec <--> CPU */ 135 /* Digital audio interface glue - connects codec <--> CPU */
136 static struct snd_soc_dai_link am3517evm_dai = { 136 static struct snd_soc_dai_link am3517evm_dai = {
137 .name = "TLV320AIC23", 137 .name = "TLV320AIC23",
138 .stream_name = "AIC23", 138 .stream_name = "AIC23",
139 .cpu_dai_name ="omap-mcbsp-dai.0", 139 .cpu_dai_name ="omap-mcbsp-dai.0",
140 .codec_dai_name = "tlv320aic23-hifi", 140 .codec_dai_name = "tlv320aic23-hifi",
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 { 186 {
187 platform_device_unregister(am3517evm_snd_device); 187 platform_device_unregister(am3517evm_snd_device);
188 } 188 }
189 189
190 module_init(am3517evm_soc_init); 190 module_init(am3517evm_soc_init);
191 module_exit(am3517evm_soc_exit); 191 module_exit(am3517evm_soc_exit);
192 192
193 MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>"); 193 MODULE_AUTHOR("Anuj Aggarwal <anuj.aggarwal@ti.com>");
194 MODULE_DESCRIPTION("ALSA SoC OMAP3517 / AM3517 EVM"); 194 MODULE_DESCRIPTION("ALSA SoC OMAP3517 / AM3517 EVM");
195 MODULE_LICENSE("GPL v2"); 195 MODULE_LICENSE("GPL v2");
OLDNEW
« no previous file with comments | « sound/soc/omap/Kconfig ('k') | sound/soc/omap/ams-delta.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698