MLK-18979-2: ASoC: fsl_asrc: add initial check in resume
If the initialization is not finished, then we input data to the FIFO will fail, which still cause the error "output dma task timeout" So we need to ad initial check in the resume. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
This commit is contained in:
committed by
Dong Aisheng
parent
e620dc8f1b
commit
2b242b487e
@ -1214,6 +1214,8 @@ static int fsl_asrc_runtime_resume(struct device *dev)
|
||||
struct fsl_asrc_priv *asrc_priv = asrc->private;
|
||||
int i, ret;
|
||||
u32 asrctr;
|
||||
u32 reg;
|
||||
int retry = 10;
|
||||
|
||||
ret = clk_prepare_enable(asrc->mem_clk);
|
||||
if (ret)
|
||||
@ -1250,6 +1252,13 @@ static int fsl_asrc_runtime_resume(struct device *dev)
|
||||
regmap_update_bits(asrc->regmap, REG_ASRCTR,
|
||||
ASRCTR_ASRCEi_ALL_MASK, asrctr);
|
||||
|
||||
/* Wait for status of initialization */
|
||||
do {
|
||||
udelay(5);
|
||||
regmap_read(asrc->regmap, REG_ASRCFG, ®);
|
||||
reg = (reg >> ASRCFG_INIRQi_SHIFT(0)) & 0x7;
|
||||
} while (!(reg == ((asrctr & 0xE) >> 1)) && --retry);
|
||||
|
||||
return 0;
|
||||
|
||||
disable_asrck_clk:
|
||||
|
||||
Reference in New Issue
Block a user