Skip to contentSkip to conversation

ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting

PATCH In review Eugeniu Rosca 3 participants 3 messages Oct 16, 2019 – Oct 18, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting

From: Junya Monden <[email protected]>

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 <[email protected]>
Cc Jiada Wang <[email protected]>
Cc Timo Wischer <[email protected]>
Cc [email protected] # v3.17+
---
 sound/soc/sh/rcar/core.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/sh/rcar/core.c +1 -0
index bda5b958d0dc..e9596c2096cd 100644
@@ -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;
Signature · 1 line
2.23.0
Acked-by on v1 1/1
#1 lore raw

Hi

Quoted 7 lines

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.

Quoted 8 lines
Fixes 1a7889ca8aba3 ("ASoC: rsnd: fixup SND_SOC_DAIFMT_xB_xF behavior")
Cc Andrew Gabbasov <[email protected]>
Cc Jiada Wang <[email protected]>
Cc Timo Wischer <[email protected]>
Cc [email protected] # v3.17+

---

maintainer
#2 lore raw

Applied "ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting" to the asoc tree

In reply to Eugeniu Rosca

The patch

ASoC: rsnd: Reinitialize bit clock inversion flag for every format setting

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.4

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

From 22e58665a01006d05f0239621f7d41cacca96cc4 Mon Sep 17 00:00:00 2001
From: Junya Monden <[email protected]>
Date: Wed, 16 Oct 2019 14:42:55 +0200
Subject: [PATCH] ASoC: rsnd: Reinitialize bit clock inversion flag for every
format setting

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 <[email protected]>
Cc Jiada Wang <[email protected]>
Cc Timo Wischer <[email protected]>
Cc [email protected] # v3.17+
---
 sound/soc/sh/rcar/core.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/sh/rcar/core.c +1 -0
index bda5b958d0dc..e9596c2096cd 100644
@@ -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;
Signature · 1 line
2.20.1