ASoC: fsl_ssi: Fix TDM slot setup for I2S mode
authorAlexander Shiyan <shc_work@mail.ru>
Tue, 16 Feb 2021 11:42:21 +0000 (14:42 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 10 Mar 2021 12:48:30 +0000 (12:48 +0000)
commit87263968516fb9507d6215d53f44052627fae8d8
treea723cfb2ecfaa9492d3ffe5cc280bcb95d4f717b
parent0c0a5883783540a56e6a5dbf5868f045dbeaa888
ASoC: fsl_ssi: Fix TDM slot setup for I2S mode

When using the driver in I2S TDM mode, the _fsl_ssi_set_dai_fmt()
function rewrites the number of slots previously set by the
fsl_ssi_set_dai_tdm_slot() function to 2 by default.
To fix this, let's use the saved slot count value or, if TDM
is not used and the slot count is not set, proceed as before.

Fixes: 4f14f5c11db1 ("ASoC: fsl_ssi: Fix number of words per frame for I2S-slave mode")
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20210216114221.26635-1-shc_work@mail.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_ssi.c