Skip to content

Commit

Permalink
ASoC: Hook up microphone jack detection on 1133-EV1 board
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Mar 19, 2010
1 parent a655b96 commit 093208f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sound/soc/imx/wm1133-ev1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 093208f

Please sign in to comment.