Skip to content

Commit

Permalink
ASoC: rsnd: Fix parent SSI start/stop in multi-SSI mode
Browse files Browse the repository at this point in the history
The parent SSI of a multi-SSI setup must be fully setup, started and
stopped since it is also part of the playback/capture setup. So only
skip the SSI (as per commit 203cdf5 ("ASoC: rsnd: SSI parent cares
SWSP bit") and commit 597b046 ("ASoC: rsnd: control SSICR::EN
correctly")) if the SSI is parent outside of a multi-SSI setup.

Signed-off-by: Matthias Blankertz <[email protected]>
Acked-by: Kuninori Morimoto <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Matthias Blankertz authored and broonie committed Apr 16, 2020
1 parent 5bd7044 commit a09fb3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/soc/sh/rcar/ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static void rsnd_ssi_config_init(struct rsnd_mod *mod,
* We shouldn't exchange SWSP after running.
* This means, parent needs to care it.
*/
if (rsnd_ssi_is_parent(mod, io))
if (rsnd_ssi_is_parent(mod, io) && !rsnd_ssi_multi_slaves(io))
goto init_end;

if (rsnd_io_is_play(io))
Expand Down Expand Up @@ -559,7 +559,7 @@ static int rsnd_ssi_start(struct rsnd_mod *mod,
* EN is for data output.
* SSI parent EN is not needed.
*/
if (rsnd_ssi_is_parent(mod, io))
if (rsnd_ssi_is_parent(mod, io) && !rsnd_ssi_multi_slaves(io))
return 0;

ssi->cr_en = EN;
Expand All @@ -582,7 +582,7 @@ static int rsnd_ssi_stop(struct rsnd_mod *mod,
if (!rsnd_ssi_is_run_mods(mod, io))
return 0;

if (rsnd_ssi_is_parent(mod, io))
if (rsnd_ssi_is_parent(mod, io) && !rsnd_ssi_multi_slaves(io))
return 0;

cr = ssi->cr_own |
Expand Down Expand Up @@ -620,7 +620,7 @@ static int rsnd_ssi_irq(struct rsnd_mod *mod,
if (rsnd_is_gen1(priv))
return 0;

if (rsnd_ssi_is_parent(mod, io))
if (rsnd_ssi_is_parent(mod, io) && !rsnd_ssi_multi_slaves(io))
return 0;

if (!rsnd_ssi_is_run_mods(mod, io))
Expand Down

0 comments on commit a09fb3f

Please sign in to comment.