ASoC: rockchip: pdm: Fix record error at the 2nd time

Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: Ifd239c8a467fc4d77ff354ff724d9bb83db046ce
This commit is contained in:
XiaoTan Luo
2022-04-29 14:37:04 +08:00
committed by Tao Huang
parent 9c557a7559
commit ce0d012e79

View File

@@ -418,6 +418,7 @@ static int rockchip_pdm_runtime_suspend(struct device *dev)
{
struct rk_pdm_dev *pdm = dev_get_drvdata(dev);
regcache_cache_only(pdm->regmap, true);
clk_disable_unprepare(pdm->clk);
clk_disable_unprepare(pdm->hclk);
@@ -441,6 +442,13 @@ static int rockchip_pdm_runtime_resume(struct device *dev)
return ret;
}
regcache_cache_only(pdm->regmap, false);
regcache_mark_dirty(pdm->regmap);
ret = regcache_sync(pdm->regmap);
if (ret) {
clk_disable_unprepare(pdm->clk);
clk_disable_unprepare(pdm->hclk);
}
return 0;
}