summaryrefslogtreecommitdiff
path: root/sound/soc/mxs
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2016-02-03 16:18:20 +0300
committerMark Brown <broonie@kernel.org>2016-02-05 16:22:49 +0300
commit436e056c4ba368f13a5709a5a4a7f26fc238a5a6 (patch)
tree9a274499c8b25b2d751b09936fbde4105477a92a /sound/soc/mxs
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
downloadlinux-436e056c4ba368f13a5709a5a4a7f26fc238a5a6.tar.xz
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>
Diffstat (limited to 'sound/soc/mxs')
-rw-r--r--sound/soc/mxs/mxs-saif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index c866ade28ad0..cd04eb7ee753 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -408,7 +408,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;
}