Skip to content

Commit

Permalink
ASoC: fsl_ssi: Set default slot number for common cases
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Nicolin Chen authored and broonie committed Jan 9, 2014
1 parent e1cffe8 commit 2b56b5f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sound/soc/fsl/fsl_ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2b56b5f

Please sign in to comment.