summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-16 16:11:14 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-19 14:09:05 +0000
commit093208f5d03980d7216b706e3c54432d0f299e26 (patch)
tree8bdfd2fe1de4e940a07d07f9db6e6b4959ad3c8a /sound
parenta655b96c2404245ee1c309a4b199b92812b09651 (diff)
downloadop-kernel-dev-093208f5d03980d7216b706e3c54432d0f299e26.zip
op-kernel-dev-093208f5d03980d7216b706e3c54432d0f299e26.tar.gz
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/wm1133-ev1.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/imx/wm1133-ev1.c b/sound/soc/imx/wm1133-ev1.c
index 0af987e..cec8bae 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[] = {
{ .pin = "Headphone Jack", .mask = SND_JACK_HEADPHONE },
};
+static struct snd_soc_jack mic_jack;
+
+static struct snd_soc_jack_pin mic_jack_pins[] = {
+ { .pin = "Mic1 Jack", .mask = SND_JACK_MICROPHONE },
+ { .pin = "Mic2 Jack", .mask = SND_JACK_MICROPHONE },
+};
+
static int wm1133_ev1_init(struct snd_soc_codec *codec)
{
struct snd_soc_card *card = codec->socdev->card;
@@ -219,6 +226,14 @@ static int wm1133_ev1_init(struct snd_soc_codec *codec)
hp_jack_pins);
wm8350_hp_jack_detect(codec, WM8350_JDR, &hp_jack, SND_JACK_HEADPHONE);
+ /* Microphone jack detection */
+ snd_soc_jack_new(card, "Microphone",
+ SND_JACK_MICROPHONE | SND_JACK_BTN_0, &mic_jack);
+ snd_soc_jack_add_pins(&mic_jack, ARRAY_SIZE(mic_jack_pins),
+ mic_jack_pins);
+ wm8350_mic_jack_detect(codec, &mic_jack, SND_JACK_MICROPHONE,
+ SND_JACK_BTN_0);
+
return 0;
}
OpenPOWER on IntegriCloud