ASoC: codecs: ES8326: Solve a headphone detection issue after suspend and resume

We got a headphone detection issue after suspend and resume.
And we fixed it by modifying the configuration at es8326_suspend
and invoke es8326_irq at es8326_resume.

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://msgid.link/r/20240402062043.20608-4-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Zhang Yi 2024-04-02 14:20:42 +08:00 committed by Mark Brown
parent 4581468d07
commit 6e5f5bf894
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1062,6 +1062,8 @@ static int es8326_resume(struct snd_soc_component *component)
es8326->hp = 0;
es8326->hpl_vol = 0x03;
es8326->hpr_vol = 0x03;
es8326_irq(es8326->irq, es8326);
return 0;
}
@ -1072,6 +1074,9 @@ static int es8326_suspend(struct snd_soc_component *component)
cancel_delayed_work_sync(&es8326->jack_detect_work);
es8326_disable_micbias(component);
es8326->calibrated = false;
regmap_write(es8326->regmap, ES8326_CLK_MUX, 0x2d);
regmap_write(es8326->regmap, ES8326_DAC2HPMIX, 0x00);
regmap_write(es8326->regmap, ES8326_ANA_PDN, 0x3b);
regmap_write(es8326->regmap, ES8326_CLK_CTL, ES8326_CLK_OFF);
regcache_cache_only(es8326->regmap, true);
regcache_mark_dirty(es8326->regmap);