Skip to content

Commit

Permalink
ASoC: fsl_sai: Drop useless channels check in hw_params()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolin Chen authored and Mark Brown committed Dec 21, 2013
1 parent 1d70030 commit d22e28c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/fsl/fsl_sai.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d22e28c

Please sign in to comment.