All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: mxs-saif: check BUSY bit in hw_params() only if not mclk_in_use
@ 2016-02-03 13:18 Mans Rullgard
  2016-02-05 13:19 ` Mark Brown
  2016-02-05 13:35 ` Applied "ASoC: mxs-saif: check BUSY bit in hw_params() only if not mclk_in_use" to the asoc tree Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Mans Rullgard @ 2016-02-03 13:18 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel

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>
---
 sound/soc/mxs/mxs-saif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index a6c7b8d87cd2..13631003cb7c 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -418,7 +418,7 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
 	}
 
 	stat = __raw_readl(saif->base + SAIF_STAT);
-	if (stat & BM_SAIF_STAT_BUSY) {
+	if (!saif->mclk_in_use && (stat & BM_SAIF_STAT_BUSY)) {
 		dev_err(cpu_dai->dev, "error: busy\n");
 		return -EBUSY;
 	}
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-05 16:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 13:18 [PATCH] ASoC: mxs-saif: check BUSY bit in hw_params() only if not mclk_in_use Mans Rullgard
2016-02-05 13:19 ` Mark Brown
2016-02-05 13:23   ` Måns Rullgård
2016-02-05 13:37     ` Mark Brown
2016-02-05 13:43       ` Måns Rullgård
2016-02-05 16:00         ` Mark Brown
2016-02-05 13:35 ` Applied "ASoC: mxs-saif: check BUSY bit in hw_params() only if not mclk_in_use" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.