summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorBard Liao <bardliao@realtek.com>2016-10-24 18:32:18 +0800
committerMark Brown <broonie@kernel.org>2016-10-24 16:03:00 +0100
commitf515c3834a4adf8b33f0e7215d434410b1687164 (patch)
treeab331245e26b39dd7a869bb16f1deecb52e76ebc /sound
parent1001354ca34179f3db924eb66672442a173147dc (diff)
downloadlinux-f515c3834a4adf8b33f0e7215d434410b1687164.tar.gz
linux-f515c3834a4adf8b33f0e7215d434410b1687164.tar.bz2
linux-f515c3834a4adf8b33f0e7215d434410b1687164.zip
ASoC: rt298: fix jack type detect error
rt298_jack_detect may be called before card is instantiated. And snd_soc_dapm_force_enable_pin will not work in that case. So, update bit manually by regmap_update_bits. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/rt298.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index 55558643166f..2db8179047ae 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.c
@@ -249,6 +249,11 @@ static int rt298_jack_detect(struct rt298_priv *rt298, bool *hp, bool *mic)
snd_soc_dapm_force_enable_pin(dapm, "LDO1");
snd_soc_dapm_sync(dapm);
+ regmap_update_bits(rt298->regmap,
+ RT298_POWER_CTRL1, 0x1001, 0);
+ regmap_update_bits(rt298->regmap,
+ RT298_POWER_CTRL2, 0x4, 0x4);
+
regmap_write(rt298->regmap, RT298_SET_MIC1, 0x24);
msleep(50);