OSDN Git Service

ASoC: rt5677: Stop and restart DSP over suspend/resume
authorBen Zhang <benzh@chromium.org>
Wed, 6 Nov 2019 01:13:31 +0000 (17:13 -0800)
committerMark Brown <broonie@kernel.org>
Mon, 11 Nov 2019 13:02:03 +0000 (13:02 +0000)
commit3f81068dc8e5fc0d3b0d67a5ae99c5140a4e96cb
tree09831ffbcb0a5297ca13d5f78f7a37284a186db1
parenteabf424f7b60246c76dcb0ea6f1e83ef9abbeaa6
ASoC: rt5677: Stop and restart DSP over suspend/resume

MCLK1 gets disabled at suspend and re-enabled at resume. Before
MCLK1 is re-enabled, if the DSP is already on (either the DSP was
left on during suspend, or the DSP is turned on early at resume),
i2c register read returns garbage and corrupts the regmap cache.

This patch stops the DSP before suspend and restarts it after
resume with a dalay to ensure MCLK is on while loading firmware.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20191106011335.223061-7-cujomalainey@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5677.c
sound/soc/codecs/rt5677.h