summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5663.c
diff options
context:
space:
mode:
authoroder_chiou@realtek.com2017-12-14 02:54:07 +0100
committerMark Brown2017-12-14 12:13:33 +0100
commit958d022e326810fd762505bd02007aced79ffcbc (patch)
tree8e5f58ada4b53a80738c7f671f1ee6a777d8012f /sound/soc/codecs/rt5663.c
parentLinux 4.15-rc1 (diff)
downloadkernel-qcow2-linux-958d022e326810fd762505bd02007aced79ffcbc.tar.gz
kernel-qcow2-linux-958d022e326810fd762505bd02007aced79ffcbc.tar.xz
kernel-qcow2-linux-958d022e326810fd762505bd02007aced79ffcbc.zip
ASoC: rt5663: Fix the wrong result of the first jack detection
In the first jack detection while booting, the result will always show as headset, even we insert the headphone. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5663.c')
-rw-r--r--sound/soc/codecs/rt5663.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index b036c9dc0c8c..d329bf719d80 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -1560,6 +1560,10 @@ static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)
RT5663_IRQ_POW_SAV_MASK, RT5663_IRQ_POW_SAV_EN);
snd_soc_update_bits(codec, RT5663_IRQ_1,
RT5663_EN_IRQ_JD1_MASK, RT5663_EN_IRQ_JD1_EN);
+ snd_soc_update_bits(codec, RT5663_EM_JACK_TYPE_1,
+ RT5663_EM_JD_MASK, RT5663_EM_JD_RST);
+ snd_soc_update_bits(codec, RT5663_EM_JACK_TYPE_1,
+ RT5663_EM_JD_MASK, RT5663_EM_JD_NOR);
while (true) {
regmap_read(rt5663->regmap, RT5663_INT_ST_2, &val);