Skip to content

Commit ce0d012

Browse files
XiaoTan Luorkhuangtao
authored andcommitted
ASoC: rockchip: pdm: Fix record error at the 2nd time
Signed-off-by: XiaoTan Luo <[email protected]> Change-Id: Ifd239c8a467fc4d77ff354ff724d9bb83db046ce
1 parent 9c557a7 commit ce0d012

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sound/soc/rockchip/rockchip_pdm.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ static int rockchip_pdm_runtime_suspend(struct device *dev)
418418
{
419419
struct rk_pdm_dev *pdm = dev_get_drvdata(dev);
420420

421+
regcache_cache_only(pdm->regmap, true);
421422
clk_disable_unprepare(pdm->clk);
422423
clk_disable_unprepare(pdm->hclk);
423424

@@ -441,6 +442,13 @@ static int rockchip_pdm_runtime_resume(struct device *dev)
441442
return ret;
442443
}
443444

445+
regcache_cache_only(pdm->regmap, false);
446+
regcache_mark_dirty(pdm->regmap);
447+
ret = regcache_sync(pdm->regmap);
448+
if (ret) {
449+
clk_disable_unprepare(pdm->clk);
450+
clk_disable_unprepare(pdm->hclk);
451+
}
444452
return 0;
445453
}
446454

0 commit comments

Comments
 (0)