Skip to content

Commit

Permalink
ASoC: rockchip: pdm: fix regmap_ops hang issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sugar Zhang authored and Mark Brown committed Apr 4, 2019
1 parent 42bf029 commit c850644
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/rockchip/rockchip_pdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c850644

Please sign in to comment.