mirror of https://gitee.com/openkylin/linux.git
Merge series "ASoC: rsnd: multi-SSI setup fixes" from Matthias Blankertz <matthias.blankertz@cetitec.com>:
Fix rsnd_dai_call() operations being performed twice for the master SSI
in multi-SSI setups, and fix the rsnd_ssi_stop operation for multi-SSI
setups.
The only visible effect of these issues was some "status check failed"
spam when the rsnd_ssi_stop was called, but overall the code is cleaner
now, and some questionable writes to the SSICR register which did not
lead to any observable misbehaviour but were contrary to the datasheet
are fixed.
Mark:
The first patch kind of reverts my "ASoC: rsnd: Fix parent SSI
start/stop in multi-SSI mode" from a few days ago and achieves the same
effect in a simpler fashion, if you would prefer a clean patch series
based on v5.6 drop me a note.
Greetings,
Matthias
Matthias Blankertz (2):
ASoC: rsnd: Don't treat master SSI in multi SSI setup as parent
ASoC: rsnd: Fix "status check failed" spam for multi-SSI
sound/soc/sh/rcar/ssi.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
base-commit: 15a5760cb8
--
2.26.1
This commit is contained in:
commit
bce3216961
|
@ -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) && !rsnd_ssi_multi_slaves(io))
|
||||
if (rsnd_ssi_is_parent(mod, io))
|
||||
goto init_end;
|
||||
|
||||
if (rsnd_io_is_play(io))
|
||||
|
@ -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) && !rsnd_ssi_multi_slaves(io))
|
||||
if (rsnd_ssi_is_parent(mod, io))
|
||||
return 0;
|
||||
|
||||
ssi->cr_en = EN;
|
||||
|
@ -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) && !rsnd_ssi_multi_slaves(io))
|
||||
if (rsnd_ssi_is_parent(mod, io))
|
||||
return 0;
|
||||
|
||||
cr = ssi->cr_own |
|
||||
|
@ -594,10 +594,16 @@ static int rsnd_ssi_stop(struct rsnd_mod *mod,
|
|||
* Capture: It might not receave data. Do nothing
|
||||
*/
|
||||
if (rsnd_io_is_play(io)) {
|
||||
rsnd_mod_write(mod, SSICR, cr | EN);
|
||||
rsnd_mod_write(mod, SSICR, cr | ssi->cr_en);
|
||||
rsnd_ssi_status_check(mod, DIRQ);
|
||||
}
|
||||
|
||||
/* In multi-SSI mode, stop is performed by setting ssi0129 in
|
||||
* SSI_CONTROL to 0 (in rsnd_ssio_stop_gen2). Do nothing here.
|
||||
*/
|
||||
if (rsnd_ssi_multi_slaves_runtime(io))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* disable SSI,
|
||||
* and, wait idle state
|
||||
|
@ -620,7 +626,7 @@ static int rsnd_ssi_irq(struct rsnd_mod *mod,
|
|||
if (rsnd_is_gen1(priv))
|
||||
return 0;
|
||||
|
||||
if (rsnd_ssi_is_parent(mod, io) && !rsnd_ssi_multi_slaves(io))
|
||||
if (rsnd_ssi_is_parent(mod, io))
|
||||
return 0;
|
||||
|
||||
if (!rsnd_ssi_is_run_mods(mod, io))
|
||||
|
@ -737,6 +743,9 @@ static void rsnd_ssi_parent_attach(struct rsnd_mod *mod,
|
|||
if (!rsnd_rdai_is_clk_master(rdai))
|
||||
return;
|
||||
|
||||
if (rsnd_ssi_is_multi_slave(mod, io))
|
||||
return;
|
||||
|
||||
switch (rsnd_mod_id(mod)) {
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
Loading…
Reference in New Issue