From: Eugeniu Rosca <erosca@de.adit-jv.com>
To: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
<linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org>
Cc: Eugeniu Rosca <erosca@de.adit-jv.com>,
Eugeniu Rosca <roscaeugeniu@gmail.com>,
Junya Monden <jmonden@jp.adit-jv.com>,
Andrew Gabbasov <andrew_gabbasov@mentor.com>,
Jiada Wang <jiada_wang@mentor.com>,
Timo Wischer <twischer@de.adit-jv.com>, <stable@vger.kernel.org>
Subject: [PATCH] ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting
Date: Wed, 16 Oct 2019 14:42:55 +0200 [thread overview]
Message-ID: <20191016124255.7442-1-erosca@de.adit-jv.com> (raw)
From: Junya Monden <jmonden@jp.adit-jv.com>
Unlike other format-related DAI parameters, rdai->bit_clk_inv flag
is not properly re-initialized when setting format for new stream
processing. The inversion, if requested, is then applied not to default,
but to a previous value, which leads to SCKP bit in SSICR register being
set incorrectly.
Fix this by re-setting the flag to its initial value, determined by format.
Fixes: 1a7889ca8aba3 ("ASoC: rsnd: fixup SND_SOC_DAIFMT_xB_xF behavior")
Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Cc: Jiada Wang <jiada_wang@mentor.com>
Cc: Timo Wischer <twischer@de.adit-jv.com>
Cc: stable@vger.kernel.org # v3.17+
Signed-off-by: Junya Monden <jmonden@jp.adit-jv.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
---
sound/soc/sh/rcar/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index bda5b958d0dc..e9596c2096cd 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -761,6 +761,7 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
}
/* set format */
+ rdai->bit_clk_inv = 0;
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
rdai->sys_delay = 0;
--
2.23.0
next reply other threads:[~2019-10-16 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 12:42 Eugeniu Rosca [this message]
2019-10-16 23:50 ` [PATCH] ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting Kuninori Morimoto
2019-10-18 18:07 ` Applied "ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting" 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=20191016124255.7442-1-erosca@de.adit-jv.com \
--to=erosca@de.adit-jv.com \
--cc=alsa-devel@alsa-project.org \
--cc=andrew_gabbasov@mentor.com \
--cc=broonie@kernel.org \
--cc=jiada_wang@mentor.com \
--cc=jmonden@jp.adit-jv.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=perex@perex.cz \
--cc=roscaeugeniu@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
--cc=twischer@de.adit-jv.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).