ASoC: rt1015: re-calibrate again when resuming
Assuming the calibration state gets lost after system suspend. Re-calibrates again when resuming. The rt1015_priv is alloced by kzalloc. No need to initialize cali_done to 0 in component probe callback. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20201225030845.4138497-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
a1f31cc4e9
commit
d750570e04
|
@ -1035,7 +1035,6 @@ static int rt1015_probe(struct snd_soc_component *component)
|
|||
|
||||
rt1015->component = component;
|
||||
rt1015->bclk_ratio = 0;
|
||||
rt1015->cali_done = 0;
|
||||
|
||||
INIT_DELAYED_WORK(&rt1015->flush_work, rt1015_flush_work);
|
||||
|
||||
|
@ -1093,6 +1092,10 @@ static int rt1015_resume(struct snd_soc_component *component)
|
|||
|
||||
regcache_cache_only(rt1015->regmap, false);
|
||||
regcache_sync(rt1015->regmap);
|
||||
|
||||
if (rt1015->cali_done)
|
||||
rt1015_calibrate(rt1015);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue