mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-20 15:27:52 +07:00
ASoC: rsnd: care SWSP bit for TDM/non-TDM
SSICR::SWSP bit controls WS signal low/high, but in case of TDM it is inverted. This patch solves this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
575f1f929f
commit
f98ed119a7
@ -265,6 +265,9 @@ static int rsnd_ssi_config_init(struct rsnd_ssi *ssi,
|
|||||||
u32 cr_own;
|
u32 cr_own;
|
||||||
u32 cr_mode;
|
u32 cr_mode;
|
||||||
u32 wsr;
|
u32 wsr;
|
||||||
|
int is_tdm;
|
||||||
|
|
||||||
|
is_tdm = (rsnd_get_slot_runtime(io) >= 6) ? 1 : 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* always use 32bit system word.
|
* always use 32bit system word.
|
||||||
@ -274,7 +277,7 @@ static int rsnd_ssi_config_init(struct rsnd_ssi *ssi,
|
|||||||
|
|
||||||
if (rdai->bit_clk_inv)
|
if (rdai->bit_clk_inv)
|
||||||
cr_own |= SCKP;
|
cr_own |= SCKP;
|
||||||
if (rdai->frm_clk_inv)
|
if (rdai->frm_clk_inv ^ is_tdm)
|
||||||
cr_own |= SWSP;
|
cr_own |= SWSP;
|
||||||
if (rdai->data_alignment)
|
if (rdai->data_alignment)
|
||||||
cr_own |= SDTA;
|
cr_own |= SDTA;
|
||||||
@ -307,7 +310,7 @@ static int rsnd_ssi_config_init(struct rsnd_ssi *ssi,
|
|||||||
* rsnd_ssiu_init_gen2()
|
* rsnd_ssiu_init_gen2()
|
||||||
*/
|
*/
|
||||||
wsr = ssi->wsr;
|
wsr = ssi->wsr;
|
||||||
if (rsnd_get_slot_runtime(io) >= 6) {
|
if (is_tdm) {
|
||||||
wsr |= WS_MODE;
|
wsr |= WS_MODE;
|
||||||
cr_own |= CHNL_8;
|
cr_own |= CHNL_8;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user