]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: fsl_ssi: Fix bclk calculation for mono channel
authorShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 16 Jun 2020 02:53:48 +0000 (10:53 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 16 Jun 2020 11:14:51 +0000 (12:14 +0100)
commitca2df7ff2e5fcaa7d1bc725040b69d38ea371b67
tree7689eeb3bfcccb78600cfe2aa582c7b5a21b4ead
parent78e4f9a7799bbeb5112dc44450c7ded43fd6b447
ASoC: fsl_ssi: Fix bclk calculation for mono channel

For mono channel, SSI will switch to Normal mode.

In Normal mode and Network mode, the Word Length Control bits
control the word length divider in clock generator, which is
different with I2S Master mode (the word length is fixed to
32bit), it should be the value of params_width(hw_params).

The condition "slots == 2" is not good for I2S Master mode,
because for Network mode and Normal mode, the slots can also
be 2. Then we need to use (ssi->i2s_net & SSI_SCR_I2S_MODE_MASK)
to check if it is I2S Master mode.

So we refine the formula for mono channel, otherwise there
will be sound issue for S24_LE.

Fixes: 856d77685032 ("ASoC: fsl_ssi: Caculate bit clock rate using slot number and width")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/034eff1435ff6ce300b6c781130cefd9db22ab9a.1592276147.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_ssi.c