Commit 4684a2df authored by Zhang Yi's avatar Zhang Yi Committed by Mark Brown

ASoC: codecs: ES8326: button detect issue

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: default avatarZhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20240807025356.24904-2-zhangyi@everest-semi.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 23a58b78
...@@ -843,6 +843,8 @@ static void es8326_jack_detect_handler(struct work_struct *work) ...@@ -843,6 +843,8 @@ static void es8326_jack_detect_handler(struct work_struct *work)
es8326_disable_micbias(es8326->component); es8326_disable_micbias(es8326->component);
if (es8326->jack->status & SND_JACK_HEADPHONE) { if (es8326->jack->status & SND_JACK_HEADPHONE) {
dev_dbg(comp->dev, "Report hp remove event\n"); 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); snd_soc_jack_report(es8326->jack, 0, SND_JACK_HEADSET);
/* mute adc when mic path switch */ /* mute adc when mic path switch */
regmap_write(es8326->regmap, ES8326_ADC1_SRC, 0x44); regmap_write(es8326->regmap, ES8326_ADC1_SRC, 0x44);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment