blob: 9fd7f9f9e992e08bcf7fc3707714211d32f8ebcf [file] [log] [blame]
From ce687366db4611d9259bb5d2fd44b7c04fd38e09 Mon Sep 17 00:00:00 2001
From: Junya Monden <>
Date: Wed, 16 Oct 2019 14:42:55 +0200
Subject: [PATCH] ASoC: rsnd: Reinitialize bit clock inversion flag for every
format setting
commit 22e58665a01006d05f0239621f7d41cacca96cc4 upstream.
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 <>
Cc: Jiada Wang <>
Cc: Timo Wischer <>
Cc: # v3.17+
Signed-off-by: Junya Monden <>
Signed-off-by: Eugeniu Rosca <>
Acked-by: Kuninori Morimoto <>
Signed-off-by: Mark Brown <>
Signed-off-by: Paul Gortmaker <>
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 37cb61553d5f..4579827ea7c7 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;
rdai->sys_delay = 0;