diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-16 12:11:14 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-19 10:09:05 -0400 |
commit | 093208f5d03980d7216b706e3c54432d0f299e26 (patch) | |
tree | 8bdfd2fe1de4e940a07d07f9db6e6b4959ad3c8a | |
parent | a655b96c2404245ee1c309a4b199b92812b09651 (diff) |
ASoC: Hook up microphone jack detection on 1133-EV1 board
Note that since all the microphones share a bias there is a single
jack exported for all three, even though there are two physical
connectors plus the soldered down silicon mic. Note also that the SiMic
is always present by default.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r-- | sound/soc/imx/wm1133-ev1.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/imx/wm1133-ev1.c b/sound/soc/imx/wm1133-ev1.c index 0af987e94223..cec8bae7ac18 100644 --- a/sound/soc/imx/wm1133-ev1.c +++ b/sound/soc/imx/wm1133-ev1.c | |||
@@ -203,6 +203,13 @@ static struct snd_soc_jack_pin hp_jack_pins[] = { | |||
203 | { .pin = "Headphone Jack", .mask = SND_JACK_HEADPHONE }, | 203 | { .pin = "Headphone Jack", .mask = SND_JACK_HEADPHONE }, |
204 | }; | 204 | }; |
205 | 205 | ||
206 | static struct snd_soc_jack mic_jack; | ||
207 | |||
208 | static struct snd_soc_jack_pin mic_jack_pins[] = { | ||
209 | { .pin = "Mic1 Jack", .mask = SND_JACK_MICROPHONE }, | ||
210 | { .pin = "Mic2 Jack", .mask = SND_JACK_MICROPHONE }, | ||
211 | }; | ||
212 | |||
206 | static int wm1133_ev1_init(struct snd_soc_codec *codec) | 213 | static int wm1133_ev1_init(struct snd_soc_codec *codec) |
207 | { | 214 | { |
208 | struct snd_soc_card *card = codec->socdev->card; | 215 | struct snd_soc_card *card = codec->socdev->card; |
@@ -219,6 +226,14 @@ static int wm1133_ev1_init(struct snd_soc_codec *codec) | |||
219 | hp_jack_pins); | 226 | hp_jack_pins); |
220 | wm8350_hp_jack_detect(codec, WM8350_JDR, &hp_jack, SND_JACK_HEADPHONE); | 227 | wm8350_hp_jack_detect(codec, WM8350_JDR, &hp_jack, SND_JACK_HEADPHONE); |
221 | 228 | ||
229 | /* Microphone jack detection */ | ||
230 | snd_soc_jack_new(card, "Microphone", | ||
231 | SND_JACK_MICROPHONE | SND_JACK_BTN_0, &mic_jack); | ||
232 | snd_soc_jack_add_pins(&mic_jack, ARRAY_SIZE(mic_jack_pins), | ||
233 | mic_jack_pins); | ||
234 | wm8350_mic_jack_detect(codec, &mic_jack, SND_JACK_MICROPHONE, | ||
235 | SND_JACK_BTN_0); | ||
236 | |||
222 | return 0; | 237 | return 0; |
223 | } | 238 | } |
224 | 239 | ||