diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-09-10 09:32:40 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-09-10 09:32:40 -0400 |
commit | e0b3032bcdf1419d97de636d5fb1c9469da75776 (patch) | |
tree | 30252bef7afdad1f789b215c99909104a1d5cfa1 /sound/soc/omap/sdp3430.c | |
parent | 45fae5c78d873b10c66dfc04db6701e05c493791 (diff) | |
parent | cdc65fbe18aef15e92d2ebb410a189fbf956fb06 (diff) |
Merge branch 'topic/asoc' into for-linus
* topic/asoc: (226 commits)
ASoC: au1x: PSC-AC97 bugfixes
ASoC: Fix WM835x Out4 capture enumeration
ASoC: Remove unuused hw_read_t
ASoC: fix pxa2xx-ac97.c breakage
ASoC: Fully specify DC servo bits to update in wm_hubs
ASoC: Debugged improper setting of PLL fields in WM8580 driver
ASoC: new board driver to connect bfin-5xx with ad1836 codec
ASoC: OMAP: Add functionality to set CLKR and FSR sources in McBSP DAI
ASoC: davinci: i2c device creation moved into board files
ASoC: Don't reconfigure WM8350 FLL if not needed
ASoC: Fix s3c-i2s-v2 build
ASoC: Make platform data optional for TLV320AIC3x
ASoC: Add S3C24xx dependencies for Simtec machines
ASoC: SDP3430: Fix TWL GPIO6 pin mux request
ASoC: S3C platform: Fix s3c2410_dma_started() called at improper time
ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop
ASoC: OMAP: Fix setup of XCCR and RCCR registers in McBSP DAI
OMAP: McBSP: Use textual values in DMA operating mode sysfs files
ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510
ASoC: Select core DMA when building for S3C64xx
...
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; |