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>
Tue, 23 Feb 2021 13:45:08 +0000 (13:45 +0000)
commit9fd914d917da05641b42cab7d40bdf8ab06dac3b
tree5217c46c315bae0a239c11d94c747014cb811781
parent2d003ec15396cc8ffa2a887605c98a967de3078d
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