diff options
author | Candelaria Villareal, Jorge <x0107209@ti.com> | 2009-07-14 21:04:08 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-17 05:32:39 -0400 |
commit | c5910a703889cf44ac1aa9405642a7d3b5bc6f24 (patch) | |
tree | 3c3347e4831a2d6184bdf604334b68c65dc9cd23 /sound/soc/omap | |
parent | 416c8fe3cdcd2d46a6ca12d8ec6143c62d8569d9 (diff) |
ASoC: SDP3430: Add support for EXTMUTE using TWL GPIO6
Board sdp3430 has hardware support for EXTMUTE using TWL4030 GPIO6
line, controlled by register INTBR_PMBR1. Machine driver takes care
of enabling gpio line through i2c and codec driver manipulates the
line during headset ramp up/down sequence.
Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r-- | sound/soc/omap/sdp3430.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index c51594d8fd13..f7e5b7488c35 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/i2c/twl4030.h> | ||
27 | #include <sound/core.h> | 28 | #include <sound/core.h> |
28 | #include <sound/pcm.h> | 29 | #include <sound/pcm.h> |
29 | #include <sound/soc.h> | 30 | #include <sound/soc.h> |
@@ -39,6 +40,9 @@ | |||
39 | #include "omap-pcm.h" | 40 | #include "omap-pcm.h" |
40 | #include "../codecs/twl4030.h" | 41 | #include "../codecs/twl4030.h" |
41 | 42 | ||
43 | #define TWL4030_INTBR_PMBR1 0x0D | ||
44 | #define EXTMUTE(value) (value << 2) | ||
45 | |||
42 | static struct snd_soc_card snd_soc_sdp3430; | 46 | static struct snd_soc_card snd_soc_sdp3430; |
43 | 47 | ||
44 | static int sdp3430_hw_params(struct snd_pcm_substream *substream, | 48 | static int sdp3430_hw_params(struct snd_pcm_substream *substream, |
@@ -280,6 +284,7 @@ static struct snd_soc_card snd_soc_sdp3430 = { | |||
280 | static struct twl4030_setup_data twl4030_setup = { | 284 | static struct twl4030_setup_data twl4030_setup = { |
281 | .ramp_delay_value = 3, | 285 | .ramp_delay_value = 3, |
282 | .sysclk = 26000, | 286 | .sysclk = 26000, |
287 | .hs_extmute = 1, | ||
283 | }; | 288 | }; |
284 | 289 | ||
285 | /* Audio subsystem */ | 290 | /* Audio subsystem */ |
@@ -312,6 +317,10 @@ static int __init sdp3430_soc_init(void) | |||
312 | *(unsigned int *)sdp3430_dai[0].cpu_dai->private_data = 1; /* McBSP2 */ | 317 | *(unsigned int *)sdp3430_dai[0].cpu_dai->private_data = 1; /* McBSP2 */ |
313 | *(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */ | 318 | *(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */ |
314 | 319 | ||
320 | /* Set TWL4030 GPIO6 as EXTMUTE signal */ | ||
321 | twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, EXTMUTE(0x02), | ||
322 | TWL4030_MODULE_INTBR); | ||
323 | |||
315 | ret = platform_device_add(sdp3430_snd_device); | 324 | ret = platform_device_add(sdp3430_snd_device); |
316 | if (ret) | 325 | if (ret) |
317 | goto err1; | 326 | goto err1; |