ASoC: rsnd: do error check after rsnd_channel_normalization()
SSI need to use rsnd_channel_normalization() for TDM-split mode, thus, channel check need to do after that. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/874l1aw39d.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0dce49efc7
commit
947ec14c73
|
@ -286,6 +286,11 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
|
||||||
if (rsnd_ssi_is_multi_slave(mod, io))
|
if (rsnd_ssi_is_multi_slave(mod, io))
|
||||||
return 0;
|
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->usrcnt > 0) {
|
||||||
if (ssi->rate != rate) {
|
if (ssi->rate != rate) {
|
||||||
dev_err(dev, "SSI parent/child should use same rate\n");
|
dev_err(dev, "SSI parent/child should use same rate\n");
|
||||||
|
@ -300,11 +305,6 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
|
||||||
return 0;
|
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);
|
main_rate = rsnd_ssi_clk_query(rdai, rate, chan, &idx);
|
||||||
if (!main_rate) {
|
if (!main_rate) {
|
||||||
dev_err(dev, "unsupported clock rate\n");
|
dev_err(dev, "unsupported clock rate\n");
|
||||||
|
|
Loading…
Reference in New Issue