]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.42/asoc-rockchip-pdm-fix-regmap_ops-hang-issue.patch
Linux 4.14.118
[thirdparty/kernel/stable-queue.git] / releases / 4.19.42 / asoc-rockchip-pdm-fix-regmap_ops-hang-issue.patch
1 From f15246223f4b1cfa8f84e645703e2e47c2461b30 Mon Sep 17 00:00:00 2001
2 From: Sugar Zhang <sugar.zhang@rock-chips.com>
3 Date: Wed, 3 Apr 2019 21:40:45 +0800
4 Subject: ASoC: rockchip: pdm: fix regmap_ops hang issue
5
6 [ Upstream commit c85064435fe7a216ec0f0238ef2b8f7cd850a450 ]
7
8 This is because set_fmt ops maybe called when PD is off,
9 and in such case, regmap_ops will lead system hang.
10 enale PD before doing regmap_ops.
11
12 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
13 Signed-off-by: Mark Brown <broonie@kernel.org>
14 Signed-off-by: Sasha Levin <sashal@kernel.org>
15 ---
16 sound/soc/rockchip/rockchip_pdm.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19 diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
20 index 400e29edb1c9c..8a2e3bbce3a16 100644
21 --- a/sound/soc/rockchip/rockchip_pdm.c
22 +++ b/sound/soc/rockchip/rockchip_pdm.c
23 @@ -208,7 +208,9 @@ static int rockchip_pdm_set_fmt(struct snd_soc_dai *cpu_dai,
24 return -EINVAL;
25 }
26
27 + pm_runtime_get_sync(cpu_dai->dev);
28 regmap_update_bits(pdm->regmap, PDM_CLK_CTRL, mask, val);
29 + pm_runtime_put(cpu_dai->dev);
30
31 return 0;
32 }
33 --
34 2.20.1
35