summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSugar Zhang <sugar.zhang@rock-chips.com>2019-04-03 21:40:45 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-10 17:53:11 +0200
commita8f82720673d41b85145f232c954fe3a365f72b5 (patch)
tree4bb14db388c162eaee8711ce0bf28a103f77a2d6
parent5d60a0661058612ec612caf9672f24a40a9c7765 (diff)
downloadlinux-stable-a8f82720673d41b85145f232c954fe3a365f72b5.tar.gz
linux-stable-a8f82720673d41b85145f232c954fe3a365f72b5.tar.bz2
linux-stable-a8f82720673d41b85145f232c954fe3a365f72b5.zip
ASoC: rockchip: pdm: fix regmap_ops hang issue
[ Upstream commit c85064435fe7a216ec0f0238ef2b8f7cd850a450 ] This is because set_fmt ops maybe called when PD is off, and in such case, regmap_ops will lead system hang. enale PD before doing regmap_ops. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--sound/soc/rockchip/rockchip_pdm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index 400e29edb1c9..8a2e3bbce3a1 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -208,7 +208,9 @@ static int rockchip_pdm_set_fmt(struct snd_soc_dai *cpu_dai,
return -EINVAL;
}
+ pm_runtime_get_sync(cpu_dai->dev);
regmap_update_bits(pdm->regmap, PDM_CLK_CTRL, mask, val);
+ pm_runtime_put(cpu_dai->dev);
return 0;
}