]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: fsl_sai: Drop useless channels check in hw_params()
authorNicolin Chen <Guangyu.Chen@freescale.com>
Fri, 20 Dec 2013 08:41:02 +0000 (16:41 +0800)
committerMark Brown <broonie@linaro.org>
Sat, 21 Dec 2013 14:47:29 +0000 (14:47 +0000)
SAi only supports two data channels on hardware level and the driver also does
register the min->1 and max->2, so no need to check channels.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/fsl_sai.c

index e68102e63521ee52c82be16be6ff8141f282cd35..8450bff6fb1350c85b5a001f7b9d7bfaed1d60c6 100644 (file)
@@ -278,10 +278,7 @@ static int fsl_sai_hw_params(struct snd_pcm_substream *substream,
                val_cr5 |= FSL_SAI_CR5_FBT(0);
 
        val_cr4 |= FSL_SAI_CR4_FRSZ(channels);
-       if (channels == 2 || channels == 1)
-               val_mr = ~0UL - ((1 << channels) - 1);
-       else
-               return -EINVAL;
+       val_mr = ~0UL - ((1 << channels) - 1);
 
        sai_writel(sai, val_cr4, sai->base + reg_cr4);
        sai_writel(sai, val_cr5, sai->base + reg_cr5);