Message ID | 20180320010606.B701344007A@finisterre.ee.mobilebroadband |
---|---|
State | Accepted |
Commit | 40d2677bdadbd221f3e398877586a30d8065140c |
Headers | show |
Series | Applied "ASoC: rt298: don't turn off HV and VREF if headset is detected" to the asoc tree | expand |
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c index ce963768449f..ff52d0365cfa 100644 --- a/sound/soc/codecs/rt298.c +++ b/sound/soc/codecs/rt298.c @@ -290,9 +290,10 @@ static int rt298_jack_detect(struct rt298_priv *rt298, bool *hp, bool *mic) regmap_read(rt298->regmap, RT298_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);