Skip to contentSkip to conversation

ARM: DaVinci: ASoC: Add mcasp support for DM646x

PATCH In review Chaithrika U S 2 participants 3 messages Jun 5, 2009 – Jun 15, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 3/4 ARM: DaVinci: ASoC: Add mcasp support for DM646x

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).

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 - the topic/asoc branch of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git

 sound/soc/davinci/Kconfig         |   13 +
 sound/soc/davinci/Makefile        |    3 +
 sound/soc/davinci/davinci-mcasp.c |  874 +++++++++++++++++++++++++++++++++++++
 sound/soc/davinci/davinci-mcasp.h |   55 +++
 sound/soc/davinci/davinci-pcm.h   |   18 +-
 5 files changed, 955 insertions(+), 8 deletions(-)
 create mode 100644 sound/soc/davinci/davinci-mcasp.c
 create mode 100644 sound/soc/davinci/davinci-mcasp.h
sound/soc/davinci/Kconfig +13 -0
index 411a710..6802dd5 100644
@@ -9,6 +9,9 @@ config SND_DAVINCI_SOC
 config SND_DAVINCI_SOC_I2S
 	tristate
 
+config SND_DAVINCI_SOC_MCASP
+	tristate
+
 config SND_DAVINCI_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6446 or DM355 EVM"
 	depends on SND_DAVINCI_SOC
@@ -19,6 +22,16 @@ config SND_DAVINCI_SOC_EVM
 	  Say Y if you want to add support for SoC audio on TI
 	  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_MCASP
+	select SND_SOC_TLV320AIC3X
+	select SND_SOC_SPDIF
+
+	help
+	  Say Y if you want to add support for SoC audio on TI
+
 config SND_DAVINCI_SOC_SFFSDR
 	tristate "SoC Audio support for SFFSDR"
 	depends on SND_DAVINCI_SOC && MACH_SFFSDR
sound/soc/davinci/Makefile +3 -0
index ca8bae1..67be54f 100644
@@ -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-mcasp-objs:= davinci-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_MCASP) += snd-soc-davinci-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-mcasp.c new file +874 -0

874 lines not on this page · raw message

sound/soc/davinci/davinci-mcasp.h new file +55 -0

55 lines not on this page · raw message

sound/soc/davinci/davinci-pcm.h +10 -8
index 62cb4eb..eb4287f 100644
@@ -12,17 +12,19 @@
 #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 */
+	enum dma_event_q eventq_no;	/* event queue number */
+	unsigned char data_type;	/* xfer data type */
+	unsigned char convert_mono_stereo;
 };
 
-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

A message that is not in the archive (sent off-list or not yet received): 1244197720-31006-1-git-send-email-chaithrika-l0cyMroinI0@public.gmane.org

#2 lore raw

Chaithrika,

Quoted 1 line · Chaithrika U S

Adds driver support for the two instances of McASP on TI's DM646x.

In patch #3 you removed struct evm_snd_platform_data:

sound/soc/davinci/davinci-pcm.h line 25

Quoted 4 lines
sound/soc/davinci/davinci-pcm.h +0 -4
-struct evm_snd_platform_data {
-	int tx_dma_ch;
-	int rx_dma_ch;
-};

That structure is still used in sound/soc/davinci/davinci-evm.c, until you fix it by patch #4:

Review

Quoted 3 lines
(quoted diff) +0 -3
-static struct evm_snd_platform_data dm335evm_snd_data = {
-       .tx_dma_ch      = DAVINCI_DMA_ASP1_TX,
-       .rx_dma_ch      = DAVINCI_DMA_ASP1_RX,

That would break git-bisect...

Signature · 1 line
Denys
author
#3 lore raw
Quoted 5 lines · Denys Dmytriyenko

Chaithrika,

Quoted 1 line · Chaithrika U S

Adds driver support for the two instances of McASP on TI's DM646x.

Quoted 8 lines

In patch #3 you removed struct evm_snd_platform_data:

sound/soc/davinci/davinci-pcm.h line 25

Quoted 4 lines
sound/soc/davinci/davinci-pcm.h +0 -4
-struct evm_snd_platform_data {
-	int tx_dma_ch;
-	int rx_dma_ch;
-};

That structure is still used in sound/soc/davinci/davinci-evm.c, until you

fix

Quoted 7 lines

it by patch #4:

Review

Quoted 3 lines
(quoted diff) +0 -3
-static struct evm_snd_platform_data dm335evm_snd_data = {
-       .tx_dma_ch      = DAVINCI_DMA_ASP1_TX,
-       .rx_dma_ch      = DAVINCI_DMA_ASP1_RX,

That would break git-bisect...

Denys,

These patches have been merged. In the future, I will try to ensure that there
will not be a break when a patch series is submitted.

Quoted 4 lines
Signature · 2 lines
-- 
Denys

Regards,
Chaithrika