summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorZeng Zhaoming <b32542@freescale.com>2010-10-13 07:11:55 +0800
committerZeng Zhaoming <b32542@freescale.com>2010-10-14 05:39:29 +0800
commitf3d827970a68078982f68e9c693494579e04c1ce (patch)
treefba96ae9a43a43ef0aecffcdf6f9699c4384549c /sound
parent70aff68ec795fe66b8bf6cf0d351e5e4a2522fc3 (diff)
ENGR00131925-2 ssi, sound: Add SSI3 support
Add ssi3 support for sound module, ssi3 not enabled by default. Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-pcm.c32
-rw-r--r--sound/soc/imx/imx-ssi.h4
2 files changed, 35 insertions, 1 deletions
diff --git a/sound/soc/imx/imx-pcm.c b/sound/soc/imx/imx-pcm.c
index 348fbaea672f..142e584ddf22 100644
--- a/sound/soc/imx/imx-pcm.c
+++ b/sound/soc/imx/imx-pcm.c
@@ -215,6 +215,38 @@ static int imx_get_sdma_transfer(int format, int dai_port,
else if (format == SNDRV_PCM_FORMAT_S20_3LE)
transfer = MXC_DMA_SSI2_24BIT_RX1;
}
+ } else if (dai_port == IMX_DAI_SSI4) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ if (format == SNDRV_PCM_FORMAT_S16_LE)
+ transfer = MXC_DMA_SSI3_16BIT_TX0;
+ else if (format == SNDRV_PCM_FORMAT_S24_LE)
+ transfer = MXC_DMA_SSI3_24BIT_TX0;
+ else if (format == SNDRV_PCM_FORMAT_S20_3LE)
+ transfer = MXC_DMA_SSI3_24BIT_TX0;
+ } else {
+ if (format == SNDRV_PCM_FORMAT_S16_LE)
+ transfer = MXC_DMA_SSI3_16BIT_RX0;
+ else if (format == SNDRV_PCM_FORMAT_S24_LE)
+ transfer = MXC_DMA_SSI3_24BIT_RX0;
+ else if (format == SNDRV_PCM_FORMAT_S20_3LE)
+ transfer = MXC_DMA_SSI3_24BIT_RX0;
+ }
+ } else if (dai_port == IMX_DAI_SSI5) {
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ if (format == SNDRV_PCM_FORMAT_S16_LE)
+ transfer = MXC_DMA_SSI3_16BIT_TX1;
+ else if (format == SNDRV_PCM_FORMAT_S24_LE)
+ transfer = MXC_DMA_SSI3_24BIT_TX1;
+ else if (format == SNDRV_PCM_FORMAT_S20_3LE)
+ transfer = MXC_DMA_SSI3_24BIT_TX1;
+ } else {
+ if (format == SNDRV_PCM_FORMAT_S16_LE)
+ transfer = MXC_DMA_SSI3_16BIT_RX1;
+ else if (format == SNDRV_PCM_FORMAT_S24_LE)
+ transfer = MXC_DMA_SSI3_24BIT_RX1;
+ else if (format == SNDRV_PCM_FORMAT_S20_3LE)
+ transfer = MXC_DMA_SSI3_24BIT_RX1;
+ }
} else if ((dai_port & IMX_DAI_ESAI_TX)
|| (dai_port & IMX_DAI_ESAI_RX)) {
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
diff --git a/sound/soc/imx/imx-ssi.h b/sound/soc/imx/imx-ssi.h
index 6da50a5ae415..6f0f24a2509d 100644
--- a/sound/soc/imx/imx-ssi.h
+++ b/sound/soc/imx/imx-ssi.h
@@ -198,13 +198,15 @@
#define SSI_RXFIFO_WATERMARK 0x6
/* Maximum number of ssi channels (counting two channels per block) */
-#define MAX_SSI_CHANNELS 8
+#define MAX_SSI_CHANNELS 12
/* i.MX DAI SSP ID's */
#define IMX_DAI_SSI0 0 /* SSI1 FIFO 0 */
#define IMX_DAI_SSI1 1 /* SSI1 FIFO 1 */
#define IMX_DAI_SSI2 2 /* SSI2 FIFO 0 */
#define IMX_DAI_SSI3 3 /* SSI2 FIFO 1 */
+#define IMX_DAI_SSI4 4 /* SSI3 FIFO 0 */
+#define IMX_DAI_SSI5 5 /* SSI3 FIFO 1 */
/* SSI clock sources */
#define IMX_SSP_SYS_CLK 0