MLK-14781-1: ASoC: fsl_ssi: fix noise issue for master and mono mode
authorShengjiu Wang <shengjiu.wang@freescale.com>
Wed, 3 May 2017 02:57:10 +0000 (10:57 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:22:06 +0000 (15:22 -0500)
commit28d9d6d121b60c69ef69cbdbd6527d78326914ef
tree21b5bc589789042a5f0f5d5b159cd52a29fcd5fb
parentd4d2253c961aed7d67fb9844710e123df34f0220
MLK-14781-1: ASoC: fsl_ssi: fix noise issue for master and mono mode

The case is 32kHz/24bit/1channel bit stream, and ssi is in master mode.

The driver will switch to normal mode for 1 channel, so the slot width
is not fixed to 32 bit in this mode, and even in mono mode, the slot
number is 2, but the bit clock calulation still use the bit width=32,
and slot number=1, which cause the output frameclock is not correct.
So there will be noise in output sound.

This patch is to change the bit clock formula of mono mode, which is
2channels * params_width * sample rate.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
sound/soc/fsl/fsl_ssi.c