Commit d750570e authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Mark Brown

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: default avatarTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20201225030845.4138497-1-tzungbi@google.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a1f31cc4
...@@ -1035,7 +1035,6 @@ static int rt1015_probe(struct snd_soc_component *component) ...@@ -1035,7 +1035,6 @@ static int rt1015_probe(struct snd_soc_component *component)
rt1015->component = component; rt1015->component = component;
rt1015->bclk_ratio = 0; rt1015->bclk_ratio = 0;
rt1015->cali_done = 0;
INIT_DELAYED_WORK(&rt1015->flush_work, rt1015_flush_work); INIT_DELAYED_WORK(&rt1015->flush_work, rt1015_flush_work);
...@@ -1093,6 +1092,10 @@ static int rt1015_resume(struct snd_soc_component *component) ...@@ -1093,6 +1092,10 @@ static int rt1015_resume(struct snd_soc_component *component)
regcache_cache_only(rt1015->regmap, false); regcache_cache_only(rt1015->regmap, false);
regcache_sync(rt1015->regmap); regcache_sync(rt1015->regmap);
if (rt1015->cali_done)
rt1015_calibrate(rt1015);
return 0; return 0;
} }
#else #else
......
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