From: Mans Rullgard <mans@mansr.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: mxs-saif: check BUSY bit in hw_params() only if not mclk_in_use
Date: Wed, 3 Feb 2016 13:18:20 +0000 [thread overview]
Message-ID: <1454505500-30384-1-git-send-email-mans@mansr.com> (raw)
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
next reply other threads:[~2016-02-03 13:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 13:18 Mans Rullgard [this message]
2016-02-05 13:19 ` [PATCH] ASoC: mxs-saif: check BUSY bit in hw_params() only if not mclk_in_use 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454505500-30384-1-git-send-email-mans@mansr.com \
--to=mans@mansr.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).