aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/n810.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/n810.c')
-rw-r--r--sound/soc/omap/n810.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 767b39f339a8..74f4599b4d7e 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -50,11 +50,22 @@ static int n810_dmic_func;
50 50
51static void n810_ext_control(struct snd_soc_codec *codec) 51static void n810_ext_control(struct snd_soc_codec *codec)
52{ 52{
53 snd_soc_dapm_set_endpoint(codec, "Ext Spk", n810_spk_func); 53 if (n810_spk_func)
54 snd_soc_dapm_set_endpoint(codec, "Headphone Jack", n810_jack_func); 54 snd_soc_dapm_enable_pin(codec, "Ext Spk");
55 snd_soc_dapm_set_endpoint(codec, "DMic", n810_dmic_func); 55 else
56 snd_soc_dapm_disable_pin(codec, "Ext Spk");
57
58 if (n810_jack_func)
59 snd_soc_dapm_enable_pin(codec, "Headphone Jack");
60 else
61 snd_soc_dapm_disable_pin(codec, "Headphone Jack");
62
63 if (n810_dmic_func)
64 snd_soc_dapm_enable_pin(codec, "DMic");
65 else
66 snd_soc_dapm_disable_pin(codec, "DMic);
56 67
57 snd_soc_dapm_sync_endpoints(codec); 68 snd_soc_dapm_sync(codec);
58} 69}
59 70
60static int n810_startup(struct snd_pcm_substream *substream) 71static int n810_startup(struct snd_pcm_substream *substream)
@@ -236,9 +247,9 @@ static int n810_aic33_init(struct snd_soc_codec *codec)
236 int i, err; 247 int i, err;
237 248
238 /* Not connected */ 249 /* Not connected */
239 snd_soc_dapm_set_endpoint(codec, "MONO_LOUT", 0); 250 snd_soc_dapm_disable_pin(codec, "MONO_LOUT");
240 snd_soc_dapm_set_endpoint(codec, "HPLCOM", 0); 251 snd_soc_dapm_disable_pin(codec, "HPLCOM");
241 snd_soc_dapm_set_endpoint(codec, "HPRCOM", 0); 252 snd_soc_dapm_disable_pin(codec, "HPRCOM");
242 253
243 /* Add N810 specific controls */ 254 /* Add N810 specific controls */
244 for (i = 0; i < ARRAY_SIZE(aic33_n810_controls); i++) { 255 for (i = 0; i < ARRAY_SIZE(aic33_n810_controls); i++) {
@@ -255,7 +266,7 @@ static int n810_aic33_init(struct snd_soc_codec *codec)
255 /* Set up N810 specific audio path audio_map */ 266 /* Set up N810 specific audio path audio_map */
256 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 267 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
257 268
258 snd_soc_dapm_sync_endpoints(codec); 269 snd_soc_dapm_sync(codec);
259 270
260 return 0; 271 return 0;
261} 272}