With multi-instance case, the fsl_easrc_config_slot will be called
in parallel, the fsl_easrc_slot is independent with context, so
we need to lock to protect the access of fsl_easrc_config_slot,
otherwise, the slot configuration will be fail for some instance
that cause "input DMA task timeout".
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
{
struct fsl_easrc_context *ctx;
struct device *dev;
+ unsigned long lock_flags;
int ret;
/* to modify prefilter coeficients, the user must perform
if (ret)
return ret;
+ spin_lock_irqsave(&easrc->lock, lock_flags);
ret = fsl_easrc_config_slot(easrc, ctx->index);
+ spin_unlock_irqrestore(&easrc->lock, lock_flags);
if (ret)
return ret;