Skip to content

Commit

Permalink
ASoC: rsnd: do error check after rsnd_channel_normalization()
Browse files Browse the repository at this point in the history
SSI need to use rsnd_channel_normalization() for TDM-split mode,
thus, channel check need to do after that.

Signed-off-by: Kuninori Morimoto <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
morimoto authored and broonie committed Sep 18, 2019
1 parent 0dce49e commit 947ec14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sound/soc/sh/rcar/ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
if (rsnd_ssi_is_multi_slave(mod, io))
return 0;

if (rsnd_runtime_is_tdm_split(io))
chan = rsnd_io_converted_chan(io);

chan = rsnd_channel_normalization(chan);

if (ssi->usrcnt > 0) {
if (ssi->rate != rate) {
dev_err(dev, "SSI parent/child should use same rate\n");
Expand All @@ -300,11 +305,6 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
return 0;
}

if (rsnd_runtime_is_tdm_split(io))
chan = rsnd_io_converted_chan(io);

chan = rsnd_channel_normalization(chan);

main_rate = rsnd_ssi_clk_query(rdai, rate, chan, &idx);
if (!main_rate) {
dev_err(dev, "unsupported clock rate\n");
Expand Down

0 comments on commit 947ec14

Please sign in to comment.