summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorZhang Yi <zhangyi@everest-semi.com>2024-08-07 10:53:55 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-08 07:54:32 +0200
commit489f245e00f0f3dad9a7be89be15f1088d7e6fca (patch)
tree49cbb1172f8db16e003e72a1abbc626ce69115d4 /sound/soc
parent2eb143e0962ce62af081d7be43db24ed3d73b0d6 (diff)
downloadlinux-489f245e00f0f3dad9a7be89be15f1088d7e6fca.tar.gz
linux-489f245e00f0f3dad9a7be89be15f1088d7e6fca.tar.bz2
linux-489f245e00f0f3dad9a7be89be15f1088d7e6fca.zip
ASoC: codecs: ES8326: button detect issue
[ Upstream commit 4684a2df9c5b3fc914377127faf2515aa9049093 ] We find that we need to set snd_jack_types to 0. If not, there will be a probability of button detection errors Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20240807025356.24904-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/es8326.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index 6c263086c44d..32a9b26ee2c8 100644
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -617,6 +617,8 @@ static void es8326_jack_detect_handler(struct work_struct *work)
es8326_disable_micbias(es8326->component);
if (es8326->jack->status & SND_JACK_HEADPHONE) {
dev_dbg(comp->dev, "Report hp remove event\n");
+ snd_soc_jack_report(es8326->jack, 0,
+ SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2);
snd_soc_jack_report(es8326->jack, 0, SND_JACK_HEADSET);
/* mute adc when mic path switch */
regmap_write(es8326->regmap, ES8326_ADC_SCALE, 0x33);