summaryrefslogtreecommitdiff
path: root/sound/soc/imx/imx-pcm.c
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/soc/imx/imx-pcm.c
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/soc/imx/imx-pcm.c')
-rw-r--r--sound/soc/imx/imx-pcm.c32
1 files changed, 32 insertions, 0 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) {