diff options
Diffstat (limited to 'sound/soc/omap/sdp3430.c')
-rw-r--r-- | sound/soc/omap/sdp3430.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index b719e5db4f57..4a3f62d1f295 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,11 @@ | |||
39 | #include "omap-pcm.h" | 40 | #include "omap-pcm.h" |
40 | #include "../codecs/twl4030.h" | 41 | #include "../codecs/twl4030.h" |
41 | 42 | ||
43 | /* TWL4030 PMBR1 Register */ | ||
44 | #define TWL4030_INTBR_PMBR1 0x0D | ||
45 | /* TWL4030 PMBR1 Register GPIO6 mux bit */ | ||
46 | #define TWL4030_GPIO6_PWM0_MUTE(value) (value << 2) | ||
47 | |||
42 | static struct snd_soc_card snd_soc_sdp3430; | 48 | static struct snd_soc_card snd_soc_sdp3430; |
43 | 49 | ||
44 | static int sdp3430_hw_params(struct snd_pcm_substream *substream, | 50 | static int sdp3430_hw_params(struct snd_pcm_substream *substream, |
@@ -96,7 +102,7 @@ static int sdp3430_hw_voice_params(struct snd_pcm_substream *substream, | |||
96 | ret = snd_soc_dai_set_fmt(codec_dai, | 102 | ret = snd_soc_dai_set_fmt(codec_dai, |
97 | SND_SOC_DAIFMT_DSP_A | | 103 | SND_SOC_DAIFMT_DSP_A | |
98 | SND_SOC_DAIFMT_IB_NF | | 104 | SND_SOC_DAIFMT_IB_NF | |
99 | SND_SOC_DAIFMT_CBS_CFM); | 105 | SND_SOC_DAIFMT_CBM_CFM); |
100 | if (ret) { | 106 | if (ret) { |
101 | printk(KERN_ERR "can't set codec DAI configuration\n"); | 107 | printk(KERN_ERR "can't set codec DAI configuration\n"); |
102 | return ret; | 108 | return ret; |
@@ -280,6 +286,7 @@ static struct snd_soc_card snd_soc_sdp3430 = { | |||
280 | static struct twl4030_setup_data twl4030_setup = { | 286 | static struct twl4030_setup_data twl4030_setup = { |
281 | .ramp_delay_value = 3, | 287 | .ramp_delay_value = 3, |
282 | .sysclk = 26000, | 288 | .sysclk = 26000, |
289 | .hs_extmute = 1, | ||
283 | }; | 290 | }; |
284 | 291 | ||
285 | /* Audio subsystem */ | 292 | /* Audio subsystem */ |
@@ -294,6 +301,7 @@ static struct platform_device *sdp3430_snd_device; | |||
294 | static int __init sdp3430_soc_init(void) | 301 | static int __init sdp3430_soc_init(void) |
295 | { | 302 | { |
296 | int ret; | 303 | int ret; |
304 | u8 pin_mux; | ||
297 | 305 | ||
298 | if (!machine_is_omap_3430sdp()) { | 306 | if (!machine_is_omap_3430sdp()) { |
299 | pr_debug("Not SDP3430!\n"); | 307 | pr_debug("Not SDP3430!\n"); |
@@ -312,6 +320,14 @@ static int __init sdp3430_soc_init(void) | |||
312 | *(unsigned int *)sdp3430_dai[0].cpu_dai->private_data = 1; /* McBSP2 */ | 320 | *(unsigned int *)sdp3430_dai[0].cpu_dai->private_data = 1; /* McBSP2 */ |
313 | *(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */ | 321 | *(unsigned int *)sdp3430_dai[1].cpu_dai->private_data = 2; /* McBSP3 */ |
314 | 322 | ||
323 | /* Set TWL4030 GPIO6 as EXTMUTE signal */ | ||
324 | twl4030_i2c_read_u8(TWL4030_MODULE_INTBR, &pin_mux, | ||
325 | TWL4030_INTBR_PMBR1); | ||
326 | pin_mux &= ~TWL4030_GPIO6_PWM0_MUTE(0x03); | ||
327 | pin_mux |= TWL4030_GPIO6_PWM0_MUTE(0x02); | ||
328 | twl4030_i2c_write_u8(TWL4030_MODULE_INTBR, pin_mux, | ||
329 | TWL4030_INTBR_PMBR1); | ||
330 | |||
315 | ret = platform_device_add(sdp3430_snd_device); | 331 | ret = platform_device_add(sdp3430_snd_device); |
316 | if (ret) | 332 | if (ret) |
317 | goto err1; | 333 | goto err1; |