ARM: DaVinci: ASoC: Add mcasp support for DM646x
PATCH v2 1/6 ARM: DaVinci: ASoC: Add mcasp support for DM646x
From: Naresh.Medisetty <[email protected]>
Adds driver support for the two instances of McASP on TI's DM646x.
The multichannel audio serial port (McASP) functions as a general-purpose audio serial port optimized for the needs of multichannel audio application.
(http://www.ti.com/litv/pdf/spruer1b).
There are two instances of McASP on DM646x. The McASP0 module includes up to 4 serializers that can be individually enabled to either transmit or receive in different modes. The McASP1 module is limited with only 1 pinned-out serializer that can be enabled to only transmit in DIT mode (neither receiving in any mode nor transmitting in either Burst or TDM mode is supported).
The codec on the DM646x EVM is AIC32 which is connected to Serializer0 and Serializer1 of McASP0. The McASP0 consists of transmit and receive sections that may operate synchronized, or completely independently with separate master clocks, bit clocks, and frame syncs, and using different transmit modes with different bit-stream formats.
---
This patch applies against ALSA mainline - that's the topic/asoc branch of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
sound/soc/davinci/Kconfig | 15 +- sound/soc/davinci/Makefile | 3 + sound/soc/davinci/davinci-i2s-mcasp.c | 890 +++++++++++++++++++++++++++++++++ sound/soc/davinci/davinci-i2s-mcasp.h | 56 ++ sound/soc/davinci/davinci-pcm.h | 17 +- 5 files changed, 972 insertions(+), 9 deletions(-) create mode 100644 sound/soc/davinci/davinci-i2s-mcasp.c create mode 100644 sound/soc/davinci/davinci-i2s-mcasp.h
sound/soc/davinci/Kconfig +14 -1
@@ -9,6 +9,9 @@ config SND_DAVINCI_SOC config SND_DAVINCI_SOC_I2S tristate +config SND_DAVINCI_SOC_I2S_MCASP + tristate + config SND_DAVINCI_SOC_EVM tristate "SoC Audio support for DaVinci EVM" depends on SND_DAVINCI_SOC && MACH_DAVINCI_EVM
@@ -16,7 +19,17 @@ config SND_DAVINCI_SOC_EVM select SND_SOC_TLV320AIC3X help Say Y if you want to add support for SoC audio on TI - DaVinci EVM platform. + DaVinci DM6446 or DM355 EVM platforms. + +config SND_DM6467_SOC_EVM + tristate "SoC Audio support for DaVinci DM6467 EVM" + depends on SND_DAVINCI_SOC && MACH_DAVINCI_DM6467_EVM + select SND_DAVINCI_SOC_I2S_MCASP + select SND_SOC_TLV320AIC3X + help + Say Y if you want to add support for SoC audio on TI + DaVinci DM6467 EVM platform. + config SND_DAVINCI_SOC_SFFSDR tristate "SoC Audio support for SFFSDR"
sound/soc/davinci/Makefile +3 -0
@@ -1,13 +1,16 @@ # DAVINCI Platform Support snd-soc-davinci-objs := davinci-pcm.o snd-soc-davinci-i2s-objs := davinci-i2s.o +snd-soc-davinci-i2s-mcasp-objs:= davinci-i2s-mcasp.o obj-$(CONFIG_SND_DAVINCI_SOC) += snd-soc-davinci.o obj-$(CONFIG_SND_DAVINCI_SOC_I2S) += snd-soc-davinci-i2s.o +obj-$(CONFIG_SND_DAVINCI_SOC_I2S_MCASP) += snd-soc-davinci-i2s-mcasp.o # DAVINCI Machine Support snd-soc-evm-objs := davinci-evm.o snd-soc-sffsdr-objs := davinci-sffsdr.o obj-$(CONFIG_SND_DAVINCI_SOC_EVM) += snd-soc-evm.o +obj-$(CONFIG_SND_DM6467_SOC_EVM) += snd-soc-evm.o obj-$(CONFIG_SND_DAVINCI_SOC_SFFSDR) += snd-soc-sffsdr.o
sound/soc/davinci/davinci-i2s-mcasp.c new file +890 -0
890 lines not on this page · raw message
sound/soc/davinci/davinci-i2s-mcasp.h new file +56 -0
56 lines not on this page · raw message
sound/soc/davinci/davinci-pcm.h +9 -8
@@ -12,17 +12,18 @@#ifndef _DAVINCI_PCM_H#define _DAVINCI_PCM_H +#include <mach/edma.h> +#include <mach/asp.h> + +struct davinci_pcm_dma_params { -char *name;/* stream identifier */ -int channel;/* sync dma channel ID */ -dma_addr_t dma_addr;/* device physical address for DMA */ -unsigned int data_type;/* xfer data type */ +char *name;/* stream identifier */ +int channel;/* sync dma channel ID */ +dma_addr_t dma_addr;/* device physical address for DMA */ +unsigned int data_type;/* xfer data type */ +enum dma_event_q eventq_no;/* event queue number */ }; -struct evm_snd_platform_data { -int tx_dma_ch; -int rx_dma_ch; -};extern struct snd_soc_platform davinci_soc_platform;
Signature · 1 line
1.5.6