summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorSugar Zhang <sugar.zhang@rock-chips.com>2018-10-22 10:02:39 +0800
committerTao Huang <huangtao@rock-chips.com>2018-10-22 17:48:48 +0800
commit09a517954d19f0690eeb4d2ef4509cb73d18575b (patch)
treee839793acd5784b59d2e46127ed9c646d06ed621 /sound
parent1d469d53c25b106bf27336bcf1c5bdf2365361b8 (diff)
ASoC: rockchip: pdm: adjust waterlevel in frame unit
This patch make the waterlevel more reasonable, because the pdm controller share the single FIFO(128 entries) with each channel. adjust waterlevel in frame to meet the vad or dma frames request. Change-Id: I9b5808e55025347d435f47889f39ba34ac07ea1c Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/rockchip/rockchip_pdm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index 432ffb435fe7..477fc6275359 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -255,8 +255,9 @@ static int rockchip_pdm_hw_params(struct snd_pcm_substream *substream,
regmap_update_bits(pdm->regmap, PDM_CTRL0,
PDM_PATH_MSK | PDM_VDW_MSK,
val);
+ /* all channels share the single FIFO */
regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, PDM_DMA_RDL_MSK,
- PDM_DMA_RDL(16));
+ PDM_DMA_RDL(8 * params_channels(params)));
return 0;
}