diff options
author | Tzung-Bi Shih <tzungbi@google.com> | 2020-12-25 11:08:45 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-01-05 14:34:17 +0000 |
commit | d750570e048165c54a99703729438b2a4ccf379b (patch) | |
tree | 917b7543ead13760ebb306c1622149a962b2fe76 /sound/soc/codecs/rt1015.c | |
parent | a1f31cc4e98e1833f53fd2c6e9a218d6b86f5388 (diff) | |
download | lwn-d750570e048165c54a99703729438b2a4ccf379b.tar.gz lwn-d750570e048165c54a99703729438b2a4ccf379b.zip |
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>
Diffstat (limited to 'sound/soc/codecs/rt1015.c')
-rw-r--r-- | sound/soc/codecs/rt1015.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c index bf452cc0096f..145724a5f389 100644 --- a/sound/soc/codecs/rt1015.c +++ b/sound/soc/codecs/rt1015.c @@ -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 |