diff options
author | Carlo Caione <carlo@endlessm.com> | 2016-02-16 16:27:19 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-19 11:25:23 -0500 |
commit | 2303b32f54289267adb75437cdeba50be92221f5 (patch) | |
tree | bd327bb2a6c34835b35d49aa8230a17b2b4e9c9f | |
parent | 8cca87c073ac38c7866fb86205fc9ff312a3a575 (diff) |
ASoC: cht_bsw_rt5645: Enable jack detection
Add missing DAPM pins and enable jack detection on those pins for
Cherrytrail and Braswell.
Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/boards/cht_bsw_rt5645.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index e6cf800ab231..c7af2715b3f9 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c | |||
@@ -147,6 +147,17 @@ static const struct snd_kcontrol_new cht_mc_controls[] = { | |||
147 | SOC_DAPM_PIN_SWITCH("Ext Spk"), | 147 | SOC_DAPM_PIN_SWITCH("Ext Spk"), |
148 | }; | 148 | }; |
149 | 149 | ||
150 | static struct snd_soc_jack_pin cht_bsw_jack_pins[] = { | ||
151 | { | ||
152 | .pin = "Headphone", | ||
153 | .mask = SND_JACK_HEADPHONE, | ||
154 | }, | ||
155 | { | ||
156 | .pin = "Headset Mic", | ||
157 | .mask = SND_JACK_MICROPHONE, | ||
158 | }, | ||
159 | }; | ||
160 | |||
150 | static int cht_aif1_hw_params(struct snd_pcm_substream *substream, | 161 | static int cht_aif1_hw_params(struct snd_pcm_substream *substream, |
151 | struct snd_pcm_hw_params *params) | 162 | struct snd_pcm_hw_params *params) |
152 | { | 163 | { |
@@ -202,9 +213,9 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) | |||
202 | else | 213 | else |
203 | jack_type = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE; | 214 | jack_type = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE; |
204 | 215 | ||
205 | ret = snd_soc_card_jack_new(runtime->card, "Headset Jack", | 216 | ret = snd_soc_card_jack_new(runtime->card, "Headset", |
206 | jack_type, &ctx->jack, | 217 | jack_type, &ctx->jack, |
207 | NULL, 0); | 218 | cht_bsw_jack_pins, ARRAY_SIZE(cht_bsw_jack_pins)); |
208 | if (ret) { | 219 | if (ret) { |
209 | dev_err(runtime->dev, "Headset jack creation failed %d\n", ret); | 220 | dev_err(runtime->dev, "Headset jack creation failed %d\n", ret); |
210 | return ret; | 221 | return ret; |