mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ASoC: rockchip: i2s-tdm: Optimize WL for TDM mode
TDM mode use all FIFOs, the max burst is 16 word of DMAC, so we used the max FIFO to cover DDR dmc windows. 4 FIFOs controller: TDL: 16 word: WL = ((32 * 4) - 16) / 4 = 28 RDL: 16 word: WL = 16 / 4 = 4 Change-Id: Idd88e0615d7fd4ec8c36c72af1c0b1b2d716b43e Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -1024,6 +1024,9 @@ static void rockchip_i2s_tdm_xfer_stop(struct rk_i2s_tdm_dev *i2s_tdm,
|
||||
udelay(150);
|
||||
|
||||
rockchip_i2s_tdm_clear(i2s_tdm, clr);
|
||||
|
||||
dev_dbg(i2s_tdm->dev, "%s: stream: %d force: %d\n",
|
||||
__func__, stream, force);
|
||||
}
|
||||
|
||||
static void rockchip_i2s_tdm_xfer_trcm_start(struct rk_i2s_tdm_dev *i2s_tdm,
|
||||
@@ -2261,6 +2264,24 @@ static int rockchip_dai_tdm_slot(struct snd_soc_dai *dai,
|
||||
|
||||
regmap_update_bits(i2s_tdm->regmap, I2S_TXCR, mask, val);
|
||||
regmap_update_bits(i2s_tdm->regmap, I2S_RXCR, mask, val);
|
||||
/*
|
||||
* TDM mode use all FIFOs, the max burst is 16 word of DMAC,
|
||||
* so we used the max FIFO to cover DDR dmc windows.
|
||||
*
|
||||
* 4 FIFOs controller:
|
||||
*
|
||||
* TDL:
|
||||
*
|
||||
* 16 word: WL = ((32 * 4) - 16) / 4 = 28
|
||||
*
|
||||
* RDL:
|
||||
*
|
||||
* 16 word: WL = 16 / 4 = 4
|
||||
*/
|
||||
regmap_update_bits(i2s_tdm->regmap, I2S_DMACR, I2S_DMACR_TDL_MASK,
|
||||
I2S_DMACR_TDL(28));
|
||||
regmap_update_bits(i2s_tdm->regmap, I2S_DMACR, I2S_DMACR_RDL_MASK,
|
||||
I2S_DMACR_RDL(4));
|
||||
|
||||
pm_runtime_put(dai->dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user