Skip to content

Commit 6e5f5bf

Browse files
Michael-zy2000broonie
authored andcommitted
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 <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4581468 commit 6e5f5bf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sound/soc/codecs/es8326.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,8 @@ static int es8326_resume(struct snd_soc_component *component)
10621062
es8326->hp = 0;
10631063
es8326->hpl_vol = 0x03;
10641064
es8326->hpr_vol = 0x03;
1065+
1066+
es8326_irq(es8326->irq, es8326);
10651067
return 0;
10661068
}
10671069

@@ -1072,6 +1074,9 @@ static int es8326_suspend(struct snd_soc_component *component)
10721074
cancel_delayed_work_sync(&es8326->jack_detect_work);
10731075
es8326_disable_micbias(component);
10741076
es8326->calibrated = false;
1077+
regmap_write(es8326->regmap, ES8326_CLK_MUX, 0x2d);
1078+
regmap_write(es8326->regmap, ES8326_DAC2HPMIX, 0x00);
1079+
regmap_write(es8326->regmap, ES8326_ANA_PDN, 0x3b);
10751080
regmap_write(es8326->regmap, ES8326_CLK_CTL, ES8326_CLK_OFF);
10761081
regcache_cache_only(es8326->regmap, true);
10771082
regcache_mark_dirty(es8326->regmap);

0 commit comments

Comments
 (0)