ASoC: fsl-ssi: Set framerate divider correctly for i2s master mode
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 27 May 2014 08:24:22 +0000 (10:24 +0200)
committerMark Brown <broonie@linaro.org>
Sun, 1 Jun 2014 10:55:08 +0000 (11:55 +0100)
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
.set_tdm_slot.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/fsl/fsl_ssi.c

index b3033d9..dbcde10 100644 (file)
@@ -709,6 +709,10 @@ static int _fsl_ssi_set_dai_fmt(struct fsl_ssi_private *ssi_private,
                switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
                case SND_SOC_DAIFMT_CBS_CFS:
                        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));
                        break;
                case SND_SOC_DAIFMT_CBM_CFM:
                        ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_SLAVE;