]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: rt5650: fix the wrong result of key button
authorShuming Fan <shumingf@realtek.com>
Fri, 13 Oct 2023 09:45:25 +0000 (17:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 10:21:09 +0000 (11:21 +0100)
[ Upstream commit f88dfbf333b3661faff996bb03af2024d907b76a ]

The RT5650 should enable a power setting for button detection to avoid the wrong result.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20231013094525.715518-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/rt5645.c

index 01de25813c72b277919f51a82f1e0fb78c53ed76..822c42101c3f029cb8f19ba12592c6126b6a1e88 100644 (file)
@@ -3220,6 +3220,8 @@ int rt5645_set_jack_detect(struct snd_soc_codec *codec,
                                RT5645_GP1_PIN_IRQ, RT5645_GP1_PIN_IRQ);
                regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL1,
                                RT5645_DIG_GATE_CTRL, RT5645_DIG_GATE_CTRL);
+               regmap_update_bits(rt5645->regmap, RT5645_DEPOP_M1,
+                               RT5645_HP_CB_MASK, RT5645_HP_CB_PU);
        }
        rt5645_irq(0, rt5645);