diff options
-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: |