From 39e5d980362d0fc2e65b79caa4ab57782d410839 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 2 Dec 2011 15:55:52 +0000 Subject: [PATCH] --- yaml --- r: 283845 b: refs/heads/master c: f2e2026c98b74028b55901711c5df98e6d2ad8c6 h: refs/heads/master i: 283843: 049cd45c4e164380f69cc54efa92e8775f286a8b v: v3 --- [refs] | 2 +- trunk/sound/soc/samsung/littlemill.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8ed3b99a1d24..2f6fed703fc8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3631e8d43e385e851f88637244a287433246c097 +refs/heads/master: f2e2026c98b74028b55901711c5df98e6d2ad8c6 diff --git a/trunk/sound/soc/samsung/littlemill.c b/trunk/sound/soc/samsung/littlemill.c index d2a44ab3c207..5d7680f4b7c1 100644 --- a/trunk/sound/soc/samsung/littlemill.c +++ b/trunk/sound/soc/samsung/littlemill.c @@ -154,8 +154,11 @@ static struct snd_soc_dapm_route audio_paths[] = { { "Headphone", NULL, "HPOUT1R" }, }; +static struct snd_soc_jack littlemill_headset; + static int littlemill_late_probe(struct snd_soc_card *card) { + struct snd_soc_codec *codec = card->rtd[0].codec; struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; int ret; @@ -164,6 +167,18 @@ static int littlemill_late_probe(struct snd_soc_card *card) if (ret < 0) return ret; + ret = snd_soc_jack_new(codec, "Headset", + SND_JACK_HEADSET | SND_JACK_MECHANICAL | + SND_JACK_BTN_0 | SND_JACK_BTN_1 | + SND_JACK_BTN_2 | SND_JACK_BTN_3 | + SND_JACK_BTN_4 | SND_JACK_BTN_5, + &littlemill_headset); + if (ret) + return ret; + + /* This will check device compatibility itself */ + wm8958_mic_detect(codec, &littlemill_headset, NULL, NULL); + return 0; }