Message ID | 20180320010612.59E8E44007A@finisterre.ee.mobilebroadband |
---|---|
State | Accepted |
Commit | 8153362e757a7b971aa73e7747bdc2ca2acbe84b |
Headers | show |
Series | Applied "ASoC: rt286: don't turn off HV and VREF if headset is detected" to the asoc tree | expand |
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c index af6325c78292..e5c9d59c3967 100644 --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -275,9 +275,10 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic) regmap_read(rt286->regmap, RT286_GET_MIC1_SENSE, &buf); *mic = buf & 0x80000000; } - - snd_soc_dapm_disable_pin(dapm, "HV"); - snd_soc_dapm_disable_pin(dapm, "VREF"); + if (!*mic) { + snd_soc_dapm_disable_pin(dapm, "HV"); + snd_soc_dapm_disable_pin(dapm, "VREF"); + } if (!*hp) snd_soc_dapm_disable_pin(dapm, "LDO1"); snd_soc_dapm_sync(dapm);