Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: mxs-saif: check BUSY bit in hw_params() only if not mclk_in_use

If something else, typically a codec, has enabled mclk, the BUSY
bit may be set when hw_params() is called without this being an
error. This check thus causes intermittent failures to configure
the sound device when used in such a manner. Fix this by making
the test conditional on !saif->mclk_in_use.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Mans Rullgard and committed by
Mark Brown
436e056c 92e963f5

+1 -1
+1 -1
sound/soc/mxs/mxs-saif.c
··· 408 408 } 409 409 410 410 stat = __raw_readl(saif->base + SAIF_STAT); 411 - if (stat & BM_SAIF_STAT_BUSY) { 411 + if (!saif->mclk_in_use && (stat & BM_SAIF_STAT_BUSY)) { 412 412 dev_err(cpu_dai->dev, "error: busy\n"); 413 413 return -EBUSY; 414 414 }