ASoC: rsnd: tidyup SSICR::SWSP for TDM
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 17 Oct 2018 01:55:57 +0000 (01:55 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 17 Oct 2018 19:01:31 +0000 (20:01 +0100)
R-Car datasheet is indicating that WS output settings of SSICR::SWSP
is inverted on TDM mode from non TDM mode settings.
But, it is meaning that TDM should use 0 here.
Without this patch, sound input/output 1ch will be 2ch, 2ch will be 3ch
..., be jumbled on I2S + TDM settings. This patch fixup it.
This patch is tested on R-Car H3 ulcb-kf board, SSI3/4 TDM sound.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/ssi.c

index b42a0e0feab7c91ce4dd7e7cfc098e9198f653c3..fcb4df23248c163b287ff39aab02dd6b2970b237 100644 (file)
@@ -392,7 +392,7 @@ static void rsnd_ssi_config_init(struct rsnd_mod *mod,
 
        if (rdai->bit_clk_inv)
                cr_own |= SCKP;
-       if (rdai->frm_clk_inv is_tdm)
+       if (rdai->frm_clk_inv && !is_tdm)
                cr_own |= SWSP;
        if (rdai->data_alignment)
                cr_own |= SDTA;