ASoC: rsnd: enable TDM settings for SSI parent
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 17 Oct 2018 01:55:37 +0000 (01:55 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 17 Oct 2018 19:01:30 +0000 (20:01 +0100)
Some SSIs are sharing each pins (= WS/CLK pin for playback/capture).
Then, SSI parent needs control WS/CLK setting for SSI slave.
In such case, SSI parent needs TDM settings if SSI slave is working as
TDM mode. But it is not cared in current driver.
It can't capture TDM sound without this patch if SSIs were pin sharing.
This patch is tested on R-Car H3 ulcb-kf board, SSI3/4 with 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 3adcc4f778f76ef460fd11d8fb1e83740c1d83b2..b42a0e0feab7c91ce4dd7e7cfc098e9198f653c3 100644 (file)
@@ -399,6 +399,17 @@ static void rsnd_ssi_config_init(struct rsnd_mod *mod,
        if (rdai->sys_delay)
                cr_own |= DEL;
 
+       /*
+        * TDM Mode
+        * see
+        *      rsnd_ssiu_init_gen2()
+        */
+       wsr = ssi->wsr;
+       if (is_tdm) {
+               wsr     |= WS_MODE;
+               cr_own  |= CHNL_8;
+       }
+
        /*
         * We shouldn't exchange SWSP after running.
         * This means, parent needs to care it.
@@ -429,16 +440,6 @@ static void rsnd_ssi_config_init(struct rsnd_mod *mod,
                cr_mode = DIEN;         /* PIO : enable Data interrupt */
        }
 
-       /*
-        * TDM Extend Mode
-        * see
-        *      rsnd_ssiu_init_gen2()
-        */
-       wsr = ssi->wsr;
-       if (is_tdm) {
-               wsr     |= WS_MODE;
-               cr_own  |= CHNL_8;
-       }
 init_end:
        ssi->cr_own     = cr_own;
        ssi->cr_mode    = cr_mode;