MLK-15985-1: ASoC: fsl_ssi: remove the wrong fix for S20_3LE
authorShengjiu Wang <shengjiu.wang@nxp.com>
Mon, 4 Dec 2017 05:00:50 +0000 (13:00 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:50:00 +0000 (14:50 -0500)
This reverts commit 6ce4e9c184b7 ("MLK-15068: ASoC: fsl_ssi: fix the noise
issue with S20_3LE Mono bitsream")

The fix in MLK-15068 can't fix the mono noise issue, for using the
physical width imply that the sample with is 24, but the
CCSR_SSI_SxCCR_WL still using the 20 bit, the unalignment cause noise.
Or if change the CCSR_SSI_SxCCR_WL to 24bit, the volume is lower
for 24bit imply that the sample is shift 4bit right.

So the correct way is to change the mclk frequency in dts.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
sound/soc/fsl/fsl_ssi.c

index 3ba8bd1..c184590 100644 (file)
@@ -731,23 +731,17 @@ static int fsl_ssi_set_bclk(struct snd_pcm_substream *substream,
        u64 sub, savesub = 100000;
        unsigned int freq;
        bool baudclk_is_used;
-       snd_pcm_format_t sample_format = params_format(hw_params);
 
        /* Prefer the explicitly set bitclock frequency */
        if (ssi_private->bitclk_freq)
                freq = ssi_private->bitclk_freq;
        else {
-               if (params_channels(hw_params) == 1) {
+               if (params_channels(hw_params) == 1)
                        freq = 2 * params_width(hw_params) *
                                        params_rate(hw_params);
-
-                       if (sample_format == SNDRV_PCM_FORMAT_S20_3LE)
-                               freq = 2 * params_physical_width(hw_params) *
-                                               params_rate(hw_params);
-               } else {
+               else
                        freq = params_channels(hw_params) * 32 *
                                        params_rate(hw_params);
-               }
        }
 
        /* Don't apply it to any non-baudclk circumstance */