From: Fabio Estevam <festevam@gmail.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, arnaud.mouiche@invoxia.com,
timur@tabi.org, caleb@crome.org, nicoleotsuka@gmail.com,
Fabio Estevam <fabio.estevam@nxp.com>,
max.krummenacher@toradex.com, mpa@pengutronix.de
Subject: [PATCH] ASoC: fsl_ssi: Fix channel swap on playback start
Date: Fri, 31 Mar 2017 19:15:03 -0300 [thread overview]
Message-ID: <1490998503-1191-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@nxp.com>
Commit f8fdf5375e2005f2 ("ASoC: fsl-ssi: add SSIEN errata work around")
implemented the workaround for the following erratum found on i.MX35
errata document:
ENGcm06222: SSI:Transmission does not take place in bit length early
frame sync configuration
and also for ENGcm06222 from the same document.
However it has been only applied for AC97 mode. Apply it to I2S mode
as well so that it can fix audio channel swap during playback start.
The channel swap can be noticed in about 10% of the times an audio track
starts.
With the recommended workaround in place no more channel swap
happened after running audio start/stop sequence in more than
2000 times.
Tested on a mx6dl-wandboard.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
sound/soc/fsl/fsl_ssi.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index fde08660..17f92b8 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -93,6 +93,9 @@
CCSR_SSI_SIER_TLS_EN | CCSR_SSI_SIER_TFS_EN | \
CCSR_SSI_SIER_TUE0_EN | CCSR_SSI_SIER_TFRC_EN)
+#define FSLSSI_SSIEN_WORKAROUND (CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | \
+ CCSR_SSI_SCR_RE)
+
enum fsl_ssi_type {
FSL_SSI_MCP8610,
FSL_SSI_MX21,
@@ -559,7 +562,8 @@ static void fsl_ssi_config(struct fsl_ssi_private *ssi_private, bool enable,
int i;
int max_loop = 100;
regmap_update_bits(regs, CCSR_SSI_SCR,
- CCSR_SSI_SCR_SSIEN, CCSR_SSI_SCR_SSIEN);
+ FSLSSI_SSIEN_WORKAROUND,
+ FSLSSI_SSIEN_WORKAROUND);
for (i = 0; i < max_loop; i++) {
u32 sfcsr;
regmap_read(regs, CCSR_SSI_SFCSR, &sfcsr);
@@ -650,8 +654,7 @@ static void fsl_ssi_setup_ac97(struct fsl_ssi_private *ssi_private)
* codec before a stream is started.
*/
regmap_update_bits(regs, CCSR_SSI_SCR,
- CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE,
- CCSR_SSI_SCR_SSIEN | CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE);
+ FSLSSI_SSIEN_WORKAROUND, FSLSSI_SSIEN_WORKAROUND);
regmap_write(regs, CCSR_SSI_SOR, CCSR_SSI_SOR_WAIT(3));
}
--
2.7.4
next reply other threads:[~2017-03-31 22:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 22:15 Fabio Estevam [this message]
2017-03-31 23:53 ` [PATCH] ASoC: fsl_ssi: Fix channel swap on playback start Nicolin Chen
2017-04-01 0:59 ` Fabio Estevam
2017-04-01 1:20 ` Nicolin Chen
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=1490998503-1191-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.mouiche@invoxia.com \
--cc=broonie@kernel.org \
--cc=caleb@crome.org \
--cc=fabio.estevam@nxp.com \
--cc=max.krummenacher@toradex.com \
--cc=mpa@pengutronix.de \
--cc=nicoleotsuka@gmail.com \
--cc=timur@tabi.org \
/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