diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2018-12-17 16:19:32 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:48:39 +0800 |
commit | 37baed62f6318b44eb386dd69eba06fd2a00dede (patch) | |
tree | c189e026daa22ac0f2434ce5469537ca131d105a /sound/soc/fsl/fsl_asrc.c | |
parent | c630d624624954b3a8a2b04a8e8c9511a710a81a (diff) |
MLK-18182: ASoC: fsl_asrc: increase the retry times
When 3 asrc pair are working in parallel, there will be
error log randomly
output DMA task timeout
fsl-asrc 2034000.asrc: Pair B: failed to process buffer: -62
The reason is that the initialization is not finished for
some pair, the prefill data is failed to be input in FIFO.
The patch is to increase the retry times to make sure that
initialization is success.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_asrc.c')
-rw-r--r-- | sound/soc/fsl/fsl_asrc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 1daf6b611e13..3e69ba34d352 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c @@ -485,7 +485,7 @@ static void fsl_asrc_start_pair(struct fsl_asrc_pair *pair) { struct fsl_asrc *asrc_priv = pair->asrc_priv; enum asrc_pair_index index = pair->index; - int reg, retry = 10, i; + int reg, retry = 50, i; /* Enable the current pair */ regmap_update_bits(asrc_priv->regmap, REG_ASRCTR, @@ -498,6 +498,9 @@ static void fsl_asrc_start_pair(struct fsl_asrc_pair *pair) reg &= ASRCFG_INIRQi_MASK(index); } while (!reg && --retry); + if (retry == 0) + pair_warn("initialization is not finished\n"); + /* Make the input fifo to ASRC STALL level */ regmap_read(asrc_priv->regmap, REG_ASRCNCR, ®); for (i = 0; i < pair->channels * 4; i++) @@ -1156,7 +1159,7 @@ static int fsl_asrc_runtime_resume(struct device *dev) int i, ret; u32 asrctr; u32 reg; - int retry = 10; + int retry = 50; ret = clk_prepare_enable(asrc_priv->mem_clk); if (ret) @@ -1200,6 +1203,9 @@ static int fsl_asrc_runtime_resume(struct device *dev) reg = (reg >> ASRCFG_INIRQi_SHIFT(0)) & 0x7; } while (!(reg == ((asrctr & 0xE) >> 1)) && --retry); + if (retry == 0) + dev_warn(dev, "initialization is not finished\n"); + return 0; disable_asrck_clk: |