From: Nicolin Chen Date: Thu, 9 Jan 2014 10:42:48 +0000 (+0800) Subject: ASoC: fsl_ssi: Set default slot number for common cases X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2b56b5f02029531007c8601b23f282b840715401;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: fsl_ssi: Set default slot number for common cases For those platforms using DAI master mode like I2S, it's better to pre-set a default slot number so that there's no need for these common cases to set the slot number from its machine driver any more. Signed-off-by: Nicolin Chen Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 6c2f040f49ae..7864ec5cf5f9 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -711,6 +711,17 @@ static int fsl_ssi_setup(struct fsl_ssi_private *ssi_private) if (ssi_private->imx_ac97) fsl_ssi_setup_ac97(ssi_private); + /* + * Set a default slot number so that there is no need for those common + * cases like I2S mode to call the extra set_tdm_slot() any more. + */ + if (!ssi_private->imx_ac97) { + write_ssi_mask(&ssi->stccr, CCSR_SSI_SxCCR_DC_MASK, + CCSR_SSI_SxCCR_DC(2)); + write_ssi_mask(&ssi->srccr, CCSR_SSI_SxCCR_DC_MASK, + CCSR_SSI_SxCCR_DC(2)); + } + return 0; }