aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-12-02 02:34:28 -0500
committerMark Brown <broonie@kernel.org>2015-12-02 06:15:27 -0500
commitf98ed119a7c5feacb1fc1c8d7f6c68934cd27384 (patch)
tree243b0d52a7d3c80c0836ce9db5c95e104f2f8d2a /sound/soc/sh
parent575f1f929f5a2ed80130c294aa7b2dc40dba74f2 (diff)
ASoC: rsnd: care SWSP bit for TDM/non-TDM
SSICR::SWSP bit controls WS signal low/high, but in case of TDM it is inverted. This patch solves this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r--sound/soc/sh/rcar/ssi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 628739f13f99..79c3211a1e7f 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -265,6 +265,9 @@ static int rsnd_ssi_config_init(struct rsnd_ssi *ssi,
265 u32 cr_own; 265 u32 cr_own;
266 u32 cr_mode; 266 u32 cr_mode;
267 u32 wsr; 267 u32 wsr;
268 int is_tdm;
269
270 is_tdm = (rsnd_get_slot_runtime(io) >= 6) ? 1 : 0;
268 271
269 /* 272 /*
270 * always use 32bit system word. 273 * always use 32bit system word.
@@ -274,7 +277,7 @@ static int rsnd_ssi_config_init(struct rsnd_ssi *ssi,
274 277
275 if (rdai->bit_clk_inv) 278 if (rdai->bit_clk_inv)
276 cr_own |= SCKP; 279 cr_own |= SCKP;
277 if (rdai->frm_clk_inv) 280 if (rdai->frm_clk_inv ^ is_tdm)
278 cr_own |= SWSP; 281 cr_own |= SWSP;
279 if (rdai->data_alignment) 282 if (rdai->data_alignment)
280 cr_own |= SDTA; 283 cr_own |= SDTA;
@@ -307,7 +310,7 @@ static int rsnd_ssi_config_init(struct rsnd_ssi *ssi,
307 * rsnd_ssiu_init_gen2() 310 * rsnd_ssiu_init_gen2()
308 */ 311 */
309 wsr = ssi->wsr; 312 wsr = ssi->wsr;
310 if (rsnd_get_slot_runtime(io) >= 6) { 313 if (is_tdm) {
311 wsr |= WS_MODE; 314 wsr |= WS_MODE;
312 cr_own |= CHNL_8; 315 cr_own |= CHNL_8;
313 } 316 }