aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap3pandora.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-03-28 16:29:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-28 16:29:51 -0400
commited40d0c472b136682b2fcba05f89762859c7374f (patch)
tree076b83a26bcd63d6158463735dd34c10bbc591dc /sound/soc/omap/omap3pandora.c
parent9e495834e59ca9b29f1a1f63b9f5533bb022ac49 (diff)
parent5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff)
Merge branch 'origin' into devel
Conflicts: sound/soc/pxa/pxa2xx-i2s.c
Diffstat (limited to 'sound/soc/omap/omap3pandora.c')
-rw-r--r--sound/soc/omap/omap3pandora.c49
1 files changed, 29 insertions, 20 deletions
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c
index fcc2f5d9a878..fe282d4ef422 100644
--- a/sound/soc/omap/omap3pandora.c
+++ b/sound/soc/omap/omap3pandora.c
@@ -143,7 +143,7 @@ static const struct snd_soc_dapm_widget omap3pandora_out_dapm_widgets[] = {
143}; 143};
144 144
145static const struct snd_soc_dapm_widget omap3pandora_in_dapm_widgets[] = { 145static const struct snd_soc_dapm_widget omap3pandora_in_dapm_widgets[] = {
146 SND_SOC_DAPM_MIC("Mic (Internal)", NULL), 146 SND_SOC_DAPM_MIC("Mic (internal)", NULL),
147 SND_SOC_DAPM_MIC("Mic (external)", NULL), 147 SND_SOC_DAPM_MIC("Mic (external)", NULL),
148 SND_SOC_DAPM_LINE("Line In", NULL), 148 SND_SOC_DAPM_LINE("Line In", NULL),
149}; 149};
@@ -155,16 +155,33 @@ static const struct snd_soc_dapm_route omap3pandora_out_map[] = {
155}; 155};
156 156
157static const struct snd_soc_dapm_route omap3pandora_in_map[] = { 157static const struct snd_soc_dapm_route omap3pandora_in_map[] = {
158 {"INL", NULL, "Line In"}, 158 {"AUXL", NULL, "Line In"},
159 {"INR", NULL, "Line In"}, 159 {"AUXR", NULL, "Line In"},
160 {"INL", NULL, "Mic (Internal)"}, 160
161 {"INR", NULL, "Mic (external)"}, 161 {"MAINMIC", NULL, "Mic Bias 1"},
162 {"Mic Bias 1", NULL, "Mic (internal)"},
163
164 {"SUBMIC", NULL, "Mic Bias 2"},
165 {"Mic Bias 2", NULL, "Mic (external)"},
162}; 166};
163 167
164static int omap3pandora_out_init(struct snd_soc_codec *codec) 168static int omap3pandora_out_init(struct snd_soc_codec *codec)
165{ 169{
166 int ret; 170 int ret;
167 171
172 /* All TWL4030 output pins are floating */
173 snd_soc_dapm_nc_pin(codec, "OUTL");
174 snd_soc_dapm_nc_pin(codec, "OUTR");
175 snd_soc_dapm_nc_pin(codec, "EARPIECE");
176 snd_soc_dapm_nc_pin(codec, "PREDRIVEL");
177 snd_soc_dapm_nc_pin(codec, "PREDRIVER");
178 snd_soc_dapm_nc_pin(codec, "HSOL");
179 snd_soc_dapm_nc_pin(codec, "HSOR");
180 snd_soc_dapm_nc_pin(codec, "CARKITL");
181 snd_soc_dapm_nc_pin(codec, "CARKITR");
182 snd_soc_dapm_nc_pin(codec, "HFL");
183 snd_soc_dapm_nc_pin(codec, "HFR");
184
168 ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets, 185 ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets,
169 ARRAY_SIZE(omap3pandora_out_dapm_widgets)); 186 ARRAY_SIZE(omap3pandora_out_dapm_widgets));
170 if (ret < 0) 187 if (ret < 0)
@@ -180,18 +197,11 @@ static int omap3pandora_in_init(struct snd_soc_codec *codec)
180{ 197{
181 int ret; 198 int ret;
182 199
183 /* All TWL4030 output pins are floating */ 200 /* Not comnnected */
184 snd_soc_dapm_nc_pin(codec, "OUTL"), 201 snd_soc_dapm_nc_pin(codec, "HSMIC");
185 snd_soc_dapm_nc_pin(codec, "OUTR"), 202 snd_soc_dapm_nc_pin(codec, "CARKITMIC");
186 snd_soc_dapm_nc_pin(codec, "EARPIECE"), 203 snd_soc_dapm_nc_pin(codec, "DIGIMIC0");
187 snd_soc_dapm_nc_pin(codec, "PREDRIVEL"), 204 snd_soc_dapm_nc_pin(codec, "DIGIMIC1");
188 snd_soc_dapm_nc_pin(codec, "PREDRIVER"),
189 snd_soc_dapm_nc_pin(codec, "HSOL"),
190 snd_soc_dapm_nc_pin(codec, "HSOR"),
191 snd_soc_dapm_nc_pin(codec, "CARKITL"),
192 snd_soc_dapm_nc_pin(codec, "CARKITR"),
193 snd_soc_dapm_nc_pin(codec, "HFL"),
194 snd_soc_dapm_nc_pin(codec, "HFR"),
195 205
196 ret = snd_soc_dapm_new_controls(codec, omap3pandora_in_dapm_widgets, 206 ret = snd_soc_dapm_new_controls(codec, omap3pandora_in_dapm_widgets,
197 ARRAY_SIZE(omap3pandora_in_dapm_widgets)); 207 ARRAY_SIZE(omap3pandora_in_dapm_widgets));
@@ -251,10 +261,9 @@ static int __init omap3pandora_soc_init(void)
251{ 261{
252 int ret; 262 int ret;
253 263
254 if (!machine_is_omap3_pandora()) { 264 if (!machine_is_omap3_pandora())
255 pr_debug(PREFIX "Not OMAP3 Pandora\n");
256 return -ENODEV; 265 return -ENODEV;
257 } 266
258 pr_info("OMAP3 Pandora SoC init\n"); 267 pr_info("OMAP3 Pandora SoC init\n");
259 268
260 ret = gpio_request(OMAP3_PANDORA_DAC_POWER_GPIO, "dac_power"); 269 ret = gpio_request(OMAP3_PANDORA_DAC_POWER_GPIO, "dac_power");