34 #include <mach/hardware.h>
35 #include <mach/gpio.h>
41 #include <linux/module.h>
47 #define TWL4030_INTBR_PMBR1 0x0D
49 #define TWL4030_GPIO6_PWM0_MUTE(value) (value << 2)
72 .hw_params = sdp3430_hw_params,
85 .pin =
"Headset Stereophone",
91 static struct snd_soc_jack_gpio hs_jack_gpios[] = {
110 {
"MAINMIC",
NULL,
"Mic Bias 1"},
111 {
"SUBMIC",
NULL,
"Mic Bias 2"},
112 {
"Mic Bias 1",
NULL,
"Ext Mic"},
113 {
"Mic Bias 2",
NULL,
"Ext Mic"},
116 {
"Ext Spk",
NULL,
"HFL"},
117 {
"Ext Spk",
NULL,
"HFR"},
120 {
"HSMIC",
NULL,
"Headset Mic Bias"},
121 {
"Headset Mic Bias",
NULL,
"Headset Mic"},
124 {
"Headset Stereophone",
NULL,
"HSOL"},
125 {
"Headset Stereophone",
NULL,
"HSOR"},
166 ret = snd_soc_jack_add_gpios(&hs_jack,
ARRAY_SIZE(hs_jack_gpios),
189 .name =
"TWL4030 I2S",
190 .stream_name =
"TWL4030 Audio",
191 .cpu_dai_name =
"omap-mcbsp.2",
192 .codec_dai_name =
"twl4030-hifi",
193 .platform_name =
"omap-pcm-audio",
194 .codec_name =
"twl4030-codec",
197 .init = sdp3430_twl4030_init,
201 .name =
"TWL4030 PCM",
202 .stream_name =
"TWL4030 Voice",
203 .cpu_dai_name =
"omap-mcbsp.3",
204 .codec_dai_name =
"twl4030-voice",
205 .platform_name =
"omap-pcm-audio",
206 .codec_name =
"twl4030-codec",
209 .init = sdp3430_twl4030_voice_init,
218 .dai_link = sdp3430_dai,
221 .dapm_widgets = sdp3430_twl4030_dapm_widgets,
222 .num_dapm_widgets =
ARRAY_SIZE(sdp3430_twl4030_dapm_widgets),
223 .dapm_routes = audio_map,
229 static int __init sdp3430_soc_init(
void)
234 if (!machine_is_omap_3430sdp())
239 if (!sdp3430_snd_device) {
244 platform_set_drvdata(sdp3430_snd_device, &snd_soc_sdp3430);
268 static void __exit sdp3430_soc_exit(
void)
270 snd_soc_jack_free_gpios(&hs_jack,
ARRAY_SIZE(hs_jack_gpios),