Skip to content

Commit 12eb3ad

Browse files
shumingfanbroonie
authored andcommitted
ASoC: rt286: fix unexpected interrupt happens
The HV/VREF should not turn off if the headphone jack plug-in. This patch could solve the unexpected interrupt issue in some devices. Signed-off-by: Shuming Fan <[email protected]> Tested-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 01283d5 commit 12eb3ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/soc/codecs/rt286.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@ static int rt286_jack_detect(struct rt286_priv *rt286, bool *hp, bool *mic)
272272
regmap_read(rt286->regmap, RT286_GET_MIC1_SENSE, &buf);
273273
*mic = buf & 0x80000000;
274274
}
275-
if (!*mic) {
275+
276+
if (!*hp) {
276277
snd_soc_dapm_disable_pin(dapm, "HV");
277278
snd_soc_dapm_disable_pin(dapm, "VREF");
278-
}
279-
if (!*hp)
280279
snd_soc_dapm_disable_pin(dapm, "LDO1");
281-
snd_soc_dapm_sync(dapm);
280+
snd_soc_dapm_sync(dapm);
281+
}
282282

283283
return 0;
284284
}

0 commit comments

Comments
 (0)