diff options
Diffstat (limited to 'sound/soc/omap/zoom2.c')
-rw-r--r-- | sound/soc/omap/zoom2.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index 3de6d2bd3903..f90b45f56220 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c | |||
@@ -35,7 +35,8 @@ | |||
35 | #include "omap-pcm.h" | 35 | #include "omap-pcm.h" |
36 | #include "../codecs/twl4030.h" | 36 | #include "../codecs/twl4030.h" |
37 | 37 | ||
38 | #define ZOOM2_HEADSET_MUX_GPIO (OMAP_MAX_GPIO_LINES + 15) | 38 | #define ZOOM2_HEADSET_MUX_GPIO (OMAP_MAX_GPIO_LINES + 15) |
39 | #define ZOOM2_HEADSET_EXTMUTE_GPIO 153 | ||
39 | 40 | ||
40 | static int zoom2_hw_params(struct snd_pcm_substream *substream, | 41 | static int zoom2_hw_params(struct snd_pcm_substream *substream, |
41 | struct snd_pcm_hw_params *params) | 42 | struct snd_pcm_hw_params *params) |
@@ -234,10 +235,18 @@ static struct snd_soc_card snd_soc_zoom2 = { | |||
234 | .num_links = ARRAY_SIZE(zoom2_dai), | 235 | .num_links = ARRAY_SIZE(zoom2_dai), |
235 | }; | 236 | }; |
236 | 237 | ||
238 | /* EXTMUTE callback function */ | ||
239 | void zoom2_set_hs_extmute(int mute) | ||
240 | { | ||
241 | gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); | ||
242 | } | ||
243 | |||
237 | /* twl4030 setup */ | 244 | /* twl4030 setup */ |
238 | static struct twl4030_setup_data twl4030_setup = { | 245 | static struct twl4030_setup_data twl4030_setup = { |
239 | .ramp_delay_value = 2, /* 81 ms */ | 246 | .ramp_delay_value = 3, /* 161 ms */ |
240 | .sysclk = 26000, | 247 | .sysclk = 26000, |
248 | .hs_extmute = 1, | ||
249 | .set_hs_extmute = zoom2_set_hs_extmute, | ||
241 | }; | 250 | }; |
242 | 251 | ||
243 | /* Audio subsystem */ | 252 | /* Audio subsystem */ |
@@ -277,6 +286,9 @@ static int __init zoom2_soc_init(void) | |||
277 | BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0); | 286 | BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0); |
278 | gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0); | 287 | gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0); |
279 | 288 | ||
289 | BUG_ON(gpio_request(ZOOM2_HEADSET_EXTMUTE_GPIO, "ext_mute") < 0); | ||
290 | gpio_direction_output(ZOOM2_HEADSET_EXTMUTE_GPIO, 0); | ||
291 | |||
280 | return 0; | 292 | return 0; |
281 | 293 | ||
282 | err1: | 294 | err1: |
@@ -290,6 +302,7 @@ module_init(zoom2_soc_init); | |||
290 | static void __exit zoom2_soc_exit(void) | 302 | static void __exit zoom2_soc_exit(void) |
291 | { | 303 | { |
292 | gpio_free(ZOOM2_HEADSET_MUX_GPIO); | 304 | gpio_free(ZOOM2_HEADSET_MUX_GPIO); |
305 | gpio_free(ZOOM2_HEADSET_EXTMUTE_GPIO); | ||
293 | 306 | ||
294 | platform_device_unregister(zoom2_snd_device); | 307 | platform_device_unregister(zoom2_snd_device); |
295 | } | 308 | } |