提交 246126b0 编写于 作者: B Bard Liao 提交者: Mark Brown

ASoC: rt5665: increase button detection accuracy

Use sar adc for button detection to increase accuracy.
Signed-off-by: NBard Liao <bardliao@realtek.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 09b50c37
...@@ -1139,7 +1139,8 @@ static void rt5665_enable_push_button_irq(struct snd_soc_codec *codec, ...@@ -1139,7 +1139,8 @@ static void rt5665_enable_push_button_irq(struct snd_soc_codec *codec,
bool enable) bool enable)
{ {
if (enable) { if (enable) {
snd_soc_write(codec, RT5665_4BTN_IL_CMD_1, 0x000b); snd_soc_write(codec, RT5665_4BTN_IL_CMD_1, 0x0003);
snd_soc_update_bits(codec, RT5665_SAR_IL_CMD_9, 0x1, 0x1);
snd_soc_write(codec, RT5665_IL_CMD_1, 0x0048); snd_soc_write(codec, RT5665_IL_CMD_1, 0x0048);
snd_soc_update_bits(codec, RT5665_4BTN_IL_CMD_2, snd_soc_update_bits(codec, RT5665_4BTN_IL_CMD_2,
RT5665_4BTN_IL_MASK | RT5665_4BTN_IL_RST_MASK, RT5665_4BTN_IL_MASK | RT5665_4BTN_IL_RST_MASK,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册