summaryrefslogtreecommitdiffstats
path: root/sound/soc/rockchip
diff options
context:
space:
mode:
authorSugar Zhang <sugar.zhang@rock-chips.com>2017-06-09 16:52:46 +0800
committerMark Brown <broonie@kernel.org>2017-06-13 21:48:03 +0100
commit5894b91d1e700f38b4157df143be1502cf08daa8 (patch)
tree2cdd0cf276e9ab6f1af6d9cf2dbe660b046b1235 /sound/soc/rockchip
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
downloadtalos-obmc-linux-5894b91d1e700f38b4157df143be1502cf08daa8.tar.gz
talos-obmc-linux-5894b91d1e700f38b4157df143be1502cf08daa8.zip
ASoC: rockchip: i2s: add a delay before i2s clear
in order to guarantee i2s lrck signal integrity, when i2s stop, need at least one lrck cycle to ensure signal integrity. the max delay time is when lrck is 8khz, the delay time is 125us(1/8khz), using udelay(150) with a 25us margin. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip')
-rw-r--r--sound/soc/rockchip/rockchip_i2s.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index 974915cb4c4f..f54843342ee2 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -116,6 +116,7 @@ static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on)
I2S_XFER_TXS_STOP |
I2S_XFER_RXS_STOP);
+ udelay(150);
regmap_update_bits(i2s->regmap, I2S_CLR,
I2S_CLR_TXC | I2S_CLR_RXC,
I2S_CLR_TXC | I2S_CLR_RXC);
@@ -162,6 +163,7 @@ static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
I2S_XFER_TXS_STOP |
I2S_XFER_RXS_STOP);
+ udelay(150);
regmap_update_bits(i2s->regmap, I2S_CLR,
I2S_CLR_TXC | I2S_CLR_RXC,
I2S_CLR_TXC | I2S_CLR_RXC);
OpenPOWER on IntegriCloud