]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: fsl-ssi: Transmit enable synchronization
authorMarkus Pargmann <mpa@pengutronix.de>
Mon, 28 Apr 2014 10:54:51 +0000 (12:54 +0200)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:16:52 +0000 (21:16 -0600)
When the fsl-ssi unit is used in i2s slave mode, it is possible that the
SSI unit starts transmitting data on the wrong channel. This happens
because the SSI does not synchronize with the left-right-clock by
default.

This patch enables transmit enable synchronization.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 504894799fa122822f5c48be2968e04d3f1af8e8)

sound/soc/fsl/fsl_ssi.c
sound/soc/fsl/fsl_ssi.h

index 7314d6fdab64cf28a6f5d77cf0523f9106676b01..a42e0a0d7494ddf1f6f3ada33b3044fbac2dd8dd 100644 (file)
@@ -590,6 +590,7 @@ static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
        fsl_ssi_setup_reg_vals(ssi_private);
 
        scr = read_ssi(&ssi->scr) & ~(CCSR_SSI_SCR_SYN | CCSR_SSI_SCR_I2S_MODE_MASK);
+       scr |= CCSR_SSI_SCR_SYNC_TX_FS;
 
        mask = CCSR_SSI_STCR_TXBIT0 | CCSR_SSI_STCR_TFDIR | CCSR_SSI_STCR_TXDIR |
                CCSR_SSI_STCR_TSCKP | CCSR_SSI_STCR_TFSI | CCSR_SSI_STCR_TFSL |
index 2e95dd7a21057c73c7fa7e9160dbc0a3402b9b94..71c3e7e4340d208f3504b4f644662ecca202ab9b 100644 (file)
@@ -39,6 +39,7 @@ struct ccsr_ssi {
        __be32 saccdis; /* 0x.0058 - SSI AC97 Channel Disable Register */
 };
 
+#define CCSR_SSI_SCR_SYNC_TX_FS                0x00001000
 #define CCSR_SSI_SCR_RFR_CLK_DIS       0x00000800
 #define CCSR_SSI_SCR_TFR_CLK_DIS       0x00000400
 #define CCSR_SSI_SCR_TCH_EN            0x00000100