[alsa-devel] [PATCH v5 5/8] ASoC: fsl-ssi: Set framerate divider correctly for i2s master mode

Markus Pargmann mpa at pengutronix.de
Tue May 27 10:24:22 CEST 2014

From: Sascha Hauer <s.hauer at pengutronix.de>

In i2s master mode the fsl_ssi driver depends on someone calling
.set_tdm_slot correctly. In this mode though only a DC value of
2 is allowed, so set it in this case and no longer depend on

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
Signed-off-by: Markus Pargmann <mpa at pengutronix.de>
Tested-By: Michael Grzeschik <mgr at pengutronix.de>
 sound/soc/fsl/fsl_ssi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index b3033d9..dbcde10 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -709,6 +709,10 @@ static int _fsl_ssi_set_dai_fmt(struct fsl_ssi_private *ssi_private,
 		switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
 			ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_MASTER;
+			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));
 			ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_SLAVE;

More information about the Alsa-devel mailing list