summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2013-12-20 08:41:02 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:36:21 (GMT)
commit56257748698d892b79da80cff9dc8d1191c372f2 (patch)
tree4012f0170bdee062b06319824facdca4e60e54fd /sound
parentd88f9a0651a94d7a827a98f8bc08d3f04e0804b4 (diff)
downloadlinux-fsl-qoriq-56257748698d892b79da80cff9dc8d1191c372f2.tar.xz
ASoC: fsl_sai: Drop useless channels check in hw_params()
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> --- This patch is pulled back from upstream: commit d22e28cce80a93578787d273bf1fa26a2be2636b Change-Id: Ia3f1e1375c9a69d7f0259af8e801594be7b464e2 Reviewed-on: http://git.am.freescale.net:8181/19742 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_sai.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index d7b6950..8079f67 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -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);