mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user