All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-08-31 12:50 ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-08-31 12:50 UTC (permalink / raw)
  To: alsa-devel, davinci-linux-open-source, linux-arm-kernel
  Cc: sudhakar.raj, tony, broonie, nsekhar, gururaja.hebbar, lrg

The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
register offset and missing generic SRAM APIs support

Changes
- Add new MCASP_VERSION_3 to identify new variant. New DT compatible
  "ti,omap2-mcasp-audio" to identify version 3 controller.
- The register offsets are handled depending on the version.
- Provide a config option to indicate missing SRAM API support.

While here, fix a typo caused by recent commit (cf53756 - ASoC: davinci: 
davinci-pcm does not need to be a plaform_driver)

Note:
   DMA parameters (dma fifo offset) are not updated and will be done later.

Hebbar, Gururaja (3):
  ASoC: Davinci: McASP: add support new McASP IP Variant
  ASoC: Davinci: pcm: add support for sram-support-less platforms
  ASoC: Davinci: evm: Fix typo in cpu dai name

 .../bindings/sound/davinci-mcasp-audio.txt         |    1 +
 include/linux/platform_data/davinci_asp.h          |    1 +
 sound/soc/davinci/Kconfig                          |    5 ++
 sound/soc/davinci/davinci-evm.c                    |    2 +-
 sound/soc/davinci/davinci-mcasp.c                  |   71 ++++++++++++++++----
 sound/soc/davinci/davinci-pcm.c                    |    8 ++
 6 files changed, 74 insertions(+), 14 deletions(-)

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-08-31 12:50 ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-08-31 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
register offset and missing generic SRAM APIs support

Changes
- Add new MCASP_VERSION_3 to identify new variant. New DT compatible
  "ti,omap2-mcasp-audio" to identify version 3 controller.
- The register offsets are handled depending on the version.
- Provide a config option to indicate missing SRAM API support.

While here, fix a typo caused by recent commit (cf53756 - ASoC: davinci: 
davinci-pcm does not need to be a plaform_driver)

Note:
   DMA parameters (dma fifo offset) are not updated and will be done later.

Hebbar, Gururaja (3):
  ASoC: Davinci: McASP: add support new McASP IP Variant
  ASoC: Davinci: pcm: add support for sram-support-less platforms
  ASoC: Davinci: evm: Fix typo in cpu dai name

 .../bindings/sound/davinci-mcasp-audio.txt         |    1 +
 include/linux/platform_data/davinci_asp.h          |    1 +
 sound/soc/davinci/Kconfig                          |    5 ++
 sound/soc/davinci/davinci-evm.c                    |    2 +-
 sound/soc/davinci/davinci-mcasp.c                  |   71 ++++++++++++++++----
 sound/soc/davinci/davinci-pcm.c                    |    8 ++
 6 files changed, 74 insertions(+), 14 deletions(-)

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 1/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-08-31 12:50 ` Hebbar, Gururaja
@ 2012-08-31 12:50   ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-08-31 12:50 UTC (permalink / raw)
  To: alsa-devel, davinci-linux-open-source, linux-arm-kernel
  Cc: sudhakar.raj, tony, broonie, nsekhar, gururaja.hebbar, lrg

The OMAP2+ variant of McASP is different from Davinci variant w.r.to
some register offset.

Changes
- Add new MCASP_VERSION_3 to identify new variant. New DT compatible
  "ti,omap2-mcasp-audio" to identify version 3 controller.
- The register offsets are handled depending on the version.

Note:
    DMA parameters (dma fifo offset) are not updated and will be done later.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
---
:100644 100644 e6148ec... 374e145... M	Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
:100644 100644 79c26aa... d0c5825... M	include/linux/platform_data/davinci_asp.h
:100644 100644 c3eae1d... bb6ae9d... M	sound/soc/davinci/davinci-mcasp.c
 .../bindings/sound/davinci-mcasp-audio.txt         |    1 +
 include/linux/platform_data/davinci_asp.h          |    1 +
 sound/soc/davinci/davinci-mcasp.c                  |   71 ++++++++++++++++----
 3 files changed, 60 insertions(+), 13 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
index e6148ec..374e145 100644
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
+++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
@@ -4,6 +4,7 @@ Required properties:
 - compatible :
 	"ti,dm646x-mcasp-audio"	: for DM646x platforms
 	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
+	"ti,omap2-mcasp-audio"	: for OMAP2 platforms (TI81xx, AM33xx)
 
 - reg : Should contain McASP registers offset and length
 - interrupts : Interrupt number for McASP
diff --git a/include/linux/platform_data/davinci_asp.h b/include/linux/platform_data/davinci_asp.h
index 79c26aa..d0c5825 100644
--- a/include/linux/platform_data/davinci_asp.h
+++ b/include/linux/platform_data/davinci_asp.h
@@ -87,6 +87,7 @@ struct snd_platform_data {
 enum {
 	MCASP_VERSION_1 = 0,	/* DM646x */
 	MCASP_VERSION_2,	/* DA8xx/OMAPL1x */
+	MCASP_VERSION_3,        /* TI81xx/AM33xx */
 };
 
 enum mcbsp_clk_input_pin {
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index c3eae1d..bb6ae9d 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -111,6 +111,10 @@
 #define DAVINCI_MCASP_WFIFOSTS		(0x1014)
 #define DAVINCI_MCASP_RFIFOCTL		(0x1018)
 #define DAVINCI_MCASP_RFIFOSTS		(0x101C)
+#define MCASP_VER3_WFIFOCTL		(0x1000)
+#define MCASP_VER3_WFIFOSTS		(0x1004)
+#define MCASP_VER3_RFIFOCTL		(0x1008)
+#define MCASP_VER3_RFIFOSTS		(0x100C)
 
 /*
  * DAVINCI_MCASP_PWREMUMGT_REG - Power Down and Emulation Management
@@ -384,18 +388,32 @@ static void davinci_mcasp_start(struct davinci_audio_dev *dev, int stream)
 {
 	if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		if (dev->txnumevt) {	/* enable FIFO */
-			mcasp_clr_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+			if (dev->version == MCASP_VERSION_3) {
+				mcasp_clr_bits(dev->base + MCASP_VER3_WFIFOCTL,
 								FIFO_ENABLE);
-			mcasp_set_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+				mcasp_set_bits(dev->base + MCASP_VER3_WFIFOCTL,
 								FIFO_ENABLE);
+			} else {
+				mcasp_clr_bits(dev->base +
+					DAVINCI_MCASP_WFIFOCTL,	FIFO_ENABLE);
+				mcasp_set_bits(dev->base +
+					DAVINCI_MCASP_WFIFOCTL,	FIFO_ENABLE);
+			}
 		}
 		mcasp_start_tx(dev);
 	} else {
 		if (dev->rxnumevt) {	/* enable FIFO */
-			mcasp_clr_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+			if (dev->version == MCASP_VERSION_3) {
+				mcasp_clr_bits(dev->base + MCASP_VER3_RFIFOCTL,
 								FIFO_ENABLE);
-			mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+				mcasp_set_bits(dev->base + MCASP_VER3_RFIFOCTL,
 								FIFO_ENABLE);
+			} else {
+				mcasp_clr_bits(dev->base +
+					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
+				mcasp_set_bits(dev->base +
+					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
+			}
 		}
 		mcasp_start_rx(dev);
 	}
@@ -416,14 +434,24 @@ static void mcasp_stop_tx(struct davinci_audio_dev *dev)
 static void davinci_mcasp_stop(struct davinci_audio_dev *dev, int stream)
 {
 	if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		if (dev->txnumevt)	/* disable FIFO */
-			mcasp_clr_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+		if (dev->txnumevt) {	/* disable FIFO */
+			if (dev->version == MCASP_VERSION_3)
+				mcasp_clr_bits(dev->base + MCASP_VER3_WFIFOCTL,
 								FIFO_ENABLE);
+			else
+				mcasp_clr_bits(dev->base +
+					DAVINCI_MCASP_WFIFOCTL,	FIFO_ENABLE);
+		}
 		mcasp_stop_tx(dev);
 	} else {
-		if (dev->rxnumevt)	/* disable FIFO */
-			mcasp_clr_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+		if (dev->rxnumevt) {	/* disable FIFO */
+			if (dev->version == MCASP_VERSION_3)
+				mcasp_clr_bits(dev->base + MCASP_VER3_RFIFOCTL,
 								FIFO_ENABLE);
+			else
+				mcasp_clr_bits(dev->base +
+					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
+		}
 		mcasp_stop_rx(dev);
 	}
 }
@@ -622,20 +650,33 @@ static void davinci_hw_common_param(struct davinci_audio_dev *dev, int stream)
 		if (dev->txnumevt * tx_ser > 64)
 			dev->txnumevt = 1;
 
-		mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL, tx_ser,
+		if (dev->version == MCASP_VERSION_3) {
+			mcasp_mod_bits(dev->base + MCASP_VER3_WFIFOCTL, tx_ser,
 								NUMDMA_MASK);
-		mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+			mcasp_mod_bits(dev->base + MCASP_VER3_WFIFOCTL,
+				((dev->txnumevt * tx_ser) << 8), NUMEVT_MASK);
+		} else {
+			mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+							tx_ser,	NUMDMA_MASK);
+			mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
 				((dev->txnumevt * tx_ser) << 8), NUMEVT_MASK);
+		}
 	}
 
 	if (dev->rxnumevt && stream == SNDRV_PCM_STREAM_CAPTURE) {
 		if (dev->rxnumevt * rx_ser > 64)
 			dev->rxnumevt = 1;
-
-		mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL, rx_ser,
+		if (dev->version == MCASP_VERSION_3) {
+			mcasp_mod_bits(dev->base + MCASP_VER3_RFIFOCTL, rx_ser,
 								NUMDMA_MASK);
-		mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+			mcasp_mod_bits(dev->base + MCASP_VER3_RFIFOCTL,
 				((dev->rxnumevt * rx_ser) << 8), NUMEVT_MASK);
+		} else {
+			mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+							rx_ser,	NUMDMA_MASK);
+			mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+				((dev->rxnumevt * rx_ser) << 8), NUMEVT_MASK);
+		}
 	}
 }
 
@@ -874,6 +915,10 @@ static const struct of_device_id mcasp_dt_ids[] = {
 		.compatible = "ti,da830-mcasp-audio",
 		.data = (void *)MCASP_VERSION_2,
 	},
+	{
+		.compatible = "ti,omap2-mcasp-audio",
+		.data = (void *)MCASP_VERSION_3,
+	},
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, mcasp_dt_ids);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 80+ messages in thread

* [PATCH 1/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-08-31 12:50   ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-08-31 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

The OMAP2+ variant of McASP is different from Davinci variant w.r.to
some register offset.

Changes
- Add new MCASP_VERSION_3 to identify new variant. New DT compatible
  "ti,omap2-mcasp-audio" to identify version 3 controller.
- The register offsets are handled depending on the version.

Note:
    DMA parameters (dma fifo offset) are not updated and will be done later.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
---
:100644 100644 e6148ec... 374e145... M	Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
:100644 100644 79c26aa... d0c5825... M	include/linux/platform_data/davinci_asp.h
:100644 100644 c3eae1d... bb6ae9d... M	sound/soc/davinci/davinci-mcasp.c
 .../bindings/sound/davinci-mcasp-audio.txt         |    1 +
 include/linux/platform_data/davinci_asp.h          |    1 +
 sound/soc/davinci/davinci-mcasp.c                  |   71 ++++++++++++++++----
 3 files changed, 60 insertions(+), 13 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
index e6148ec..374e145 100644
--- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
+++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt
@@ -4,6 +4,7 @@ Required properties:
 - compatible :
 	"ti,dm646x-mcasp-audio"	: for DM646x platforms
 	"ti,da830-mcasp-audio"	: for both DA830 & DA850 platforms
+	"ti,omap2-mcasp-audio"	: for OMAP2 platforms (TI81xx, AM33xx)
 
 - reg : Should contain McASP registers offset and length
 - interrupts : Interrupt number for McASP
diff --git a/include/linux/platform_data/davinci_asp.h b/include/linux/platform_data/davinci_asp.h
index 79c26aa..d0c5825 100644
--- a/include/linux/platform_data/davinci_asp.h
+++ b/include/linux/platform_data/davinci_asp.h
@@ -87,6 +87,7 @@ struct snd_platform_data {
 enum {
 	MCASP_VERSION_1 = 0,	/* DM646x */
 	MCASP_VERSION_2,	/* DA8xx/OMAPL1x */
+	MCASP_VERSION_3,        /* TI81xx/AM33xx */
 };
 
 enum mcbsp_clk_input_pin {
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index c3eae1d..bb6ae9d 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -111,6 +111,10 @@
 #define DAVINCI_MCASP_WFIFOSTS		(0x1014)
 #define DAVINCI_MCASP_RFIFOCTL		(0x1018)
 #define DAVINCI_MCASP_RFIFOSTS		(0x101C)
+#define MCASP_VER3_WFIFOCTL		(0x1000)
+#define MCASP_VER3_WFIFOSTS		(0x1004)
+#define MCASP_VER3_RFIFOCTL		(0x1008)
+#define MCASP_VER3_RFIFOSTS		(0x100C)
 
 /*
  * DAVINCI_MCASP_PWREMUMGT_REG - Power Down and Emulation Management
@@ -384,18 +388,32 @@ static void davinci_mcasp_start(struct davinci_audio_dev *dev, int stream)
 {
 	if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		if (dev->txnumevt) {	/* enable FIFO */
-			mcasp_clr_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+			if (dev->version == MCASP_VERSION_3) {
+				mcasp_clr_bits(dev->base + MCASP_VER3_WFIFOCTL,
 								FIFO_ENABLE);
-			mcasp_set_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+				mcasp_set_bits(dev->base + MCASP_VER3_WFIFOCTL,
 								FIFO_ENABLE);
+			} else {
+				mcasp_clr_bits(dev->base +
+					DAVINCI_MCASP_WFIFOCTL,	FIFO_ENABLE);
+				mcasp_set_bits(dev->base +
+					DAVINCI_MCASP_WFIFOCTL,	FIFO_ENABLE);
+			}
 		}
 		mcasp_start_tx(dev);
 	} else {
 		if (dev->rxnumevt) {	/* enable FIFO */
-			mcasp_clr_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+			if (dev->version == MCASP_VERSION_3) {
+				mcasp_clr_bits(dev->base + MCASP_VER3_RFIFOCTL,
 								FIFO_ENABLE);
-			mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+				mcasp_set_bits(dev->base + MCASP_VER3_RFIFOCTL,
 								FIFO_ENABLE);
+			} else {
+				mcasp_clr_bits(dev->base +
+					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
+				mcasp_set_bits(dev->base +
+					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
+			}
 		}
 		mcasp_start_rx(dev);
 	}
@@ -416,14 +434,24 @@ static void mcasp_stop_tx(struct davinci_audio_dev *dev)
 static void davinci_mcasp_stop(struct davinci_audio_dev *dev, int stream)
 {
 	if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
-		if (dev->txnumevt)	/* disable FIFO */
-			mcasp_clr_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+		if (dev->txnumevt) {	/* disable FIFO */
+			if (dev->version == MCASP_VERSION_3)
+				mcasp_clr_bits(dev->base + MCASP_VER3_WFIFOCTL,
 								FIFO_ENABLE);
+			else
+				mcasp_clr_bits(dev->base +
+					DAVINCI_MCASP_WFIFOCTL,	FIFO_ENABLE);
+		}
 		mcasp_stop_tx(dev);
 	} else {
-		if (dev->rxnumevt)	/* disable FIFO */
-			mcasp_clr_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+		if (dev->rxnumevt) {	/* disable FIFO */
+			if (dev->version == MCASP_VERSION_3)
+				mcasp_clr_bits(dev->base + MCASP_VER3_RFIFOCTL,
 								FIFO_ENABLE);
+			else
+				mcasp_clr_bits(dev->base +
+					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
+		}
 		mcasp_stop_rx(dev);
 	}
 }
@@ -622,20 +650,33 @@ static void davinci_hw_common_param(struct davinci_audio_dev *dev, int stream)
 		if (dev->txnumevt * tx_ser > 64)
 			dev->txnumevt = 1;
 
-		mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL, tx_ser,
+		if (dev->version == MCASP_VERSION_3) {
+			mcasp_mod_bits(dev->base + MCASP_VER3_WFIFOCTL, tx_ser,
 								NUMDMA_MASK);
-		mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+			mcasp_mod_bits(dev->base + MCASP_VER3_WFIFOCTL,
+				((dev->txnumevt * tx_ser) << 8), NUMEVT_MASK);
+		} else {
+			mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
+							tx_ser,	NUMDMA_MASK);
+			mcasp_mod_bits(dev->base + DAVINCI_MCASP_WFIFOCTL,
 				((dev->txnumevt * tx_ser) << 8), NUMEVT_MASK);
+		}
 	}
 
 	if (dev->rxnumevt && stream == SNDRV_PCM_STREAM_CAPTURE) {
 		if (dev->rxnumevt * rx_ser > 64)
 			dev->rxnumevt = 1;
-
-		mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL, rx_ser,
+		if (dev->version == MCASP_VERSION_3) {
+			mcasp_mod_bits(dev->base + MCASP_VER3_RFIFOCTL, rx_ser,
 								NUMDMA_MASK);
-		mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+			mcasp_mod_bits(dev->base + MCASP_VER3_RFIFOCTL,
 				((dev->rxnumevt * rx_ser) << 8), NUMEVT_MASK);
+		} else {
+			mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+							rx_ser,	NUMDMA_MASK);
+			mcasp_mod_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
+				((dev->rxnumevt * rx_ser) << 8), NUMEVT_MASK);
+		}
 	}
 }
 
@@ -874,6 +915,10 @@ static const struct of_device_id mcasp_dt_ids[] = {
 		.compatible = "ti,da830-mcasp-audio",
 		.data = (void *)MCASP_VERSION_2,
 	},
+	{
+		.compatible = "ti,omap2-mcasp-audio",
+		.data = (void *)MCASP_VERSION_3,
+	},
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, mcasp_dt_ids);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 80+ messages in thread

* [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-08-31 12:50 ` Hebbar, Gururaja
@ 2012-08-31 12:50   ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-08-31 12:50 UTC (permalink / raw)
  To: alsa-devel, davinci-linux-open-source, linux-arm-kernel
  Cc: sudhakar.raj, tony, broonie, nsekhar, gururaja.hebbar, lrg

OMAP2+ platforms (like TI81xx, AM33xx) uses davinci-pcm driver. SRAM is
not needed/used in EDMA transfers for audio on such platforms. However
they do not provide generic SRAM APIs (sram_alloc() and sram_free()). In
such cases the pcm driver cannot be used directly as it results in
compilation failure on OMAP2 platforms.

Fix this by providing a config option to indicate missing SRAM API
support. This config is enabled by default on Davinci platform so as to
not break existing platforms. For OMAP2+ platforms, the config is
disabled.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
---
:100644 100644 9e11a14... 328b463... M	sound/soc/davinci/Kconfig
:100644 100644 93ea3bf... 7ac5a19... M	sound/soc/davinci/davinci-pcm.c
 sound/soc/davinci/Kconfig       |    5 +++++
 sound/soc/davinci/davinci-pcm.c |    8 ++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
index 9e11a14..328b463 100644
--- a/sound/soc/davinci/Kconfig
+++ b/sound/soc/davinci/Kconfig
@@ -15,6 +15,11 @@ config SND_DAVINCI_SOC_MCASP
 config SND_DAVINCI_SOC_VCIF
 	tristate
 
+config SND_DAVINCI_HAVE_SRAM
+	bool
+	default y if ARCH_DAVINCI=y
+	default n if ARCH_OMAP=y
+
 config SND_DAVINCI_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
 	depends on SND_DAVINCI_SOC
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index 93ea3bf..7ac5a19 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -23,7 +23,9 @@
 #include <sound/soc.h>
 
 #include <asm/dma.h>
+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
 #include <mach/sram.h>
+#endif
 
 #include "davinci-pcm.h"
 
@@ -259,6 +261,7 @@ static void davinci_pcm_dma_irq(unsigned link, u16 ch_status, void *data)
 	}
 }
 
+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
 static int allocate_sram(struct snd_pcm_substream *substream, unsigned size,
 		struct snd_pcm_hardware *ppcm)
 {
@@ -289,6 +292,7 @@ exit2:
 exit1:
 	return -ENOMEM;
 }
+#endif
 
 /*
  * Only used with ping/pong.
@@ -676,7 +680,9 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
 
 	ppcm = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
 			&pcm_hardware_playback : &pcm_hardware_capture;
+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
 	allocate_sram(substream, params->sram_size, ppcm);
+#endif
 	snd_soc_set_runtime_hwparams(substream, ppcm);
 	/* ensure that buffer size is a multiple of period size */
 	ret = snd_pcm_hw_constraint_integer(runtime,
@@ -817,11 +823,13 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
 		dma_free_writecombine(pcm->card->dev, buf->bytes,
 				      buf->area, buf->addr);
 		buf->area = NULL;
+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
 		iram_dma = buf->private_data;
 		if (iram_dma) {
 			sram_free(iram_dma->area, iram_dma->bytes);
 			kfree(iram_dma);
 		}
+#endif
 	}
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 80+ messages in thread

* [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-08-31 12:50   ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-08-31 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

OMAP2+ platforms (like TI81xx, AM33xx) uses davinci-pcm driver. SRAM is
not needed/used in EDMA transfers for audio on such platforms. However
they do not provide generic SRAM APIs (sram_alloc() and sram_free()). In
such cases the pcm driver cannot be used directly as it results in
compilation failure on OMAP2 platforms.

Fix this by providing a config option to indicate missing SRAM API
support. This config is enabled by default on Davinci platform so as to
not break existing platforms. For OMAP2+ platforms, the config is
disabled.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
---
:100644 100644 9e11a14... 328b463... M	sound/soc/davinci/Kconfig
:100644 100644 93ea3bf... 7ac5a19... M	sound/soc/davinci/davinci-pcm.c
 sound/soc/davinci/Kconfig       |    5 +++++
 sound/soc/davinci/davinci-pcm.c |    8 ++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
index 9e11a14..328b463 100644
--- a/sound/soc/davinci/Kconfig
+++ b/sound/soc/davinci/Kconfig
@@ -15,6 +15,11 @@ config SND_DAVINCI_SOC_MCASP
 config SND_DAVINCI_SOC_VCIF
 	tristate
 
+config SND_DAVINCI_HAVE_SRAM
+	bool
+	default y if ARCH_DAVINCI=y
+	default n if ARCH_OMAP=y
+
 config SND_DAVINCI_SOC_EVM
 	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
 	depends on SND_DAVINCI_SOC
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index 93ea3bf..7ac5a19 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -23,7 +23,9 @@
 #include <sound/soc.h>
 
 #include <asm/dma.h>
+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
 #include <mach/sram.h>
+#endif
 
 #include "davinci-pcm.h"
 
@@ -259,6 +261,7 @@ static void davinci_pcm_dma_irq(unsigned link, u16 ch_status, void *data)
 	}
 }
 
+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
 static int allocate_sram(struct snd_pcm_substream *substream, unsigned size,
 		struct snd_pcm_hardware *ppcm)
 {
@@ -289,6 +292,7 @@ exit2:
 exit1:
 	return -ENOMEM;
 }
+#endif
 
 /*
  * Only used with ping/pong.
@@ -676,7 +680,9 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
 
 	ppcm = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
 			&pcm_hardware_playback : &pcm_hardware_capture;
+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
 	allocate_sram(substream, params->sram_size, ppcm);
+#endif
 	snd_soc_set_runtime_hwparams(substream, ppcm);
 	/* ensure that buffer size is a multiple of period size */
 	ret = snd_pcm_hw_constraint_integer(runtime,
@@ -817,11 +823,13 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
 		dma_free_writecombine(pcm->card->dev, buf->bytes,
 				      buf->area, buf->addr);
 		buf->area = NULL;
+#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
 		iram_dma = buf->private_data;
 		if (iram_dma) {
 			sram_free(iram_dma->area, iram_dma->bytes);
 			kfree(iram_dma);
 		}
+#endif
 	}
 }
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 80+ messages in thread

* [PATCH 3/3] ASoC: Davinci: evm: Fix typo in cpu dai name
  2012-08-31 12:50 ` Hebbar, Gururaja
@ 2012-08-31 12:50   ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-08-31 12:50 UTC (permalink / raw)
  To: alsa-devel, davinci-linux-open-source, linux-arm-kernel
  Cc: sudhakar.raj, tony, broonie, nsekhar, gururaja.hebbar, lrg

Fix typo caused by recent commit (cf53756 - ASoC: davinci: davinci-pcm
does not need to be a plaform_driver)

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
---
:100644 100644 ca2a547... 2864f24... M	sound/soc/davinci/davinci-evm.c
 sound/soc/davinci/davinci-evm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index ca2a547..2864f24 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -208,7 +208,7 @@ static struct snd_soc_dai_link dm365_evm_dai = {
 	.cpu_dai_name = "davinci-vcif",
 	.codec_dai_name = "cq93vc-hifi",
 	.codec_name = "cq93vc-codec",
-	.platform_name = "avinci-vcif",
+	.platform_name = "davinci-vcif",
 #endif
 };
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 80+ messages in thread

* [PATCH 3/3] ASoC: Davinci: evm: Fix typo in cpu dai name
@ 2012-08-31 12:50   ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-08-31 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

Fix typo caused by recent commit (cf53756 - ASoC: davinci: davinci-pcm
does not need to be a plaform_driver)

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
---
:100644 100644 ca2a547... 2864f24... M	sound/soc/davinci/davinci-evm.c
 sound/soc/davinci/davinci-evm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index ca2a547..2864f24 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -208,7 +208,7 @@ static struct snd_soc_dai_link dm365_evm_dai = {
 	.cpu_dai_name = "davinci-vcif",
 	.codec_dai_name = "cq93vc-hifi",
 	.codec_name = "cq93vc-codec",
-	.platform_name = "avinci-vcif",
+	.platform_name = "davinci-vcif",
 #endif
 };
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 80+ messages in thread

* Re: [PATCH 1/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-08-31 12:50   ` Hebbar, Gururaja
@ 2012-09-01  0:44     ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-01  0:44 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, sudhakar.raj, tony, nsekhar,
	davinci-linux-open-source, lrg, linux-arm-kernel

On Fri, Aug 31, 2012 at 06:20:57PM +0530, Hebbar, Gururaja wrote:

> +			if (dev->version == MCASP_VERSION_3) {
> +				mcasp_clr_bits(dev->base + MCASP_VER3_RFIFOCTL,
>  								FIFO_ENABLE);
> -			mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
> +				mcasp_set_bits(dev->base + MCASP_VER3_RFIFOCTL,
>  								FIFO_ENABLE);
> +			} else {
> +				mcasp_clr_bits(dev->base +
> +					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
> +				mcasp_set_bits(dev->base +
> +					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
> +			}

This is all basically OK but it seems like it'd be better if all these
dev->version checks were switch statements.  That way when the hardware
designers get bored and add version 4 of the register map it'll slot in
naturally, and it'll be more clear what the code currently handles.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 1/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-09-01  0:44     ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-01  0:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 31, 2012 at 06:20:57PM +0530, Hebbar, Gururaja wrote:

> +			if (dev->version == MCASP_VERSION_3) {
> +				mcasp_clr_bits(dev->base + MCASP_VER3_RFIFOCTL,
>  								FIFO_ENABLE);
> -			mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
> +				mcasp_set_bits(dev->base + MCASP_VER3_RFIFOCTL,
>  								FIFO_ENABLE);
> +			} else {
> +				mcasp_clr_bits(dev->base +
> +					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
> +				mcasp_set_bits(dev->base +
> +					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
> +			}

This is all basically OK but it seems like it'd be better if all these
dev->version checks were switch statements.  That way when the hardware
designers get bored and add version 4 of the register map it'll slot in
naturally, and it'll be more clear what the code currently handles.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 3/3] ASoC: Davinci: evm: Fix typo in cpu dai name
  2012-08-31 12:50   ` Hebbar, Gururaja
@ 2012-09-01  0:47     ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-01  0:47 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, sudhakar.raj, tony, nsekhar,
	davinci-linux-open-source, lrg, linux-arm-kernel

On Fri, Aug 31, 2012 at 06:20:59PM +0530, Hebbar, Gururaja wrote:
> Fix typo caused by recent commit (cf53756 - ASoC: davinci: davinci-pcm
> does not need to be a plaform_driver)

Applied, thanks.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 3/3] ASoC: Davinci: evm: Fix typo in cpu dai name
@ 2012-09-01  0:47     ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-01  0:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 31, 2012 at 06:20:59PM +0530, Hebbar, Gururaja wrote:
> Fix typo caused by recent commit (cf53756 - ASoC: davinci: davinci-pcm
> does not need to be a plaform_driver)

Applied, thanks.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 1/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-09-01  0:44     ` Mark Brown
@ 2012-09-03  6:57       ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-09-03  6:57 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, Nori, Sekhar,
	davinci-linux-open-source, Girdwood, Liam, linux-arm-kernel

On Sat, Sep 01, 2012 at 06:14:44, Mark Brown wrote:
> On Fri, Aug 31, 2012 at 06:20:57PM +0530, Hebbar, Gururaja wrote:
> 
> > +			if (dev->version == MCASP_VERSION_3) {
> > +				mcasp_clr_bits(dev->base + MCASP_VER3_RFIFOCTL,
> >  								FIFO_ENABLE);
> > -			mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
> > +				mcasp_set_bits(dev->base + MCASP_VER3_RFIFOCTL,
> >  								FIFO_ENABLE);
> > +			} else {
> > +				mcasp_clr_bits(dev->base +
> > +					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
> > +				mcasp_set_bits(dev->base +
> > +					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
> > +			}
> 
> This is all basically OK but it seems like it'd be better if all these
> dev->version checks were switch statements.  That way when the hardware
> designers get bored and add version 4 of the register map it'll slot in
> naturally, and it'll be more clear what the code currently handles.

Ok I will update this. Since 3/3 is already accepted & I don’t see any reviews
for 2/3, I will only resend this patch (1/3). Is it ok?

> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 1/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-09-03  6:57       ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-09-03  6:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 01, 2012 at 06:14:44, Mark Brown wrote:
> On Fri, Aug 31, 2012 at 06:20:57PM +0530, Hebbar, Gururaja wrote:
> 
> > +			if (dev->version == MCASP_VERSION_3) {
> > +				mcasp_clr_bits(dev->base + MCASP_VER3_RFIFOCTL,
> >  								FIFO_ENABLE);
> > -			mcasp_set_bits(dev->base + DAVINCI_MCASP_RFIFOCTL,
> > +				mcasp_set_bits(dev->base + MCASP_VER3_RFIFOCTL,
> >  								FIFO_ENABLE);
> > +			} else {
> > +				mcasp_clr_bits(dev->base +
> > +					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
> > +				mcasp_set_bits(dev->base +
> > +					DAVINCI_MCASP_RFIFOCTL,	FIFO_ENABLE);
> > +			}
> 
> This is all basically OK but it seems like it'd be better if all these
> dev->version checks were switch statements.  That way when the hardware
> designers get bored and add version 4 of the register map it'll slot in
> naturally, and it'll be more clear what the code currently handles.

Ok I will update this. Since 3/3 is already accepted & I don?t see any reviews
for 2/3, I will only resend this patch (1/3). Is it ok?

> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 1/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-09-03  6:57       ` Hebbar, Gururaja
@ 2012-09-05  4:01         ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-05  4:01 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, Nori, Sekhar,
	davinci-linux-open-source, Girdwood, Liam, linux-arm-kernel

On Mon, Sep 03, 2012 at 06:57:22AM +0000, Hebbar, Gururaja wrote:

> Ok I will update this. Since 3/3 is already accepted & I don’t see any reviews
> for 2/3, I will only resend this patch (1/3). Is it ok?

Yes.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 1/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-09-05  4:01         ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-05  4:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 03, 2012 at 06:57:22AM +0000, Hebbar, Gururaja wrote:

> Ok I will update this. Since 3/3 is already accepted & I don?t see any reviews
> for 2/3, I will only resend this patch (1/3). Is it ok?

Yes.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-08-31 12:50   ` Hebbar, Gururaja
@ 2012-09-12  7:50     ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-09-12  7:50 UTC (permalink / raw)
  To: alsa-devel, davinci-linux-open-source, linux-arm-kernel, broonie
  Cc: tony, Rajashekhara, Sudhakar, Nori, Sekhar, Girdwood, Liam

On Fri, Aug 31, 2012 at 18:20:58, Hebbar, Gururaja wrote:
> OMAP2+ platforms (like TI81xx, AM33xx) uses davinci-pcm driver. SRAM is
> not needed/used in EDMA transfers for audio on such platforms. However
> they do not provide generic SRAM APIs (sram_alloc() and sram_free()). In
> such cases the pcm driver cannot be used directly as it results in
> compilation failure on OMAP2 platforms.
> 
> Fix this by providing a config option to indicate missing SRAM API
> support. This config is enabled by default on Davinci platform so as to
> not break existing platforms. For OMAP2+ platforms, the config is
> disabled.

Gentle ping. Is there any comments/review for this patch? 
If not, can this be pulled in?

> 
> Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
> ---
> :100644 100644 9e11a14... 328b463... M	sound/soc/davinci/Kconfig
> :100644 100644 93ea3bf... 7ac5a19... M	sound/soc/davinci/davinci-pcm.c
>  sound/soc/davinci/Kconfig       |    5 +++++
>  sound/soc/davinci/davinci-pcm.c |    8 ++++++++
>  2 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
> index 9e11a14..328b463 100644
> --- a/sound/soc/davinci/Kconfig
> +++ b/sound/soc/davinci/Kconfig
> @@ -15,6 +15,11 @@ config SND_DAVINCI_SOC_MCASP
>  config SND_DAVINCI_SOC_VCIF
>  	tristate
>  
> +config SND_DAVINCI_HAVE_SRAM
> +	bool
> +	default y if ARCH_DAVINCI=y
> +	default n if ARCH_OMAP=y
> +
>  config SND_DAVINCI_SOC_EVM
>  	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
>  	depends on SND_DAVINCI_SOC
> diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
> index 93ea3bf..7ac5a19 100644
> --- a/sound/soc/davinci/davinci-pcm.c
> +++ b/sound/soc/davinci/davinci-pcm.c
> @@ -23,7 +23,9 @@
>  #include <sound/soc.h>
>  
>  #include <asm/dma.h>
> +#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
>  #include <mach/sram.h>
> +#endif
>  
>  #include "davinci-pcm.h"
>  
> @@ -259,6 +261,7 @@ static void davinci_pcm_dma_irq(unsigned link, u16 ch_status, void *data)
>  	}
>  }
>  
> +#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
>  static int allocate_sram(struct snd_pcm_substream *substream, unsigned size,
>  		struct snd_pcm_hardware *ppcm)
>  {
> @@ -289,6 +292,7 @@ exit2:
>  exit1:
>  	return -ENOMEM;
>  }
> +#endif
>  
>  /*
>   * Only used with ping/pong.
> @@ -676,7 +680,9 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
>  
>  	ppcm = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
>  			&pcm_hardware_playback : &pcm_hardware_capture;
> +#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
>  	allocate_sram(substream, params->sram_size, ppcm);
> +#endif
>  	snd_soc_set_runtime_hwparams(substream, ppcm);
>  	/* ensure that buffer size is a multiple of period size */
>  	ret = snd_pcm_hw_constraint_integer(runtime,
> @@ -817,11 +823,13 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
>  		dma_free_writecombine(pcm->card->dev, buf->bytes,
>  				      buf->area, buf->addr);
>  		buf->area = NULL;
> +#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
>  		iram_dma = buf->private_data;
>  		if (iram_dma) {
>  			sram_free(iram_dma->area, iram_dma->bytes);
>  			kfree(iram_dma);
>  		}
> +#endif
>  	}
>  }
>  
> -- 
> 1.7.1
> 
> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-09-12  7:50     ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-09-12  7:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 31, 2012 at 18:20:58, Hebbar, Gururaja wrote:
> OMAP2+ platforms (like TI81xx, AM33xx) uses davinci-pcm driver. SRAM is
> not needed/used in EDMA transfers for audio on such platforms. However
> they do not provide generic SRAM APIs (sram_alloc() and sram_free()). In
> such cases the pcm driver cannot be used directly as it results in
> compilation failure on OMAP2 platforms.
> 
> Fix this by providing a config option to indicate missing SRAM API
> support. This config is enabled by default on Davinci platform so as to
> not break existing platforms. For OMAP2+ platforms, the config is
> disabled.

Gentle ping. Is there any comments/review for this patch? 
If not, can this be pulled in?

> 
> Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
> ---
> :100644 100644 9e11a14... 328b463... M	sound/soc/davinci/Kconfig
> :100644 100644 93ea3bf... 7ac5a19... M	sound/soc/davinci/davinci-pcm.c
>  sound/soc/davinci/Kconfig       |    5 +++++
>  sound/soc/davinci/davinci-pcm.c |    8 ++++++++
>  2 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/davinci/Kconfig b/sound/soc/davinci/Kconfig
> index 9e11a14..328b463 100644
> --- a/sound/soc/davinci/Kconfig
> +++ b/sound/soc/davinci/Kconfig
> @@ -15,6 +15,11 @@ config SND_DAVINCI_SOC_MCASP
>  config SND_DAVINCI_SOC_VCIF
>  	tristate
>  
> +config SND_DAVINCI_HAVE_SRAM
> +	bool
> +	default y if ARCH_DAVINCI=y
> +	default n if ARCH_OMAP=y
> +
>  config SND_DAVINCI_SOC_EVM
>  	tristate "SoC Audio support for DaVinci DM6446, DM355 or DM365 EVM"
>  	depends on SND_DAVINCI_SOC
> diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
> index 93ea3bf..7ac5a19 100644
> --- a/sound/soc/davinci/davinci-pcm.c
> +++ b/sound/soc/davinci/davinci-pcm.c
> @@ -23,7 +23,9 @@
>  #include <sound/soc.h>
>  
>  #include <asm/dma.h>
> +#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
>  #include <mach/sram.h>
> +#endif
>  
>  #include "davinci-pcm.h"
>  
> @@ -259,6 +261,7 @@ static void davinci_pcm_dma_irq(unsigned link, u16 ch_status, void *data)
>  	}
>  }
>  
> +#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
>  static int allocate_sram(struct snd_pcm_substream *substream, unsigned size,
>  		struct snd_pcm_hardware *ppcm)
>  {
> @@ -289,6 +292,7 @@ exit2:
>  exit1:
>  	return -ENOMEM;
>  }
> +#endif
>  
>  /*
>   * Only used with ping/pong.
> @@ -676,7 +680,9 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
>  
>  	ppcm = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
>  			&pcm_hardware_playback : &pcm_hardware_capture;
> +#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
>  	allocate_sram(substream, params->sram_size, ppcm);
> +#endif
>  	snd_soc_set_runtime_hwparams(substream, ppcm);
>  	/* ensure that buffer size is a multiple of period size */
>  	ret = snd_pcm_hw_constraint_integer(runtime,
> @@ -817,11 +823,13 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
>  		dma_free_writecombine(pcm->card->dev, buf->bytes,
>  				      buf->area, buf->addr);
>  		buf->area = NULL;
> +#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
>  		iram_dma = buf->private_data;
>  		if (iram_dma) {
>  			sram_free(iram_dma->area, iram_dma->bytes);
>  			kfree(iram_dma);
>  		}
> +#endif
>  	}
>  }
>  
> -- 
> 1.7.1
> 
> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-09-12  7:50     ` Hebbar, Gururaja
@ 2012-09-12  7:52       ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-12  7:52 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, Nori, Sekhar,
	davinci-linux-open-source, Girdwood, Liam, linux-arm-kernel

On Wed, Sep 12, 2012 at 07:50:31AM +0000, Hebbar, Gururaja wrote:

> Gentle ping. Is there any comments/review for this patch? 
> If not, can this be pulled in?

Don't send contentless quoted pings.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-09-12  7:52       ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-12  7:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 12, 2012 at 07:50:31AM +0000, Hebbar, Gururaja wrote:

> Gentle ping. Is there any comments/review for this patch? 
> If not, can this be pulled in?

Don't send contentless quoted pings.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-08-31 12:50   ` Hebbar, Gururaja
@ 2012-09-22 15:33     ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-22 15:33 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, sudhakar.raj, tony, nsekhar,
	davinci-linux-open-source, lrg, linux-arm-kernel

On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:

> +config SND_DAVINCI_HAVE_SRAM
> +	bool
> +	default y if ARCH_DAVINCI=y
> +	default n if ARCH_OMAP=y
> +

I've been sitting on this mostly since it seems like a step back from
multi-platform kernels (which is where we're trying to get to) and I've
been trying to decide what the best approach is.  I'm thinking that we
do want a generic API for allocating this stuff, it's a fairly generic
feature (there's TCMs as well).  

Adding ifdefs like this does just doesn't seem good.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-09-22 15:33     ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-09-22 15:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:

> +config SND_DAVINCI_HAVE_SRAM
> +	bool
> +	default y if ARCH_DAVINCI=y
> +	default n if ARCH_OMAP=y
> +

I've been sitting on this mostly since it seems like a step back from
multi-platform kernels (which is where we're trying to get to) and I've
been trying to decide what the best approach is.  I'm thinking that we
do want a generic API for allocating this stuff, it's a fairly generic
feature (there's TCMs as well).  

Adding ifdefs like this does just doesn't seem good.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-09-22 15:33     ` Mark Brown
@ 2012-09-27  6:57       ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-09-27  6:57 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, Nori, Sekhar,
	davinci-linux-open-source, Girdwood, Liam, linux-arm-kernel

On Sat, Sep 22, 2012 at 21:03:14, Mark Brown wrote:
> On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:
> 
> > +config SND_DAVINCI_HAVE_SRAM
> > +	bool
> > +	default y if ARCH_DAVINCI=y
> > +	default n if ARCH_OMAP=y
> > +
> 
> I've been sitting on this mostly since it seems like a step back from
> multi-platform kernels (which is where we're trying to get to) and I've
> been trying to decide what the best approach is.  I'm thinking that we
> do want a generic API for allocating this stuff, it's a fairly generic
> feature (there's TCMs as well).  
> 
> Adding ifdefs like this does just doesn't seem good.
> 

I have no knowledge about multi-platform builds yet.

Currently this driver is shared between OMAP & DaVinci and both of them 
doesn't exist in single image build.

There was a effort done for this SRAM Consolidation [1] but it didn't progress.
Hence I took this approach as a time-being/workaround. This was we can get 
affected platforms (like AM335x) get going/working.


[1]. http://patchwork.ozlabs.org/patch/104059/

Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-09-27  6:57       ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-09-27  6:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 22, 2012 at 21:03:14, Mark Brown wrote:
> On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:
> 
> > +config SND_DAVINCI_HAVE_SRAM
> > +	bool
> > +	default y if ARCH_DAVINCI=y
> > +	default n if ARCH_OMAP=y
> > +
> 
> I've been sitting on this mostly since it seems like a step back from
> multi-platform kernels (which is where we're trying to get to) and I've
> been trying to decide what the best approach is.  I'm thinking that we
> do want a generic API for allocating this stuff, it's a fairly generic
> feature (there's TCMs as well).  
> 
> Adding ifdefs like this does just doesn't seem good.
> 

I have no knowledge about multi-platform builds yet.

Currently this driver is shared between OMAP & DaVinci and both of them 
doesn't exist in single image build.

There was a effort done for this SRAM Consolidation [1] but it didn't progress.
Hence I took this approach as a time-being/workaround. This was we can get 
affected platforms (like AM335x) get going/working.


[1]. http://patchwork.ozlabs.org/patch/104059/

Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-09-27  6:57       ` Hebbar, Gururaja
@ 2012-10-01 15:54           ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-10-01 15:54 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	Girdwood,  Liam,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Thu, Sep 27, 2012 at 06:57:49AM +0000, Hebbar, Gururaja wrote:

> I have no knowledge about multi-platform builds yet.

> Currently this driver is shared between OMAP & DaVinci and both of them 
> doesn't exist in single image build.

...due to issues like having compile time things selecting between the
platforms.  In other words what these ifdefs would do is move us further
away from that goal rather than towards it as we should be doing.

> There was a effort done for this SRAM Consolidation [1] but it didn't progress.
> Hence I took this approach as a time-being/workaround. This was we can get 
> affected platforms (like AM335x) get going/working.

Looks like it just needs more people pushing it...

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-01 15:54           ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-10-01 15:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Sep 27, 2012 at 06:57:49AM +0000, Hebbar, Gururaja wrote:

> I have no knowledge about multi-platform builds yet.

> Currently this driver is shared between OMAP & DaVinci and both of them 
> doesn't exist in single image build.

...due to issues like having compile time things selecting between the
platforms.  In other words what these ifdefs would do is move us further
away from that goal rather than towards it as we should be doing.

> There was a effort done for this SRAM Consolidation [1] but it didn't progress.
> Hence I took this approach as a time-being/workaround. This was we can get 
> affected platforms (like AM335x) get going/working.

Looks like it just needs more people pushing it...

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-09-22 15:33     ` Mark Brown
@ 2012-10-02  7:48       ` Peter Ujfalusi
  -1 siblings, 0 replies; 80+ messages in thread
From: Peter Ujfalusi @ 2012-10-02  7:48 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, sudhakar.raj, tony, nsekhar,
	davinci-linux-open-source, Hebbar, Gururaja, lrg,
	linux-arm-kernel

On 09/22/2012 06:33 PM, Mark Brown wrote:
> On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:
> 
>> +config SND_DAVINCI_HAVE_SRAM
>> +	bool
>> +	default y if ARCH_DAVINCI=y
>> +	default n if ARCH_OMAP=y
>> +
> 
> I've been sitting on this mostly since it seems like a step back from
> multi-platform kernels (which is where we're trying to get to) and I've
> been trying to decide what the best approach is.  I'm thinking that we
> do want a generic API for allocating this stuff, it's a fairly generic
> feature (there's TCMs as well).  
> 
> Adding ifdefs like this does just doesn't seem good.

I also agree that ifdef is not a good solution.
It is better to have this information passed as device_data and via DT it can
be decided based on the compatible property for the device.

-- 
Péter

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02  7:48       ` Peter Ujfalusi
  0 siblings, 0 replies; 80+ messages in thread
From: Peter Ujfalusi @ 2012-10-02  7:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/22/2012 06:33 PM, Mark Brown wrote:
> On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:
> 
>> +config SND_DAVINCI_HAVE_SRAM
>> +	bool
>> +	default y if ARCH_DAVINCI=y
>> +	default n if ARCH_OMAP=y
>> +
> 
> I've been sitting on this mostly since it seems like a step back from
> multi-platform kernels (which is where we're trying to get to) and I've
> been trying to decide what the best approach is.  I'm thinking that we
> do want a generic API for allocating this stuff, it's a fairly generic
> feature (there's TCMs as well).  
> 
> Adding ifdefs like this does just doesn't seem good.

I also agree that ifdef is not a good solution.
It is better to have this information passed as device_data and via DT it can
be decided based on the compatible property for the device.

-- 
P?ter

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-09-22 15:33     ` Mark Brown
@ 2012-10-02  8:37       ` Sekhar Nori
  -1 siblings, 0 replies; 80+ messages in thread
From: Sekhar Nori @ 2012-10-02  8:37 UTC (permalink / raw)
  To: Mark Brown
  Cc: Porter, Matt, alsa-devel, sudhakar.raj, tony,
	davinci-linux-open-source, Hebbar, Gururaja, lrg,
	linux-arm-kernel

Hi Mark,

On 9/22/2012 9:03 PM, Mark Brown wrote:
> On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:
> 
>> +config SND_DAVINCI_HAVE_SRAM
>> +	bool
>> +	default y if ARCH_DAVINCI=y
>> +	default n if ARCH_OMAP=y
>> +
> 
> I've been sitting on this mostly since it seems like a step back from
> multi-platform kernels (which is where we're trying to get to) and I've
> been trying to decide what the best approach is.  I'm thinking that we
> do want a generic API for allocating this stuff, it's a fairly generic
> feature (there's TCMs as well).  
> 
> Adding ifdefs like this does just doesn't seem good.

How about converting to use genalloc instead of the DaVinci private SRAM
API and passing the pool to be used via platform data?

Matt Porter just used this approach to make the uio PRUSS driver usable
on both DaVinci and AM335x. It suffered from the exact same problem.

https://patchwork.kernel.org/patch/1522481/

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02  8:37       ` Sekhar Nori
  0 siblings, 0 replies; 80+ messages in thread
From: Sekhar Nori @ 2012-10-02  8:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mark,

On 9/22/2012 9:03 PM, Mark Brown wrote:
> On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:
> 
>> +config SND_DAVINCI_HAVE_SRAM
>> +	bool
>> +	default y if ARCH_DAVINCI=y
>> +	default n if ARCH_OMAP=y
>> +
> 
> I've been sitting on this mostly since it seems like a step back from
> multi-platform kernels (which is where we're trying to get to) and I've
> been trying to decide what the best approach is.  I'm thinking that we
> do want a generic API for allocating this stuff, it's a fairly generic
> feature (there's TCMs as well).  
> 
> Adding ifdefs like this does just doesn't seem good.

How about converting to use genalloc instead of the DaVinci private SRAM
API and passing the pool to be used via platform data?

Matt Porter just used this approach to make the uio PRUSS driver usable
on both DaVinci and AM335x. It suffered from the exact same problem.

https://patchwork.kernel.org/patch/1522481/

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02  7:48       ` [alsa-devel] " Peter Ujfalusi
@ 2012-10-02  9:37         ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-10-02  9:37 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: alsa-devel, sudhakar.raj, tony, nsekhar,
	davinci-linux-open-source, Hebbar, Gururaja, lrg,
	linux-arm-kernel

On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:

> I also agree that ifdef is not a good solution.
> It is better to have this information passed as device_data and via DT it can
> be decided based on the compatible property for the device.

That's not really the problem here - the problem is that the APIs used
to get the SRAM are DaVinci only so it's not possible to build on OMAP
or other platforms.  The SRAM code needs to move to a standard API.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02  9:37         ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-10-02  9:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:

> I also agree that ifdef is not a good solution.
> It is better to have this information passed as device_data and via DT it can
> be decided based on the compatible property for the device.

That's not really the problem here - the problem is that the APIs used
to get the SRAM are DaVinci only so it's not possible to build on OMAP
or other platforms.  The SRAM code needs to move to a standard API.

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02  9:37         ` [alsa-devel] " Mark Brown
@ 2012-10-02 10:33           ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-02 10:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: Porter, Matt, alsa-devel, sudhakar.raj, tony, Nori, Sekhar,
	davinci-linux-open-source, Hebbar, Gururaja, Peter Ujfalusi, lrg,
	linux-arm-kernel

On 02.10.2012 11:37, Mark Brown wrote:
> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> 
>> I also agree that ifdef is not a good solution.
>> It is better to have this information passed as device_data and via DT it can
>> be decided based on the compatible property for the device.
> 
> That's not really the problem here - the problem is that the APIs used
> to get the SRAM are DaVinci only so it's not possible to build on OMAP
> or other platforms.  The SRAM code needs to move to a standard API.

What about following Matt Porter's idea and ignore the SRAM code
entirely and port the entire PCM code to generic dmaengine code first?
The EDMA driver needs to learn support for cyclic DMA for that, and I
might give that a try in near future.

Later on, the SRAM ping-pong code can get added back using genalloc
functions, as Sekhar proposed. That needs to be done by someone who has
access to a Davinci board though, I only have a AM33xx/OMAP here.


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02 10:33           ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-02 10:33 UTC (permalink / raw)
  To: linux-arm-kernel

On 02.10.2012 11:37, Mark Brown wrote:
> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> 
>> I also agree that ifdef is not a good solution.
>> It is better to have this information passed as device_data and via DT it can
>> be decided based on the compatible property for the device.
> 
> That's not really the problem here - the problem is that the APIs used
> to get the SRAM are DaVinci only so it's not possible to build on OMAP
> or other platforms.  The SRAM code needs to move to a standard API.

What about following Matt Porter's idea and ignore the SRAM code
entirely and port the entire PCM code to generic dmaengine code first?
The EDMA driver needs to learn support for cyclic DMA for that, and I
might give that a try in near future.

Later on, the SRAM ping-pong code can get added back using genalloc
functions, as Sekhar proposed. That needs to be done by someone who has
access to a Davinci board though, I only have a AM33xx/OMAP here.


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02 10:33           ` [alsa-devel] " Daniel Mack
@ 2012-10-02 11:06             ` Sekhar Nori
  -1 siblings, 0 replies; 80+ messages in thread
From: Sekhar Nori @ 2012-10-02 11:06 UTC (permalink / raw)
  To: Daniel Mack
  Cc: Porter, Matt, alsa-devel, sudhakar.raj, tony, Mark Brown,
	davinci-linux-open-source, Hebbar, Gururaja, Peter Ujfalusi, lrg,
	linux-arm-kernel

On 10/2/2012 4:03 PM, Daniel Mack wrote:
> On 02.10.2012 11:37, Mark Brown wrote:
>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>
>>> I also agree that ifdef is not a good solution.
>>> It is better to have this information passed as device_data and via DT it can
>>> be decided based on the compatible property for the device.
>>
>> That's not really the problem here - the problem is that the APIs used
>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>> or other platforms.  The SRAM code needs to move to a standard API.
> 
> What about following Matt Porter's idea and ignore the SRAM code
> entirely and port the entire PCM code to generic dmaengine code first?
> The EDMA driver needs to learn support for cyclic DMA for that, and I
> might give that a try in near future.
> 
> Later on, the SRAM ping-pong code can get added back using genalloc
> functions, as Sekhar proposed. That needs to be done by someone who has
> access to a Davinci board though, I only have a AM33xx/OMAP here.

We cannot "get rid" of SRAM code and add it back "later". It is required
for most DaVinci parts. The SRAM code can be converted to use genalloc
(conversion should be straightforward and I can help test it) and the
code that uses SRAM can probably keep using the private EDMA API till
the dmaengine EDMA driver has cyclic DMA support. Matt has already
posted patches to move private EDMA APIs to a common location. That
should keep AM335x build from breaking. Is this something that is feasible?

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02 11:06             ` Sekhar Nori
  0 siblings, 0 replies; 80+ messages in thread
From: Sekhar Nori @ 2012-10-02 11:06 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/2/2012 4:03 PM, Daniel Mack wrote:
> On 02.10.2012 11:37, Mark Brown wrote:
>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>
>>> I also agree that ifdef is not a good solution.
>>> It is better to have this information passed as device_data and via DT it can
>>> be decided based on the compatible property for the device.
>>
>> That's not really the problem here - the problem is that the APIs used
>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>> or other platforms.  The SRAM code needs to move to a standard API.
> 
> What about following Matt Porter's idea and ignore the SRAM code
> entirely and port the entire PCM code to generic dmaengine code first?
> The EDMA driver needs to learn support for cyclic DMA for that, and I
> might give that a try in near future.
> 
> Later on, the SRAM ping-pong code can get added back using genalloc
> functions, as Sekhar proposed. That needs to be done by someone who has
> access to a Davinci board though, I only have a AM33xx/OMAP here.

We cannot "get rid" of SRAM code and add it back "later". It is required
for most DaVinci parts. The SRAM code can be converted to use genalloc
(conversion should be straightforward and I can help test it) and the
code that uses SRAM can probably keep using the private EDMA API till
the dmaengine EDMA driver has cyclic DMA support. Matt has already
posted patches to move private EDMA APIs to a common location. That
should keep AM335x build from breaking. Is this something that is feasible?

Thanks,
Sekhar

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02 11:06             ` Sekhar Nori
@ 2012-10-02 13:42               ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-02 13:42 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Porter, Matt, alsa-devel, sudhakar.raj, tony, Mark Brown,
	davinci-linux-open-source, Hebbar, Gururaja, Peter Ujfalusi, lrg,
	linux-arm-kernel

On 02.10.2012 13:06, Sekhar Nori wrote:
> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>> On 02.10.2012 11:37, Mark Brown wrote:
>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>
>>>> I also agree that ifdef is not a good solution.
>>>> It is better to have this information passed as device_data and via DT it can
>>>> be decided based on the compatible property for the device.
>>>
>>> That's not really the problem here - the problem is that the APIs used
>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>> or other platforms.  The SRAM code needs to move to a standard API.
>>
>> What about following Matt Porter's idea and ignore the SRAM code
>> entirely and port the entire PCM code to generic dmaengine code first?
>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>> might give that a try in near future.
>>
>> Later on, the SRAM ping-pong code can get added back using genalloc
>> functions, as Sekhar proposed. That needs to be done by someone who has
>> access to a Davinci board though, I only have a AM33xx/OMAP here.
> 
> We cannot "get rid" of SRAM code and add it back "later". It is required
> for most DaVinci parts. The SRAM code can be converted to use genalloc
> (conversion should be straightforward and I can help test it) and the
> code that uses SRAM can probably keep using the private EDMA API till
> the dmaengine EDMA driver has cyclic DMA support. Matt has already
> posted patches to move private EDMA APIs to a common location. That
> should keep AM335x build from breaking. Is this something that is feasible?

Yes - by "later" I just meant in a subsequent patch. But you're probably
right, we can also do that first.

I'm looking at that right now and the problem seems that we don't have a
sane way to dynamically look up gen_pools independently of the actual
run-time platform. All users of gen_pools seem to know which platform
they run on and access a platform-specific pool. So I don't currently
see how we could implement multi-platform code, gen_pools are fine but
don't solve the problem here.

Would it be an idea to add a char* member to gen_pools and a function
that can be used to dynamically look it up again? If a buffer with a
certain name exists, we can use it and install that ping-pong buffer,
otherwise we just don't. While that would be easy to do, it's a
tree-wide change.

Is there a better way that I miss?


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02 13:42               ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-02 13:42 UTC (permalink / raw)
  To: linux-arm-kernel

On 02.10.2012 13:06, Sekhar Nori wrote:
> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>> On 02.10.2012 11:37, Mark Brown wrote:
>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>
>>>> I also agree that ifdef is not a good solution.
>>>> It is better to have this information passed as device_data and via DT it can
>>>> be decided based on the compatible property for the device.
>>>
>>> That's not really the problem here - the problem is that the APIs used
>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>> or other platforms.  The SRAM code needs to move to a standard API.
>>
>> What about following Matt Porter's idea and ignore the SRAM code
>> entirely and port the entire PCM code to generic dmaengine code first?
>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>> might give that a try in near future.
>>
>> Later on, the SRAM ping-pong code can get added back using genalloc
>> functions, as Sekhar proposed. That needs to be done by someone who has
>> access to a Davinci board though, I only have a AM33xx/OMAP here.
> 
> We cannot "get rid" of SRAM code and add it back "later". It is required
> for most DaVinci parts. The SRAM code can be converted to use genalloc
> (conversion should be straightforward and I can help test it) and the
> code that uses SRAM can probably keep using the private EDMA API till
> the dmaengine EDMA driver has cyclic DMA support. Matt has already
> posted patches to move private EDMA APIs to a common location. That
> should keep AM335x build from breaking. Is this something that is feasible?

Yes - by "later" I just meant in a subsequent patch. But you're probably
right, we can also do that first.

I'm looking at that right now and the problem seems that we don't have a
sane way to dynamically look up gen_pools independently of the actual
run-time platform. All users of gen_pools seem to know which platform
they run on and access a platform-specific pool. So I don't currently
see how we could implement multi-platform code, gen_pools are fine but
don't solve the problem here.

Would it be an idea to add a char* member to gen_pools and a function
that can be used to dynamically look it up again? If a buffer with a
certain name exists, we can use it and install that ping-pong buffer,
otherwise we just don't. While that would be easy to do, it's a
tree-wide change.

Is there a better way that I miss?


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02  7:48       ` [alsa-devel] " Peter Ujfalusi
@ 2012-10-02 16:28           ` Matt Porter
  -1 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-02 16:28 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	Mark Brown,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	lrg-l0cyMroinI0,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> On 09/22/2012 06:33 PM, Mark Brown wrote:
> > On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:
> > 
> >> +config SND_DAVINCI_HAVE_SRAM
> >> +	bool
> >> +	default y if ARCH_DAVINCI=y
> >> +	default n if ARCH_OMAP=y
> >> +
> > 
> > I've been sitting on this mostly since it seems like a step back from
> > multi-platform kernels (which is where we're trying to get to) and I've
> > been trying to decide what the best approach is.  I'm thinking that we
> > do want a generic API for allocating this stuff, it's a fairly generic
> > feature (there's TCMs as well).  
> > 
> > Adding ifdefs like this does just doesn't seem good.
> 
> I also agree that ifdef is not a good solution.
> It is better to have this information passed as device_data and via DT it can
> be decided based on the compatible property for the device.

The driver is going to be used by both !DT and DT only platforms for a
while so DT-centric solutions just don't make sense. There's a clean way
to do this that was used for uio_pruss.c. When davinci is further along
on DT conversion we can make use of the devicetree-based generic sram
driver that's progressing along right now [1]. It needs some minor help
to allow specifying the gen_pool allocation order, but it will work
nicely for getting access to the right sram pool.

-Matt

[1] https://patchwork.kernel.org/patch/1421961/

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02 16:28           ` Matt Porter
  0 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-02 16:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> On 09/22/2012 06:33 PM, Mark Brown wrote:
> > On Fri, Aug 31, 2012 at 06:20:58PM +0530, Hebbar, Gururaja wrote:
> > 
> >> +config SND_DAVINCI_HAVE_SRAM
> >> +	bool
> >> +	default y if ARCH_DAVINCI=y
> >> +	default n if ARCH_OMAP=y
> >> +
> > 
> > I've been sitting on this mostly since it seems like a step back from
> > multi-platform kernels (which is where we're trying to get to) and I've
> > been trying to decide what the best approach is.  I'm thinking that we
> > do want a generic API for allocating this stuff, it's a fairly generic
> > feature (there's TCMs as well).  
> > 
> > Adding ifdefs like this does just doesn't seem good.
> 
> I also agree that ifdef is not a good solution.
> It is better to have this information passed as device_data and via DT it can
> be decided based on the compatible property for the device.

The driver is going to be used by both !DT and DT only platforms for a
while so DT-centric solutions just don't make sense. There's a clean way
to do this that was used for uio_pruss.c. When davinci is further along
on DT conversion we can make use of the devicetree-based generic sram
driver that's progressing along right now [1]. It needs some minor help
to allow specifying the gen_pool allocation order, but it will work
nicely for getting access to the right sram pool.

-Matt

[1] https://patchwork.kernel.org/patch/1421961/

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02 10:33           ` [alsa-devel] " Daniel Mack
@ 2012-10-02 16:30             ` Matt Porter
  -1 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-02 16:30 UTC (permalink / raw)
  To: Daniel Mack
  Cc: alsa-devel, tony, Mark Brown, davinci-linux-open-source,
	Peter Ujfalusi, lrg, linux-arm-kernel

On Tue, Oct 02, 2012 at 12:33:39PM +0200, Daniel Mack wrote:
> On 02.10.2012 11:37, Mark Brown wrote:
> > On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> > 
> >> I also agree that ifdef is not a good solution.
> >> It is better to have this information passed as device_data and via DT it can
> >> be decided based on the compatible property for the device.
> > 
> > That's not really the problem here - the problem is that the APIs used
> > to get the SRAM are DaVinci only so it's not possible to build on OMAP
> > or other platforms.  The SRAM code needs to move to a standard API.
> 
> What about following Matt Porter's idea and ignore the SRAM code
> entirely and port the entire PCM code to generic dmaengine code first?
> The EDMA driver needs to learn support for cyclic DMA for that, and I
> might give that a try in near future.
> 
> Later on, the SRAM ping-pong code can get added back using genalloc
> functions, as Sekhar proposed. That needs to be done by someone who has
> access to a Davinci board though, I only have a AM33xx/OMAP here.

I already backed away from that idea since the older SoCs without a
FIFO absolutely need ping-pong buffering in SRAM.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02 16:30             ` Matt Porter
  0 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-02 16:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 02, 2012 at 12:33:39PM +0200, Daniel Mack wrote:
> On 02.10.2012 11:37, Mark Brown wrote:
> > On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> > 
> >> I also agree that ifdef is not a good solution.
> >> It is better to have this information passed as device_data and via DT it can
> >> be decided based on the compatible property for the device.
> > 
> > That's not really the problem here - the problem is that the APIs used
> > to get the SRAM are DaVinci only so it's not possible to build on OMAP
> > or other platforms.  The SRAM code needs to move to a standard API.
> 
> What about following Matt Porter's idea and ignore the SRAM code
> entirely and port the entire PCM code to generic dmaengine code first?
> The EDMA driver needs to learn support for cyclic DMA for that, and I
> might give that a try in near future.
> 
> Later on, the SRAM ping-pong code can get added back using genalloc
> functions, as Sekhar proposed. That needs to be done by someone who has
> access to a Davinci board though, I only have a AM33xx/OMAP here.

I already backed away from that idea since the older SoCs without a
FIFO absolutely need ping-pong buffering in SRAM.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02 13:42               ` Daniel Mack
@ 2012-10-02 16:41                   ` Matt Porter
  -1 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-02 16:41 UTC (permalink / raw)
  To: Daniel Mack
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	Mark Brown,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	Peter Ujfalusi, lrg-l0cyMroinI0,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
> On 02.10.2012 13:06, Sekhar Nori wrote:
> > On 10/2/2012 4:03 PM, Daniel Mack wrote:
> >> On 02.10.2012 11:37, Mark Brown wrote:
> >>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> >>>
> >>>> I also agree that ifdef is not a good solution.
> >>>> It is better to have this information passed as device_data and via DT it can
> >>>> be decided based on the compatible property for the device.
> >>>
> >>> That's not really the problem here - the problem is that the APIs used
> >>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
> >>> or other platforms.  The SRAM code needs to move to a standard API.
> >>
> >> What about following Matt Porter's idea and ignore the SRAM code
> >> entirely and port the entire PCM code to generic dmaengine code first?
> >> The EDMA driver needs to learn support for cyclic DMA for that, and I
> >> might give that a try in near future.
> >>
> >> Later on, the SRAM ping-pong code can get added back using genalloc
> >> functions, as Sekhar proposed. That needs to be done by someone who has
> >> access to a Davinci board though, I only have a AM33xx/OMAP here.
> > 
> > We cannot "get rid" of SRAM code and add it back "later". It is required
> > for most DaVinci parts. The SRAM code can be converted to use genalloc
> > (conversion should be straightforward and I can help test it) and the
> > code that uses SRAM can probably keep using the private EDMA API till
> > the dmaengine EDMA driver has cyclic DMA support. Matt has already
> > posted patches to move private EDMA APIs to a common location. That
> > should keep AM335x build from breaking. Is this something that is feasible?
> 
> Yes - by "later" I just meant in a subsequent patch. But you're probably
> right, we can also do that first.
> 
> I'm looking at that right now and the problem seems that we don't have a
> sane way to dynamically look up gen_pools independently of the actual
> run-time platform. All users of gen_pools seem to know which platform
> they run on and access a platform-specific pool. So I don't currently
> see how we could implement multi-platform code, gen_pools are fine but
> don't solve the problem here.
> 
> Would it be an idea to add a char* member to gen_pools and a function
> that can be used to dynamically look it up again? If a buffer with a
> certain name exists, we can use it and install that ping-pong buffer,
> otherwise we just don't. While that would be easy to do, it's a
> tree-wide change.
> 
> Is there a better way that I miss?

At the high level there's two platform models we have to handle, the
boot from board file !DT case, and then the boot from DT case. Since
Davinci is just starting DT conversion, we mostly care about the !DT
base in which the struct gen_pool * is passed in pdata to the ASoC
driver. It is then selectable on a per-platform basis where the decision
should be made.

Given a separate discussion with Sekhar, we're only going to have one
SRAM pool on any DaVinci part right now...this was only a question on
L138 anyway. But regardless, the created gen_pool will be passed via
pdata. Since DT conversion is starting and we need to consider that now,
the idea there is to use the DT-based generic sram driver [1] such that
when we do boot from DT on Davinci, the genpool is provided via phandle
and the pointer extracted with the OF helpers that are part of the
series.

That's pretty much it. I'm reworking the backend support as discussed
with Sekhar wrt to my uio_pruss series. I can post a standalone series
that just replaces sram_* with genalloc for davinci ASoC.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02 16:41                   ` Matt Porter
  0 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-02 16:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
> On 02.10.2012 13:06, Sekhar Nori wrote:
> > On 10/2/2012 4:03 PM, Daniel Mack wrote:
> >> On 02.10.2012 11:37, Mark Brown wrote:
> >>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> >>>
> >>>> I also agree that ifdef is not a good solution.
> >>>> It is better to have this information passed as device_data and via DT it can
> >>>> be decided based on the compatible property for the device.
> >>>
> >>> That's not really the problem here - the problem is that the APIs used
> >>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
> >>> or other platforms.  The SRAM code needs to move to a standard API.
> >>
> >> What about following Matt Porter's idea and ignore the SRAM code
> >> entirely and port the entire PCM code to generic dmaengine code first?
> >> The EDMA driver needs to learn support for cyclic DMA for that, and I
> >> might give that a try in near future.
> >>
> >> Later on, the SRAM ping-pong code can get added back using genalloc
> >> functions, as Sekhar proposed. That needs to be done by someone who has
> >> access to a Davinci board though, I only have a AM33xx/OMAP here.
> > 
> > We cannot "get rid" of SRAM code and add it back "later". It is required
> > for most DaVinci parts. The SRAM code can be converted to use genalloc
> > (conversion should be straightforward and I can help test it) and the
> > code that uses SRAM can probably keep using the private EDMA API till
> > the dmaengine EDMA driver has cyclic DMA support. Matt has already
> > posted patches to move private EDMA APIs to a common location. That
> > should keep AM335x build from breaking. Is this something that is feasible?
> 
> Yes - by "later" I just meant in a subsequent patch. But you're probably
> right, we can also do that first.
> 
> I'm looking at that right now and the problem seems that we don't have a
> sane way to dynamically look up gen_pools independently of the actual
> run-time platform. All users of gen_pools seem to know which platform
> they run on and access a platform-specific pool. So I don't currently
> see how we could implement multi-platform code, gen_pools are fine but
> don't solve the problem here.
> 
> Would it be an idea to add a char* member to gen_pools and a function
> that can be used to dynamically look it up again? If a buffer with a
> certain name exists, we can use it and install that ping-pong buffer,
> otherwise we just don't. While that would be easy to do, it's a
> tree-wide change.
> 
> Is there a better way that I miss?

At the high level there's two platform models we have to handle, the
boot from board file !DT case, and then the boot from DT case. Since
Davinci is just starting DT conversion, we mostly care about the !DT
base in which the struct gen_pool * is passed in pdata to the ASoC
driver. It is then selectable on a per-platform basis where the decision
should be made.

Given a separate discussion with Sekhar, we're only going to have one
SRAM pool on any DaVinci part right now...this was only a question on
L138 anyway. But regardless, the created gen_pool will be passed via
pdata. Since DT conversion is starting and we need to consider that now,
the idea there is to use the DT-based generic sram driver [1] such that
when we do boot from DT on Davinci, the genpool is provided via phandle
and the pointer extracted with the OF helpers that are part of the
series.

That's pretty much it. I'm reworking the backend support as discussed
with Sekhar wrt to my uio_pruss series. I can post a standalone series
that just replaces sram_* with genalloc for davinci ASoC.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02 16:41                   ` Matt Porter
@ 2012-10-02 16:50                     ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-02 16:50 UTC (permalink / raw)
  To: Matt Porter
  Cc: alsa-devel, tony, Mark Brown, Sekhar Nori,
	davinci-linux-open-source, Peter Ujfalusi, lrg, linux-arm-kernel

On 02.10.2012 18:41, Matt Porter wrote:
> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>
>>>>>> I also agree that ifdef is not a good solution.
>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>> be decided based on the compatible property for the device.
>>>>>
>>>>> That's not really the problem here - the problem is that the APIs used
>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>
>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>> might give that a try in near future.
>>>>
>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>
>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>> (conversion should be straightforward and I can help test it) and the
>>> code that uses SRAM can probably keep using the private EDMA API till
>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>> posted patches to move private EDMA APIs to a common location. That
>>> should keep AM335x build from breaking. Is this something that is feasible?
>>
>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>> right, we can also do that first.
>>
>> I'm looking at that right now and the problem seems that we don't have a
>> sane way to dynamically look up gen_pools independently of the actual
>> run-time platform. All users of gen_pools seem to know which platform
>> they run on and access a platform-specific pool. So I don't currently
>> see how we could implement multi-platform code, gen_pools are fine but
>> don't solve the problem here.
>>
>> Would it be an idea to add a char* member to gen_pools and a function
>> that can be used to dynamically look it up again? If a buffer with a
>> certain name exists, we can use it and install that ping-pong buffer,
>> otherwise we just don't. While that would be easy to do, it's a
>> tree-wide change.
>>
>> Is there a better way that I miss?
> 
> At the high level there's two platform models we have to handle, the
> boot from board file !DT case, and then the boot from DT case. Since
> Davinci is just starting DT conversion, we mostly care about the !DT
> base in which the struct gen_pool * is passed in pdata to the ASoC
> driver. It is then selectable on a per-platform basis where the decision
> should be made.
> 
> Given a separate discussion with Sekhar, we're only going to have one
> SRAM pool on any DaVinci part right now...this was only a question on
> L138 anyway. But regardless, the created gen_pool will be passed via
> pdata.

I thought about this too, as mmp does it that way.

> Since DT conversion is starting and we need to consider that now,
> the idea there is to use the DT-based generic sram driver [1] such that
> when we do boot from DT on Davinci, the genpool is provided via phandle
> and the pointer extracted with the OF helpers that are part of the
> series.

A phandle is the cleanest way I think, yes.

> That's pretty much it. I'm reworking the backend support as discussed
> with Sekhar wrt to my uio_pruss series. I can post a standalone series
> that just replaces sram_* with genalloc for davinci ASoC.

As you can also test it, it would be easiest if you came up with a patch
for that, yes. I can have a look at the dma bits laters, once my OMAP
board finally works with the code as it currently stands. I'm still
fighting with the mcasp driver right now ...


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02 16:50                     ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-02 16:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 02.10.2012 18:41, Matt Porter wrote:
> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>
>>>>>> I also agree that ifdef is not a good solution.
>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>> be decided based on the compatible property for the device.
>>>>>
>>>>> That's not really the problem here - the problem is that the APIs used
>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>
>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>> might give that a try in near future.
>>>>
>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>
>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>> (conversion should be straightforward and I can help test it) and the
>>> code that uses SRAM can probably keep using the private EDMA API till
>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>> posted patches to move private EDMA APIs to a common location. That
>>> should keep AM335x build from breaking. Is this something that is feasible?
>>
>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>> right, we can also do that first.
>>
>> I'm looking at that right now and the problem seems that we don't have a
>> sane way to dynamically look up gen_pools independently of the actual
>> run-time platform. All users of gen_pools seem to know which platform
>> they run on and access a platform-specific pool. So I don't currently
>> see how we could implement multi-platform code, gen_pools are fine but
>> don't solve the problem here.
>>
>> Would it be an idea to add a char* member to gen_pools and a function
>> that can be used to dynamically look it up again? If a buffer with a
>> certain name exists, we can use it and install that ping-pong buffer,
>> otherwise we just don't. While that would be easy to do, it's a
>> tree-wide change.
>>
>> Is there a better way that I miss?
> 
> At the high level there's two platform models we have to handle, the
> boot from board file !DT case, and then the boot from DT case. Since
> Davinci is just starting DT conversion, we mostly care about the !DT
> base in which the struct gen_pool * is passed in pdata to the ASoC
> driver. It is then selectable on a per-platform basis where the decision
> should be made.
> 
> Given a separate discussion with Sekhar, we're only going to have one
> SRAM pool on any DaVinci part right now...this was only a question on
> L138 anyway. But regardless, the created gen_pool will be passed via
> pdata.

I thought about this too, as mmp does it that way.

> Since DT conversion is starting and we need to consider that now,
> the idea there is to use the DT-based generic sram driver [1] such that
> when we do boot from DT on Davinci, the genpool is provided via phandle
> and the pointer extracted with the OF helpers that are part of the
> series.

A phandle is the cleanest way I think, yes.

> That's pretty much it. I'm reworking the backend support as discussed
> with Sekhar wrt to my uio_pruss series. I can post a standalone series
> that just replaces sram_* with genalloc for davinci ASoC.

As you can also test it, it would be easiest if you came up with a patch
for that, yes. I can have a look at the dma bits laters, once my OMAP
board finally works with the code as it currently stands. I'm still
fighting with the mcasp driver right now ...


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02 16:50                     ` [alsa-devel] " Daniel Mack
@ 2012-10-02 17:28                         ` Matt Porter
  -1 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-02 17:28 UTC (permalink / raw)
  To: Daniel Mack
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	Mark Brown,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	Peter Ujfalusi, lrg-l0cyMroinI0,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Tue, Oct 02, 2012 at 06:50:14PM +0200, Daniel Mack wrote:
> On 02.10.2012 18:41, Matt Porter wrote:
> > On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
> >> On 02.10.2012 13:06, Sekhar Nori wrote:
> >>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
> >>>> On 02.10.2012 11:37, Mark Brown wrote:
> >>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> >>>>>
> >>>>>> I also agree that ifdef is not a good solution.
> >>>>>> It is better to have this information passed as device_data and via DT it can
> >>>>>> be decided based on the compatible property for the device.
> >>>>>
> >>>>> That's not really the problem here - the problem is that the APIs used
> >>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
> >>>>> or other platforms.  The SRAM code needs to move to a standard API.
> >>>>
> >>>> What about following Matt Porter's idea and ignore the SRAM code
> >>>> entirely and port the entire PCM code to generic dmaengine code first?
> >>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
> >>>> might give that a try in near future.
> >>>>
> >>>> Later on, the SRAM ping-pong code can get added back using genalloc
> >>>> functions, as Sekhar proposed. That needs to be done by someone who has
> >>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
> >>>
> >>> We cannot "get rid" of SRAM code and add it back "later". It is required
> >>> for most DaVinci parts. The SRAM code can be converted to use genalloc
> >>> (conversion should be straightforward and I can help test it) and the
> >>> code that uses SRAM can probably keep using the private EDMA API till
> >>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
> >>> posted patches to move private EDMA APIs to a common location. That
> >>> should keep AM335x build from breaking. Is this something that is feasible?
> >>
> >> Yes - by "later" I just meant in a subsequent patch. But you're probably
> >> right, we can also do that first.
> >>
> >> I'm looking at that right now and the problem seems that we don't have a
> >> sane way to dynamically look up gen_pools independently of the actual
> >> run-time platform. All users of gen_pools seem to know which platform
> >> they run on and access a platform-specific pool. So I don't currently
> >> see how we could implement multi-platform code, gen_pools are fine but
> >> don't solve the problem here.
> >>
> >> Would it be an idea to add a char* member to gen_pools and a function
> >> that can be used to dynamically look it up again? If a buffer with a
> >> certain name exists, we can use it and install that ping-pong buffer,
> >> otherwise we just don't. While that would be easy to do, it's a
> >> tree-wide change.
> >>
> >> Is there a better way that I miss?
> > 
> > At the high level there's two platform models we have to handle, the
> > boot from board file !DT case, and then the boot from DT case. Since
> > Davinci is just starting DT conversion, we mostly care about the !DT
> > base in which the struct gen_pool * is passed in pdata to the ASoC
> > driver. It is then selectable on a per-platform basis where the decision
> > should be made.
> > 
> > Given a separate discussion with Sekhar, we're only going to have one
> > SRAM pool on any DaVinci part right now...this was only a question on
> > L138 anyway. But regardless, the created gen_pool will be passed via
> > pdata.
> 
> I thought about this too, as mmp does it that way.
> 
> > Since DT conversion is starting and we need to consider that now,
> > the idea there is to use the DT-based generic sram driver [1] such that
> > when we do boot from DT on Davinci, the genpool is provided via phandle
> > and the pointer extracted with the OF helpers that are part of the
> > series.
> 
> A phandle is the cleanest way I think, yes.

See the of_get_named_gen_pool() helper example in the series
http://comments.gmane.org/gmane.linux.kernel/1352210

> > That's pretty much it. I'm reworking the backend support as discussed
> > with Sekhar wrt to my uio_pruss series. I can post a standalone series
> > that just replaces sram_* with genalloc for davinci ASoC.
> 
> As you can also test it, it would be easiest if you came up with a patch
> for that, yes. I can have a look at the dma bits laters, once my OMAP
> board finally works with the code as it currently stands. I'm still
> fighting with the mcasp driver right now ...

Ok. Also, as Sekhar pointed out, dmaengine itself isn't a blocker since
we can have AM33xx use the private EDMA API for ASoC until I finish
cyclic DMA support. Handling the ping-pong and normal case transparently
within the dmaengine driver will require a further look but at least
genalloc is our first step there.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-02 17:28                         ` Matt Porter
  0 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-02 17:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 02, 2012 at 06:50:14PM +0200, Daniel Mack wrote:
> On 02.10.2012 18:41, Matt Porter wrote:
> > On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
> >> On 02.10.2012 13:06, Sekhar Nori wrote:
> >>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
> >>>> On 02.10.2012 11:37, Mark Brown wrote:
> >>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> >>>>>
> >>>>>> I also agree that ifdef is not a good solution.
> >>>>>> It is better to have this information passed as device_data and via DT it can
> >>>>>> be decided based on the compatible property for the device.
> >>>>>
> >>>>> That's not really the problem here - the problem is that the APIs used
> >>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
> >>>>> or other platforms.  The SRAM code needs to move to a standard API.
> >>>>
> >>>> What about following Matt Porter's idea and ignore the SRAM code
> >>>> entirely and port the entire PCM code to generic dmaengine code first?
> >>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
> >>>> might give that a try in near future.
> >>>>
> >>>> Later on, the SRAM ping-pong code can get added back using genalloc
> >>>> functions, as Sekhar proposed. That needs to be done by someone who has
> >>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
> >>>
> >>> We cannot "get rid" of SRAM code and add it back "later". It is required
> >>> for most DaVinci parts. The SRAM code can be converted to use genalloc
> >>> (conversion should be straightforward and I can help test it) and the
> >>> code that uses SRAM can probably keep using the private EDMA API till
> >>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
> >>> posted patches to move private EDMA APIs to a common location. That
> >>> should keep AM335x build from breaking. Is this something that is feasible?
> >>
> >> Yes - by "later" I just meant in a subsequent patch. But you're probably
> >> right, we can also do that first.
> >>
> >> I'm looking at that right now and the problem seems that we don't have a
> >> sane way to dynamically look up gen_pools independently of the actual
> >> run-time platform. All users of gen_pools seem to know which platform
> >> they run on and access a platform-specific pool. So I don't currently
> >> see how we could implement multi-platform code, gen_pools are fine but
> >> don't solve the problem here.
> >>
> >> Would it be an idea to add a char* member to gen_pools and a function
> >> that can be used to dynamically look it up again? If a buffer with a
> >> certain name exists, we can use it and install that ping-pong buffer,
> >> otherwise we just don't. While that would be easy to do, it's a
> >> tree-wide change.
> >>
> >> Is there a better way that I miss?
> > 
> > At the high level there's two platform models we have to handle, the
> > boot from board file !DT case, and then the boot from DT case. Since
> > Davinci is just starting DT conversion, we mostly care about the !DT
> > base in which the struct gen_pool * is passed in pdata to the ASoC
> > driver. It is then selectable on a per-platform basis where the decision
> > should be made.
> > 
> > Given a separate discussion with Sekhar, we're only going to have one
> > SRAM pool on any DaVinci part right now...this was only a question on
> > L138 anyway. But regardless, the created gen_pool will be passed via
> > pdata.
> 
> I thought about this too, as mmp does it that way.
> 
> > Since DT conversion is starting and we need to consider that now,
> > the idea there is to use the DT-based generic sram driver [1] such that
> > when we do boot from DT on Davinci, the genpool is provided via phandle
> > and the pointer extracted with the OF helpers that are part of the
> > series.
> 
> A phandle is the cleanest way I think, yes.

See the of_get_named_gen_pool() helper example in the series
http://comments.gmane.org/gmane.linux.kernel/1352210

> > That's pretty much it. I'm reworking the backend support as discussed
> > with Sekhar wrt to my uio_pruss series. I can post a standalone series
> > that just replaces sram_* with genalloc for davinci ASoC.
> 
> As you can also test it, it would be easiest if you came up with a patch
> for that, yes. I can have a look at the dma bits laters, once my OMAP
> board finally works with the code as it currently stands. I'm still
> fighting with the mcasp driver right now ...

Ok. Also, as Sekhar pointed out, dmaengine itself isn't a blocker since
we can have AM33xx use the private EDMA API for ASoC until I finish
cyclic DMA support. Handling the ping-pong and normal case transparently
within the dmaengine driver will require a further look but at least
genalloc is our first step there.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-08-31 12:50 ` Hebbar, Gururaja
@ 2012-10-02 22:28   ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-02 22:28 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, sudhakar.raj, tony, broonie, nsekhar,
	davinci-linux-open-source, lrg, linux-arm-kernel

On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> register offset and missing generic SRAM APIs support
> 
> Changes
> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
>   "ti,omap2-mcasp-audio" to identify version 3 controller.
> - The register offsets are handled depending on the version.
> - Provide a config option to indicate missing SRAM API support.

Could you give some insight which hardware this was tested on? I'm
trying to get this up and running on a AM33xx board, and the patches
look all reasonable to me. My problem is that I can't make the DMA
engine move forward, I fail to receive a single interrupt on this
peripheral after the stream starts. I will continue searching for the
reason of this tomorrow, but maybe you can give me some hint by
explaining your setup?

Note that I'm using your patches together with Matt's from this series:

  https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1

... but it doesn't work without those either.



Thanks,
Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-10-02 22:28   ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-02 22:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> register offset and missing generic SRAM APIs support
> 
> Changes
> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
>   "ti,omap2-mcasp-audio" to identify version 3 controller.
> - The register offsets are handled depending on the version.
> - Provide a config option to indicate missing SRAM API support.

Could you give some insight which hardware this was tested on? I'm
trying to get this up and running on a AM33xx board, and the patches
look all reasonable to me. My problem is that I can't make the DMA
engine move forward, I fail to receive a single interrupt on this
peripheral after the stream starts. I will continue searching for the
reason of this tomorrow, but maybe you can give me some hint by
explaining your setup?

Note that I'm using your patches together with Matt's from this series:

  https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1

... but it doesn't work without those either.



Thanks,
Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* RE: [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-10-02 22:28   ` Daniel Mack
@ 2012-10-03  7:16       ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-10-03  7:16 UTC (permalink / raw)
  To: Daniel Mack
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	Girdwood,  Liam,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> > The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> > register offset and missing generic SRAM APIs support
> > 
> > Changes
> > - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
> >   "ti,omap2-mcasp-audio" to identify version 3 controller.
> > - The register offsets are handled depending on the version.
> > - Provide a config option to indicate missing SRAM API support.
> 
> Could you give some insight which hardware this was tested on? I'm
> trying to get this up and running on a AM33xx board, and the patches
> look all reasonable to me. My problem is that I can't make the DMA
> engine move forward, I fail to receive a single interrupt on this
> peripheral after the stream starts. I will continue searching for the
> reason of this tomorrow, but maybe you can give me some hint by
> explaining your setup?
> 
> Note that I'm using your patches together with Matt's from this series:
> 
>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
> 
> ... but it doesn't work without those either.


When I started working on adding DT support to McASP driver, Matt Porter 
EDMA port was not yet ready. 

So 
1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
   device init). 
2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 

3. Added DT support to McASP driver.

I tested this on AM335x EVM board. 

If you need the code, I can share it as a patch (I will send the patch as a 
private mail since the patch is huge).


[1]
http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=d7e124e8074cccf9958290e773c88a4b2b36412b

[2]
https://github.com/hvaibhav/am335x-linux/tree/am335x-upstream-staging

> 
> 
> 
> Thanks,
> Daniel
> 
> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-10-03  7:16       ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-10-03  7:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> > The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> > register offset and missing generic SRAM APIs support
> > 
> > Changes
> > - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
> >   "ti,omap2-mcasp-audio" to identify version 3 controller.
> > - The register offsets are handled depending on the version.
> > - Provide a config option to indicate missing SRAM API support.
> 
> Could you give some insight which hardware this was tested on? I'm
> trying to get this up and running on a AM33xx board, and the patches
> look all reasonable to me. My problem is that I can't make the DMA
> engine move forward, I fail to receive a single interrupt on this
> peripheral after the stream starts. I will continue searching for the
> reason of this tomorrow, but maybe you can give me some hint by
> explaining your setup?
> 
> Note that I'm using your patches together with Matt's from this series:
> 
>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
> 
> ... but it doesn't work without those either.


When I started working on adding DT support to McASP driver, Matt Porter 
EDMA port was not yet ready. 

So 
1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
   device init). 
2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 

3. Added DT support to McASP driver.

I tested this on AM335x EVM board. 

If you need the code, I can share it as a patch (I will send the patch as a 
private mail since the patch is huge).


[1]
http://arago-project.org/git/projects/?p=linux-am33x.git;a=commit;h=d7e124e8074cccf9958290e773c88a4b2b36412b

[2]
https://github.com/hvaibhav/am335x-linux/tree/am335x-upstream-staging

> 
> 
> 
> Thanks,
> Daniel
> 
> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-10-03  7:16       ` Hebbar, Gururaja
@ 2012-10-03 11:16         ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-03 11:16 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, broonie, Nori, Sekhar,
	davinci-linux-open-source, Hiremath, Vaibhav, Girdwood, Liam,
	linux-arm-kernel

On 03.10.2012 09:16, Hebbar, Gururaja wrote:
> On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
>> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
>>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
>>> register offset and missing generic SRAM APIs support
>>>
>>> Changes
>>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
>>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
>>> - The register offsets are handled depending on the version.
>>> - Provide a config option to indicate missing SRAM API support.
>>
>> Could you give some insight which hardware this was tested on? I'm
>> trying to get this up and running on a AM33xx board, and the patches
>> look all reasonable to me. My problem is that I can't make the DMA
>> engine move forward, I fail to receive a single interrupt on this
>> peripheral after the stream starts. I will continue searching for the
>> reason of this tomorrow, but maybe you can give me some hint by
>> explaining your setup?
>>
>> Note that I'm using your patches together with Matt's from this series:
>>
>>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
>>
>> ... but it doesn't work without those either.
> 
> 
> When I started working on adding DT support to McASP driver, Matt Porter 
> EDMA port was not yet ready. 
> 
> So 
> 1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
>    device init). 
> 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 
> 
> 3. Added DT support to McASP driver.
> 
> I tested this on AM335x EVM board. 

Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
kernels.

> If you need the code, I can share it as a patch (I will send the patch as a 
> private mail since the patch is huge).

Please do :) Or just push your entire tree somewhere.


Thanks,
Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-10-03 11:16         ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-03 11:16 UTC (permalink / raw)
  To: linux-arm-kernel

On 03.10.2012 09:16, Hebbar, Gururaja wrote:
> On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
>> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
>>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
>>> register offset and missing generic SRAM APIs support
>>>
>>> Changes
>>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
>>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
>>> - The register offsets are handled depending on the version.
>>> - Provide a config option to indicate missing SRAM API support.
>>
>> Could you give some insight which hardware this was tested on? I'm
>> trying to get this up and running on a AM33xx board, and the patches
>> look all reasonable to me. My problem is that I can't make the DMA
>> engine move forward, I fail to receive a single interrupt on this
>> peripheral after the stream starts. I will continue searching for the
>> reason of this tomorrow, but maybe you can give me some hint by
>> explaining your setup?
>>
>> Note that I'm using your patches together with Matt's from this series:
>>
>>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
>>
>> ... but it doesn't work without those either.
> 
> 
> When I started working on adding DT support to McASP driver, Matt Porter 
> EDMA port was not yet ready. 
> 
> So 
> 1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
>    device init). 
> 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 
> 
> 3. Added DT support to McASP driver.
> 
> I tested this on AM335x EVM board. 

Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
kernels.

> If you need the code, I can share it as a patch (I will send the patch as a 
> private mail since the patch is huge).

Please do :) Or just push your entire tree somewhere.


Thanks,
Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* RE: [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-10-03 11:16         ` [alsa-devel] " Daniel Mack
@ 2012-10-03 12:57             ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-10-03 12:57 UTC (permalink / raw)
  To: Daniel Mack
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	Girdwood,  Liam,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
> > On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
> >> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> >>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> >>> register offset and missing generic SRAM APIs support
> >>>
> >>> Changes
> >>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
> >>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
> >>> - The register offsets are handled depending on the version.
> >>> - Provide a config option to indicate missing SRAM API support.
> >>
> >> Could you give some insight which hardware this was tested on? I'm
> >> trying to get this up and running on a AM33xx board, and the patches
> >> look all reasonable to me. My problem is that I can't make the DMA
> >> engine move forward, I fail to receive a single interrupt on this
> >> peripheral after the stream starts. I will continue searching for the
> >> reason of this tomorrow, but maybe you can give me some hint by
> >> explaining your setup?
> >>
> >> Note that I'm using your patches together with Matt's from this series:
> >>
> >>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
> >>
> >> ... but it doesn't work without those either.
> > 
> > 
> > When I started working on adding DT support to McASP driver, Matt Porter 
> > EDMA port was not yet ready. 
> > 
> > So 
> > 1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
> >    device init). 
> > 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 
> > 
> > 3. Added DT support to McASP driver.
> > 
> > I tested this on AM335x EVM board. 
> 
> Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
> kernels.
> 
> > If you need the code, I can share it as a patch (I will send the patch as a 
> > private mail since the patch is huge).
> 
> Please do :) Or just push your entire tree somewhere.

I have pushed the code at below git repo
Repo :https://github.com/hvaibhav/am335x-linux
Branch : am335x-upstream-staging-audio

This includes 
1. (linux-next + AM335x patches)
2. McASP DT conversion
3. EDMA hack
4. AM335x audio specific DT blobs
5. Am335x dma DT blobs [hack]

Kindly let me know if you need any more details.

> 
> 
> Thanks,
> Daniel
> 
> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-10-03 12:57             ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-10-03 12:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
> > On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
> >> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> >>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> >>> register offset and missing generic SRAM APIs support
> >>>
> >>> Changes
> >>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
> >>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
> >>> - The register offsets are handled depending on the version.
> >>> - Provide a config option to indicate missing SRAM API support.
> >>
> >> Could you give some insight which hardware this was tested on? I'm
> >> trying to get this up and running on a AM33xx board, and the patches
> >> look all reasonable to me. My problem is that I can't make the DMA
> >> engine move forward, I fail to receive a single interrupt on this
> >> peripheral after the stream starts. I will continue searching for the
> >> reason of this tomorrow, but maybe you can give me some hint by
> >> explaining your setup?
> >>
> >> Note that I'm using your patches together with Matt's from this series:
> >>
> >>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
> >>
> >> ... but it doesn't work without those either.
> > 
> > 
> > When I started working on adding DT support to McASP driver, Matt Porter 
> > EDMA port was not yet ready. 
> > 
> > So 
> > 1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
> >    device init). 
> > 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 
> > 
> > 3. Added DT support to McASP driver.
> > 
> > I tested this on AM335x EVM board. 
> 
> Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
> kernels.
> 
> > If you need the code, I can share it as a patch (I will send the patch as a 
> > private mail since the patch is huge).
> 
> Please do :) Or just push your entire tree somewhere.

I have pushed the code at below git repo
Repo :https://github.com/hvaibhav/am335x-linux
Branch : am335x-upstream-staging-audio

This includes 
1. (linux-next + AM335x patches)
2. McASP DT conversion
3. EDMA hack
4. AM335x audio specific DT blobs
5. Am335x dma DT blobs [hack]

Kindly let me know if you need any more details.

> 
> 
> Thanks,
> Daniel
> 
> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-10-03 12:57             ` Hebbar, Gururaja
@ 2012-10-03 14:07               ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-03 14:07 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, broonie, Nori, Sekhar,
	davinci-linux-open-source, Hiremath, Vaibhav, Girdwood, Liam,
	linux-arm-kernel

On 03.10.2012 14:57, Hebbar, Gururaja wrote:
> On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
>> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
>>> On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
>>>> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
>>>>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
>>>>> register offset and missing generic SRAM APIs support
>>>>>
>>>>> Changes
>>>>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
>>>>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
>>>>> - The register offsets are handled depending on the version.
>>>>> - Provide a config option to indicate missing SRAM API support.
>>>>
>>>> Could you give some insight which hardware this was tested on? I'm
>>>> trying to get this up and running on a AM33xx board, and the patches
>>>> look all reasonable to me. My problem is that I can't make the DMA
>>>> engine move forward, I fail to receive a single interrupt on this
>>>> peripheral after the stream starts. I will continue searching for the
>>>> reason of this tomorrow, but maybe you can give me some hint by
>>>> explaining your setup?
>>>>
>>>> Note that I'm using your patches together with Matt's from this series:
>>>>
>>>>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
>>>>
>>>> ... but it doesn't work without those either.
>>>
>>>
>>> When I started working on adding DT support to McASP driver, Matt Porter 
>>> EDMA port was not yet ready. 
>>>
>>> So 
>>> 1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
>>>    device init). 
>>> 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 
>>>
>>> 3. Added DT support to McASP driver.
>>>
>>> I tested this on AM335x EVM board. 
>>
>> Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
>> kernels.
>>
>>> If you need the code, I can share it as a patch (I will send the patch as a 
>>> private mail since the patch is huge).
>>
>> Please do :) Or just push your entire tree somewhere.
> 
> I have pushed the code at below git repo
> Repo :https://github.com/hvaibhav/am335x-linux
> Branch : am335x-upstream-staging-audio
> 
> This includes 
> 1. (linux-next + AM335x patches)
> 2. McASP DT conversion
> 3. EDMA hack
> 4. AM335x audio specific DT blobs
> 5. Am335x dma DT blobs [hack]

Ha, that 5th point was what I was missing, in particular these DMA
offset matching bits. Thanks a lot! I'll get back to you soon with some
patches for the mcasp driver.


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-10-03 14:07               ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-03 14:07 UTC (permalink / raw)
  To: linux-arm-kernel

On 03.10.2012 14:57, Hebbar, Gururaja wrote:
> On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
>> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
>>> On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
>>>> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
>>>>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
>>>>> register offset and missing generic SRAM APIs support
>>>>>
>>>>> Changes
>>>>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
>>>>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
>>>>> - The register offsets are handled depending on the version.
>>>>> - Provide a config option to indicate missing SRAM API support.
>>>>
>>>> Could you give some insight which hardware this was tested on? I'm
>>>> trying to get this up and running on a AM33xx board, and the patches
>>>> look all reasonable to me. My problem is that I can't make the DMA
>>>> engine move forward, I fail to receive a single interrupt on this
>>>> peripheral after the stream starts. I will continue searching for the
>>>> reason of this tomorrow, but maybe you can give me some hint by
>>>> explaining your setup?
>>>>
>>>> Note that I'm using your patches together with Matt's from this series:
>>>>
>>>>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
>>>>
>>>> ... but it doesn't work without those either.
>>>
>>>
>>> When I started working on adding DT support to McASP driver, Matt Porter 
>>> EDMA port was not yet ready. 
>>>
>>> So 
>>> 1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
>>>    device init). 
>>> 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 
>>>
>>> 3. Added DT support to McASP driver.
>>>
>>> I tested this on AM335x EVM board. 
>>
>> Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
>> kernels.
>>
>>> If you need the code, I can share it as a patch (I will send the patch as a 
>>> private mail since the patch is huge).
>>
>> Please do :) Or just push your entire tree somewhere.
> 
> I have pushed the code at below git repo
> Repo :https://github.com/hvaibhav/am335x-linux
> Branch : am335x-upstream-staging-audio
> 
> This includes 
> 1. (linux-next + AM335x patches)
> 2. McASP DT conversion
> 3. EDMA hack
> 4. AM335x audio specific DT blobs
> 5. Am335x dma DT blobs [hack]

Ha, that 5th point was what I was missing, in particular these DMA
offset matching bits. Thanks a lot! I'll get back to you soon with some
patches for the mcasp driver.


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-02 16:50                     ` [alsa-devel] " Daniel Mack
@ 2012-10-04  9:21                       ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-04  9:21 UTC (permalink / raw)
  To: Matt Porter
  Cc: alsa-devel, tony, Mark Brown, Sekhar Nori,
	davinci-linux-open-source, Peter Ujfalusi, lrg, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 4517 bytes --]

On 02.10.2012 18:50, Daniel Mack wrote:
> On 02.10.2012 18:41, Matt Porter wrote:
>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>>
>>>>>>> I also agree that ifdef is not a good solution.
>>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>>> be decided based on the compatible property for the device.
>>>>>>
>>>>>> That's not really the problem here - the problem is that the APIs used
>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>>
>>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>>> might give that a try in near future.
>>>>>
>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>>
>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>>> (conversion should be straightforward and I can help test it) and the
>>>> code that uses SRAM can probably keep using the private EDMA API till
>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>>> posted patches to move private EDMA APIs to a common location. That
>>>> should keep AM335x build from breaking. Is this something that is feasible?
>>>
>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>>> right, we can also do that first.
>>>
>>> I'm looking at that right now and the problem seems that we don't have a
>>> sane way to dynamically look up gen_pools independently of the actual
>>> run-time platform. All users of gen_pools seem to know which platform
>>> they run on and access a platform-specific pool. So I don't currently
>>> see how we could implement multi-platform code, gen_pools are fine but
>>> don't solve the problem here.
>>>
>>> Would it be an idea to add a char* member to gen_pools and a function
>>> that can be used to dynamically look it up again? If a buffer with a
>>> certain name exists, we can use it and install that ping-pong buffer,
>>> otherwise we just don't. While that would be easy to do, it's a
>>> tree-wide change.
>>>
>>> Is there a better way that I miss?
>>
>> At the high level there's two platform models we have to handle, the
>> boot from board file !DT case, and then the boot from DT case. Since
>> Davinci is just starting DT conversion, we mostly care about the !DT
>> base in which the struct gen_pool * is passed in pdata to the ASoC
>> driver. It is then selectable on a per-platform basis where the decision
>> should be made.
>>
>> Given a separate discussion with Sekhar, we're only going to have one
>> SRAM pool on any DaVinci part right now...this was only a question on
>> L138 anyway. But regardless, the created gen_pool will be passed via
>> pdata.
> 
> I thought about this too, as mmp does it that way.
> 
>> Since DT conversion is starting and we need to consider that now,
>> the idea there is to use the DT-based generic sram driver [1] such that
>> when we do boot from DT on Davinci, the genpool is provided via phandle
>> and the pointer extracted with the OF helpers that are part of the
>> series.
> 
> A phandle is the cleanest way I think, yes.
> 
>> That's pretty much it. I'm reworking the backend support as discussed
>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
>> that just replaces sram_* with genalloc for davinci ASoC.
> 
> As you can also test it, it would be easiest if you came up with a patch
> for that, yes. I can have a look at the dma bits laters, once my OMAP
> board finally works with the code as it currently stands. I'm still
> fighting with the mcasp driver right now ...

I quickly prepared two patches to change that, so that topic is out of
the way. But I did only compile-test them on OMAP - could you check on
your Davinci platform? Note that these apply on top of the patch in
discussion here (which isn't applied to the asoc tree yet).


Daniel


[-- Attachment #2: 0001-ARM-davinci-pass-SRAM-gen_pool-to-mcasp-platform-dat.patch --]
[-- Type: text/x-patch, Size: 8048 bytes --]

>From 7b55ed59364e7798586fc4d3692919741c164b3f Mon Sep 17 00:00:00 2001
From: Daniel Mack <zonque@gmail.com>
Date: Thu, 4 Oct 2012 11:11:07 +0200
Subject: [PATCH 1/2] ARM: davinci: pass SRAM gen_pool to mcasp platform data

This is needed to decouple the Davinci specific parts from the McASP
driver.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 arch/arm/mach-davinci/board-da830-evm.c   |  2 ++
 arch/arm/mach-davinci/board-da850-evm.c   |  2 ++
 arch/arm/mach-davinci/board-dm355-evm.c   |  5 ++++-
 arch/arm/mach-davinci/board-dm365-evm.c   |  2 ++
 arch/arm/mach-davinci/board-dm644x-evm.c  |  5 ++++-
 arch/arm/mach-davinci/board-dm646x-evm.c  |  3 +++
 arch/arm/mach-davinci/board-neuros-osd2.c |  5 ++++-
 arch/arm/mach-davinci/include/mach/sram.h |  1 +
 arch/arm/mach-davinci/sram.c              | 17 +++++++++--------
 include/linux/platform_data/davinci_asp.h |  1 +
 10 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 0031864..47973b2 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -33,6 +33,7 @@
 #include <mach/usb.h>
 #include <mach/aemif.h>
 #include <mach/spi.h>
+#include <mach/sram.h>
 
 #define DA830_EVM_PHY_ID		""
 /*
@@ -214,6 +215,7 @@ static struct snd_platform_data da830_evm_snd_data = {
 	.version	= MCASP_VERSION_2,
 	.txnumevt	= 1,
 	.rxnumevt	= 1,
+	.sram_pool	= davinci_sram_pool,
 };
 
 /*
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 0149fb4..b74db6c 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -44,6 +44,7 @@
 #include <mach/mux.h>
 #include <mach/aemif.h>
 #include <mach/spi.h>
+#include <mach/sram.h>
 
 #define DA850_EVM_PHY_ID		"davinci_mdio-0:00"
 #define DA850_LCD_PWR_PIN		GPIO_TO_PIN(2, 8)
@@ -758,6 +759,7 @@ static struct snd_platform_data da850_evm_snd_data = {
 	.version	= MCASP_VERSION_2,
 	.txnumevt	= 1,
 	.rxnumevt	= 1,
+	.sram_pool	= davinci_sram_pool,
 };
 
 static const short da850_evm_mcasp_pins[] __initconst = {
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 1c7b1f4..9b0c6df 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -31,6 +31,7 @@
 #include <mach/nand.h>
 #include <mach/mmc.h>
 #include <mach/usb.h>
+#include <mach/sram.h>
 
 #include "davinci.h"
 
@@ -113,7 +114,9 @@ static struct davinci_i2c_platform_data i2c_pdata = {
 	.scl_pin        = 14,
 };
 
-static struct snd_platform_data dm355_evm_snd_data;
+static struct snd_platform_data dm355_evm_snd_data = {
+	.sram_pool = davinci_sram_pool,
+};
 
 static int dm355evm_mmc_gpios = -EINVAL;
 
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index 688a9c5..9eaec56 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -38,6 +38,7 @@
 #include <mach/mmc.h>
 #include <mach/nand.h>
 #include <mach/keyscan.h>
+#include <mach/sram.h>
 
 #include <media/tvp514x.h>
 
@@ -176,6 +177,7 @@ static struct at24_platform_data eeprom_info = {
 
 static struct snd_platform_data dm365_evm_snd_data = {
 	.asp_chan_q = EVENTQ_3,
+	.sram_pool = davinci_sram_pool,
 };
 
 static struct i2c_board_info i2c_info[] = {
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index d34ed55..448341f 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -38,6 +38,7 @@
 #include <mach/mmc.h>
 #include <mach/usb.h>
 #include <mach/aemif.h>
+#include <mach/sram.h>
 
 #include "davinci.h"
 
@@ -262,7 +263,9 @@ static struct platform_device rtc_dev = {
 	.id             = -1,
 };
 
-static struct snd_platform_data dm644x_evm_snd_data;
+static struct snd_platform_data dm644x_evm_snd_data = {
+	.sram_pool = davinci_sram_pool,
+};
 
 /*----------------------------------------------------------------------*/
 
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 958679a..1ee6d1f 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -43,6 +43,7 @@
 #include <mach/clock.h>
 #include <mach/cdce949.h>
 #include <mach/aemif.h>
+#include <mach/sram.h>
 
 #include "davinci.h"
 #include "clock.h"
@@ -336,6 +337,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = {
 		.tdm_slots      = 2,
 		.serial_dir     = dm646x_iis_serializer_direction,
 		.asp_chan_q     = EVENTQ_0,
+		.sram_pool	= davinci_sram_pool,
 	},
 	{
 		.tx_dma_offset  = 0x400,
@@ -345,6 +347,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = {
 		.tdm_slots      = 32,
 		.serial_dir     = dm646x_dit_serializer_direction,
 		.asp_chan_q     = EVENTQ_0,
+		.sram_pool	= davinci_sram_pool,
 	},
 };
 
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index f6b9fc7..74b31b9 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -37,6 +37,7 @@
 #include <mach/nand.h>
 #include <mach/mmc.h>
 #include <mach/usb.h>
+#include <mach/sram.h>
 
 #include "davinci.h"
 
@@ -125,7 +126,9 @@ static struct platform_device davinci_fb_device = {
 	.num_resources = 0,
 };
 
-static struct snd_platform_data dm644x_ntosd2_snd_data;
+static struct snd_platform_data dm644x_ntosd2_snd_data = {
+	.sram_pool	= davinci_sram_pool,
+};
 
 static struct gpio_led ntosd2_leds[] = {
 	{ .name = "led1_green", .gpio = GPIO(10), },
diff --git a/arch/arm/mach-davinci/include/mach/sram.h b/arch/arm/mach-davinci/include/mach/sram.h
index 111f7cc..0394121 100644
--- a/arch/arm/mach-davinci/include/mach/sram.h
+++ b/arch/arm/mach-davinci/include/mach/sram.h
@@ -23,5 +23,6 @@
  */
 extern void *sram_alloc(size_t len, dma_addr_t *dma);
 extern void sram_free(void *addr, size_t len);
+extern struct gen_pool *davinci_sram_pool;
 
 #endif /* __MACH_SRAM_H */
diff --git a/arch/arm/mach-davinci/sram.c b/arch/arm/mach-davinci/sram.c
index db0f778..a938361 100644
--- a/arch/arm/mach-davinci/sram.c
+++ b/arch/arm/mach-davinci/sram.c
@@ -15,7 +15,8 @@
 #include <mach/common.h>
 #include <mach/sram.h>
 
-static struct gen_pool *sram_pool;
+struct gen_pool *davinci_sram_pool;
+EXPORT_SYMBOL_GPL(davinci_sram_pool);
 
 void *sram_alloc(size_t len, dma_addr_t *dma)
 {
@@ -24,10 +25,10 @@ void *sram_alloc(size_t len, dma_addr_t *dma)
 
 	if (dma)
 		*dma = 0;
-	if (!sram_pool || (dma && !dma_base))
+	if (!davinci_sram_pool || (dma && !dma_base))
 		return NULL;
 
-	vaddr = gen_pool_alloc(sram_pool, len);
+	vaddr = gen_pool_alloc(davinci_sram_pool, len);
 	if (!vaddr)
 		return NULL;
 
@@ -40,7 +41,7 @@ EXPORT_SYMBOL(sram_alloc);
 
 void sram_free(void *addr, size_t len)
 {
-	gen_pool_free(sram_pool, (unsigned long) addr, len);
+	gen_pool_free(davinci_sram_pool, (unsigned long) addr, len);
 }
 EXPORT_SYMBOL(sram_free);
 
@@ -58,12 +59,12 @@ static int __init sram_init(void)
 
 	if (len) {
 		len = min_t(unsigned, len, SRAM_SIZE);
-		sram_pool = gen_pool_create(ilog2(SRAM_GRANULARITY), -1);
-		if (!sram_pool)
+		davinci_sram_pool = gen_pool_create(ilog2(SRAM_GRANULARITY), -1);
+		if (!davinci_sram_pool)
 			status = -ENOMEM;
 	}
-	if (sram_pool)
-		status = gen_pool_add(sram_pool, SRAM_VIRT, len, -1);
+	if (davinci_sram_pool)
+		status = gen_pool_add(davinci_sram_pool, SRAM_VIRT, len, -1);
 	WARN_ON(status < 0);
 	return status;
 }
diff --git a/include/linux/platform_data/davinci_asp.h b/include/linux/platform_data/davinci_asp.h
index 8c618e1..0cd22f7 100644
--- a/include/linux/platform_data/davinci_asp.h
+++ b/include/linux/platform_data/davinci_asp.h
@@ -73,6 +73,7 @@ struct snd_platform_data {
 	 * when compared to previous behavior.
 	 */
 	unsigned enable_channel_combine:1;
+	struct gen_pool *sram_pool;
 	unsigned sram_size_playback;
 	unsigned sram_size_capture;
 
-- 
1.7.11.4


[-- Attachment #3: 0002-ALSA-ASoC-McASP-use-gen_pool-from-platform-data.patch --]
[-- Type: text/x-patch, Size: 4201 bytes --]

>From 465846f6fd1ea39534f32b984d352b5bc6928889 Mon Sep 17 00:00:00 2001
From: Daniel Mack <zonque@gmail.com>
Date: Thu, 4 Oct 2012 11:12:28 +0200
Subject: [PATCH 2/2] ALSA: ASoC: McASP: use gen_pool from platform data

This makes the gen_pool SRAM usage a runtime decision.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 sound/soc/davinci/davinci-pcm.c | 59 +++++++++++++++++++++++++++++------------
 1 file changed, 42 insertions(+), 17 deletions(-)

diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index 7ac5a19..f47b8f3 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 #include <linux/dma-mapping.h>
 #include <linux/kernel.h>
+#include <linux/genalloc.h>
 
 #include <sound/core.h>
 #include <sound/pcm.h>
@@ -261,26 +262,27 @@ static void davinci_pcm_dma_irq(unsigned link, u16 ch_status, void *data)
 	}
 }
 
-#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
+#ifdef CONFIG_GENERIC_ALLOCATOR
 static int allocate_sram(struct snd_pcm_substream *substream, unsigned size,
-		struct snd_pcm_hardware *ppcm)
+			 struct snd_pcm_hardware *ppcm, struct gen_pool *pool)
 {
 	struct snd_dma_buffer *buf = &substream->dma_buffer;
 	struct snd_dma_buffer *iram_dma = NULL;
+	unsigned long iram_virt = 0;
 	dma_addr_t iram_phys = 0;
-	void *iram_virt = NULL;
 
 	if (buf->private_data || !size)
 		return 0;
 
 	ppcm->period_bytes_max = size;
-	iram_virt = sram_alloc(size, &iram_phys);
+	iram_virt = gen_pool_alloc(pool, size);
 	if (!iram_virt)
 		goto exit1;
+	iram_phys = gen_pool_virt_to_phys(pool, iram_virt);
 	iram_dma = kzalloc(sizeof(*iram_dma), GFP_KERNEL);
 	if (!iram_dma)
 		goto exit2;
-	iram_dma->area = iram_virt;
+	iram_dma->area = (void *) iram_virt;
 	iram_dma->addr = iram_phys;
 	memset(iram_dma->area, 0, size);
 	iram_dma->bytes = size;
@@ -288,12 +290,40 @@ static int allocate_sram(struct snd_pcm_substream *substream, unsigned size,
 	return 0;
 exit2:
 	if (iram_virt)
-		sram_free(iram_virt, size);
+		gen_pool_free(pool, iram_virt, size);
 exit1:
 	return -ENOMEM;
 }
+
+static void free_sram(struct snd_pcm_substream *substream)
+{
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+	struct snd_dma_buffer *buf = &substream->dma_buffer;
+	struct snd_dma_buffer *iram_dma = buf->private_data;
+	struct davinci_pcm_dma_params *params, *pa;
+
+	if (!buf || !rtd || !iram_dma)
+		return;
+
+	pa = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+	params = &pa[substream->stream];
+
+	gen_pool_free(params->sram_pool, (unsigned long) iram_dma->area,
+		      iram_dma->bytes);
+}
+#else
+static int allocate_sram(struct snd_pcm_substream *substream, unsigned size,
+			 struct snd_pcm_hardware *ppcm, struct gen_pool *pool)
+{
+	return 0;
+}
+
+static void free_sram(struct snd_pcm_substream *substream)
+{
+}
 #endif
 
+
 /*
  * Only used with ping/pong.
  * This is called after runtime->dma_addr, period_bytes and data_type are valid
@@ -680,9 +710,11 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
 
 	ppcm = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
 			&pcm_hardware_playback : &pcm_hardware_capture;
-#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
-	allocate_sram(substream, params->sram_size, ppcm);
-#endif
+
+	if (params->sram_pool)
+		allocate_sram(substream, params->sram_size, ppcm,
+			      params->sram_pool);
+
 	snd_soc_set_runtime_hwparams(substream, ppcm);
 	/* ensure that buffer size is a multiple of period size */
 	ret = snd_pcm_hw_constraint_integer(runtime,
@@ -811,7 +843,6 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
 	int stream;
 
 	for (stream = 0; stream < 2; stream++) {
-		struct snd_dma_buffer *iram_dma;
 		substream = pcm->streams[stream].substream;
 		if (!substream)
 			continue;
@@ -823,13 +854,7 @@ static void davinci_pcm_free(struct snd_pcm *pcm)
 		dma_free_writecombine(pcm->card->dev, buf->bytes,
 				      buf->area, buf->addr);
 		buf->area = NULL;
-#if defined(CONFIG_SND_DAVINCI_HAVE_SRAM)
-		iram_dma = buf->private_data;
-		if (iram_dma) {
-			sram_free(iram_dma->area, iram_dma->bytes);
-			kfree(iram_dma);
-		}
-#endif
+		free_sram(substream);
 	}
 }
 
-- 
1.7.11.4


[-- Attachment #4: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-04  9:21                       ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-04  9:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 02.10.2012 18:50, Daniel Mack wrote:
> On 02.10.2012 18:41, Matt Porter wrote:
>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>>
>>>>>>> I also agree that ifdef is not a good solution.
>>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>>> be decided based on the compatible property for the device.
>>>>>>
>>>>>> That's not really the problem here - the problem is that the APIs used
>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>>
>>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>>> might give that a try in near future.
>>>>>
>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>>
>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>>> (conversion should be straightforward and I can help test it) and the
>>>> code that uses SRAM can probably keep using the private EDMA API till
>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>>> posted patches to move private EDMA APIs to a common location. That
>>>> should keep AM335x build from breaking. Is this something that is feasible?
>>>
>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>>> right, we can also do that first.
>>>
>>> I'm looking at that right now and the problem seems that we don't have a
>>> sane way to dynamically look up gen_pools independently of the actual
>>> run-time platform. All users of gen_pools seem to know which platform
>>> they run on and access a platform-specific pool. So I don't currently
>>> see how we could implement multi-platform code, gen_pools are fine but
>>> don't solve the problem here.
>>>
>>> Would it be an idea to add a char* member to gen_pools and a function
>>> that can be used to dynamically look it up again? If a buffer with a
>>> certain name exists, we can use it and install that ping-pong buffer,
>>> otherwise we just don't. While that would be easy to do, it's a
>>> tree-wide change.
>>>
>>> Is there a better way that I miss?
>>
>> At the high level there's two platform models we have to handle, the
>> boot from board file !DT case, and then the boot from DT case. Since
>> Davinci is just starting DT conversion, we mostly care about the !DT
>> base in which the struct gen_pool * is passed in pdata to the ASoC
>> driver. It is then selectable on a per-platform basis where the decision
>> should be made.
>>
>> Given a separate discussion with Sekhar, we're only going to have one
>> SRAM pool on any DaVinci part right now...this was only a question on
>> L138 anyway. But regardless, the created gen_pool will be passed via
>> pdata.
> 
> I thought about this too, as mmp does it that way.
> 
>> Since DT conversion is starting and we need to consider that now,
>> the idea there is to use the DT-based generic sram driver [1] such that
>> when we do boot from DT on Davinci, the genpool is provided via phandle
>> and the pointer extracted with the OF helpers that are part of the
>> series.
> 
> A phandle is the cleanest way I think, yes.
> 
>> That's pretty much it. I'm reworking the backend support as discussed
>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
>> that just replaces sram_* with genalloc for davinci ASoC.
> 
> As you can also test it, it would be easiest if you came up with a patch
> for that, yes. I can have a look at the dma bits laters, once my OMAP
> board finally works with the code as it currently stands. I'm still
> fighting with the mcasp driver right now ...

I quickly prepared two patches to change that, so that topic is out of
the way. But I did only compile-test them on OMAP - could you check on
your Davinci platform? Note that these apply on top of the patch in
discussion here (which isn't applied to the asoc tree yet).


Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ARM-davinci-pass-SRAM-gen_pool-to-mcasp-platform-dat.patch
Type: text/x-patch
Size: 8048 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121004/c5c4e92c/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ALSA-ASoC-McASP-use-gen_pool-from-platform-data.patch
Type: text/x-patch
Size: 4201 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121004/c5c4e92c/attachment-0003.bin>

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-04  9:21                       ` [alsa-devel] " Daniel Mack
@ 2012-10-04  9:38                           ` Porter, Matt
  -1 siblings, 0 replies; 80+ messages in thread
From: Porter, Matt @ 2012-10-04  9:38 UTC (permalink / raw)
  To: Daniel Mack
  Cc: <alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
	 <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Mark Brown,
	 <davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
	Ujfalusi,  Peter, Girdwood, Liam,
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>


On Oct 4, 2012, at 5:21 AM, Daniel Mack wrote:

> 
> 
> On 02.10.2012 18:50, Daniel Mack wrote:
>> On 02.10.2012 18:41, Matt Porter wrote:
>>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>>>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>>> 
>>>>>>>> I also agree that ifdef is not a good solution.
>>>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>>>> be decided based on the compatible property for the device.
>>>>>>> 
>>>>>>> That's not really the problem here - the problem is that the APIs used
>>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>>> 
>>>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>>>> might give that a try in near future.
>>>>>> 
>>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>>> 
>>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>>>> (conversion should be straightforward and I can help test it) and the
>>>>> code that uses SRAM can probably keep using the private EDMA API till
>>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>>>> posted patches to move private EDMA APIs to a common location. That
>>>>> should keep AM335x build from breaking. Is this something that is feasible?
>>>> 
>>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>>>> right, we can also do that first.
>>>> 
>>>> I'm looking at that right now and the problem seems that we don't have a
>>>> sane way to dynamically look up gen_pools independently of the actual
>>>> run-time platform. All users of gen_pools seem to know which platform
>>>> they run on and access a platform-specific pool. So I don't currently
>>>> see how we could implement multi-platform code, gen_pools are fine but
>>>> don't solve the problem here.
>>>> 
>>>> Would it be an idea to add a char* member to gen_pools and a function
>>>> that can be used to dynamically look it up again? If a buffer with a
>>>> certain name exists, we can use it and install that ping-pong buffer,
>>>> otherwise we just don't. While that would be easy to do, it's a
>>>> tree-wide change.
>>>> 
>>>> Is there a better way that I miss?
>>> 
>>> At the high level there's two platform models we have to handle, the
>>> boot from board file !DT case, and then the boot from DT case. Since
>>> Davinci is just starting DT conversion, we mostly care about the !DT
>>> base in which the struct gen_pool * is passed in pdata to the ASoC
>>> driver. It is then selectable on a per-platform basis where the decision
>>> should be made.
>>> 
>>> Given a separate discussion with Sekhar, we're only going to have one
>>> SRAM pool on any DaVinci part right now...this was only a question on
>>> L138 anyway. But regardless, the created gen_pool will be passed via
>>> pdata.
>> 
>> I thought about this too, as mmp does it that way.
>> 
>>> Since DT conversion is starting and we need to consider that now,
>>> the idea there is to use the DT-based generic sram driver [1] such that
>>> when we do boot from DT on Davinci, the genpool is provided via phandle
>>> and the pointer extracted with the OF helpers that are part of the
>>> series.
>> 
>> A phandle is the cleanest way I think, yes.
>> 
>>> That's pretty much it. I'm reworking the backend support as discussed
>>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
>>> that just replaces sram_* with genalloc for davinci ASoC.
>> 
>> As you can also test it, it would be easiest if you came up with a patch
>> for that, yes. I can have a look at the dma bits laters, once my OMAP
>> board finally works with the code as it currently stands. I'm still
>> fighting with the mcasp driver right now ...
> 
> I quickly prepared two patches to change that, so that topic is out of
> the way. But I did only compile-test them on OMAP - could you check on
> your Davinci platform? Note that these apply on top of the patch in
> discussion here (which isn't applied to the asoc tree yet).

I put a series together yesterday, just ran out of time to post
last night after testing. I'm posting that now...it's on top of my
uio_pruss/genalloc series and only addresss switching davinci-pcm to
genalloc (and actually enabling ping-pon from sram).

I'll take a look a your OMAP patches.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-04  9:38                           ` Porter, Matt
  0 siblings, 0 replies; 80+ messages in thread
From: Porter, Matt @ 2012-10-04  9:38 UTC (permalink / raw)
  To: linux-arm-kernel


On Oct 4, 2012, at 5:21 AM, Daniel Mack wrote:

> 
> 
> On 02.10.2012 18:50, Daniel Mack wrote:
>> On 02.10.2012 18:41, Matt Porter wrote:
>>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>>>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>>> 
>>>>>>>> I also agree that ifdef is not a good solution.
>>>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>>>> be decided based on the compatible property for the device.
>>>>>>> 
>>>>>>> That's not really the problem here - the problem is that the APIs used
>>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>>> 
>>>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>>>> might give that a try in near future.
>>>>>> 
>>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>>> 
>>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>>>> (conversion should be straightforward and I can help test it) and the
>>>>> code that uses SRAM can probably keep using the private EDMA API till
>>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>>>> posted patches to move private EDMA APIs to a common location. That
>>>>> should keep AM335x build from breaking. Is this something that is feasible?
>>>> 
>>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>>>> right, we can also do that first.
>>>> 
>>>> I'm looking at that right now and the problem seems that we don't have a
>>>> sane way to dynamically look up gen_pools independently of the actual
>>>> run-time platform. All users of gen_pools seem to know which platform
>>>> they run on and access a platform-specific pool. So I don't currently
>>>> see how we could implement multi-platform code, gen_pools are fine but
>>>> don't solve the problem here.
>>>> 
>>>> Would it be an idea to add a char* member to gen_pools and a function
>>>> that can be used to dynamically look it up again? If a buffer with a
>>>> certain name exists, we can use it and install that ping-pong buffer,
>>>> otherwise we just don't. While that would be easy to do, it's a
>>>> tree-wide change.
>>>> 
>>>> Is there a better way that I miss?
>>> 
>>> At the high level there's two platform models we have to handle, the
>>> boot from board file !DT case, and then the boot from DT case. Since
>>> Davinci is just starting DT conversion, we mostly care about the !DT
>>> base in which the struct gen_pool * is passed in pdata to the ASoC
>>> driver. It is then selectable on a per-platform basis where the decision
>>> should be made.
>>> 
>>> Given a separate discussion with Sekhar, we're only going to have one
>>> SRAM pool on any DaVinci part right now...this was only a question on
>>> L138 anyway. But regardless, the created gen_pool will be passed via
>>> pdata.
>> 
>> I thought about this too, as mmp does it that way.
>> 
>>> Since DT conversion is starting and we need to consider that now,
>>> the idea there is to use the DT-based generic sram driver [1] such that
>>> when we do boot from DT on Davinci, the genpool is provided via phandle
>>> and the pointer extracted with the OF helpers that are part of the
>>> series.
>> 
>> A phandle is the cleanest way I think, yes.
>> 
>>> That's pretty much it. I'm reworking the backend support as discussed
>>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
>>> that just replaces sram_* with genalloc for davinci ASoC.
>> 
>> As you can also test it, it would be easiest if you came up with a patch
>> for that, yes. I can have a look at the dma bits laters, once my OMAP
>> board finally works with the code as it currently stands. I'm still
>> fighting with the mcasp driver right now ...
> 
> I quickly prepared two patches to change that, so that topic is out of
> the way. But I did only compile-test them on OMAP - could you check on
> your Davinci platform? Note that these apply on top of the patch in
> discussion here (which isn't applied to the asoc tree yet).

I put a series together yesterday, just ran out of time to post
last night after testing. I'm posting that now...it's on top of my
uio_pruss/genalloc series and only addresss switching davinci-pcm to
genalloc (and actually enabling ping-pon from sram).

I'll take a look a your OMAP patches.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-04  9:38                           ` Porter, Matt
@ 2012-10-04  9:57                             ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-04  9:57 UTC (permalink / raw)
  To: Porter, Matt
  Cc: <alsa-devel@alsa-project.org>, <tony@atomide.com>,
	Mark Brown, Nori, Sekhar,
	<davinci-linux-open-source@linux.davincidsp.com>,
	Ujfalusi, Peter, Girdwood, Liam,
	<linux-arm-kernel@lists.infradead.org>

On 04.10.2012 11:38, Porter, Matt wrote:
> 
> On Oct 4, 2012, at 5:21 AM, Daniel Mack wrote:
> 
>>
>>
>> On 02.10.2012 18:50, Daniel Mack wrote:
>>> On 02.10.2012 18:41, Matt Porter wrote:
>>>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>>>>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>>>>
>>>>>>>>> I also agree that ifdef is not a good solution.
>>>>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>>>>> be decided based on the compatible property for the device.
>>>>>>>>
>>>>>>>> That's not really the problem here - the problem is that the APIs used
>>>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>>>>
>>>>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>>>>> might give that a try in near future.
>>>>>>>
>>>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>>>>
>>>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>>>>> (conversion should be straightforward and I can help test it) and the
>>>>>> code that uses SRAM can probably keep using the private EDMA API till
>>>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>>>>> posted patches to move private EDMA APIs to a common location. That
>>>>>> should keep AM335x build from breaking. Is this something that is feasible?
>>>>>
>>>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>>>>> right, we can also do that first.
>>>>>
>>>>> I'm looking at that right now and the problem seems that we don't have a
>>>>> sane way to dynamically look up gen_pools independently of the actual
>>>>> run-time platform. All users of gen_pools seem to know which platform
>>>>> they run on and access a platform-specific pool. So I don't currently
>>>>> see how we could implement multi-platform code, gen_pools are fine but
>>>>> don't solve the problem here.
>>>>>
>>>>> Would it be an idea to add a char* member to gen_pools and a function
>>>>> that can be used to dynamically look it up again? If a buffer with a
>>>>> certain name exists, we can use it and install that ping-pong buffer,
>>>>> otherwise we just don't. While that would be easy to do, it's a
>>>>> tree-wide change.
>>>>>
>>>>> Is there a better way that I miss?
>>>>
>>>> At the high level there's two platform models we have to handle, the
>>>> boot from board file !DT case, and then the boot from DT case. Since
>>>> Davinci is just starting DT conversion, we mostly care about the !DT
>>>> base in which the struct gen_pool * is passed in pdata to the ASoC
>>>> driver. It is then selectable on a per-platform basis where the decision
>>>> should be made.
>>>>
>>>> Given a separate discussion with Sekhar, we're only going to have one
>>>> SRAM pool on any DaVinci part right now...this was only a question on
>>>> L138 anyway. But regardless, the created gen_pool will be passed via
>>>> pdata.
>>>
>>> I thought about this too, as mmp does it that way.
>>>
>>>> Since DT conversion is starting and we need to consider that now,
>>>> the idea there is to use the DT-based generic sram driver [1] such that
>>>> when we do boot from DT on Davinci, the genpool is provided via phandle
>>>> and the pointer extracted with the OF helpers that are part of the
>>>> series.
>>>
>>> A phandle is the cleanest way I think, yes.
>>>
>>>> That's pretty much it. I'm reworking the backend support as discussed
>>>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
>>>> that just replaces sram_* with genalloc for davinci ASoC.
>>>
>>> As you can also test it, it would be easiest if you came up with a patch
>>> for that, yes. I can have a look at the dma bits laters, once my OMAP
>>> board finally works with the code as it currently stands. I'm still
>>> fighting with the mcasp driver right now ...
>>
>> I quickly prepared two patches to change that, so that topic is out of
>> the way. But I did only compile-test them on OMAP - could you check on
>> your Davinci platform? Note that these apply on top of the patch in
>> discussion here (which isn't applied to the asoc tree yet).
> 
> I put a series together yesterday, just ran out of time to post
> last night after testing. I'm posting that now...it's on top of my
> uio_pruss/genalloc series and only addresss switching davinci-pcm to
> genalloc (and actually enabling ping-pon from sram).

Ok, I don't care which version makes it in after all :)

> I'll take a look a your OMAP patches.

The patches I just sent out are only for Davinci and change the SRAM
functions to genalloc in the mcasp driver. They work just fine on OMAP
of course, as the code is disabled in there.


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-04  9:57                             ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-04  9:57 UTC (permalink / raw)
  To: linux-arm-kernel

On 04.10.2012 11:38, Porter, Matt wrote:
> 
> On Oct 4, 2012, at 5:21 AM, Daniel Mack wrote:
> 
>>
>>
>> On 02.10.2012 18:50, Daniel Mack wrote:
>>> On 02.10.2012 18:41, Matt Porter wrote:
>>>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>>>>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>>>>
>>>>>>>>> I also agree that ifdef is not a good solution.
>>>>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>>>>> be decided based on the compatible property for the device.
>>>>>>>>
>>>>>>>> That's not really the problem here - the problem is that the APIs used
>>>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>>>>
>>>>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>>>>> might give that a try in near future.
>>>>>>>
>>>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>>>>
>>>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>>>>> (conversion should be straightforward and I can help test it) and the
>>>>>> code that uses SRAM can probably keep using the private EDMA API till
>>>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>>>>> posted patches to move private EDMA APIs to a common location. That
>>>>>> should keep AM335x build from breaking. Is this something that is feasible?
>>>>>
>>>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>>>>> right, we can also do that first.
>>>>>
>>>>> I'm looking at that right now and the problem seems that we don't have a
>>>>> sane way to dynamically look up gen_pools independently of the actual
>>>>> run-time platform. All users of gen_pools seem to know which platform
>>>>> they run on and access a platform-specific pool. So I don't currently
>>>>> see how we could implement multi-platform code, gen_pools are fine but
>>>>> don't solve the problem here.
>>>>>
>>>>> Would it be an idea to add a char* member to gen_pools and a function
>>>>> that can be used to dynamically look it up again? If a buffer with a
>>>>> certain name exists, we can use it and install that ping-pong buffer,
>>>>> otherwise we just don't. While that would be easy to do, it's a
>>>>> tree-wide change.
>>>>>
>>>>> Is there a better way that I miss?
>>>>
>>>> At the high level there's two platform models we have to handle, the
>>>> boot from board file !DT case, and then the boot from DT case. Since
>>>> Davinci is just starting DT conversion, we mostly care about the !DT
>>>> base in which the struct gen_pool * is passed in pdata to the ASoC
>>>> driver. It is then selectable on a per-platform basis where the decision
>>>> should be made.
>>>>
>>>> Given a separate discussion with Sekhar, we're only going to have one
>>>> SRAM pool on any DaVinci part right now...this was only a question on
>>>> L138 anyway. But regardless, the created gen_pool will be passed via
>>>> pdata.
>>>
>>> I thought about this too, as mmp does it that way.
>>>
>>>> Since DT conversion is starting and we need to consider that now,
>>>> the idea there is to use the DT-based generic sram driver [1] such that
>>>> when we do boot from DT on Davinci, the genpool is provided via phandle
>>>> and the pointer extracted with the OF helpers that are part of the
>>>> series.
>>>
>>> A phandle is the cleanest way I think, yes.
>>>
>>>> That's pretty much it. I'm reworking the backend support as discussed
>>>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
>>>> that just replaces sram_* with genalloc for davinci ASoC.
>>>
>>> As you can also test it, it would be easiest if you came up with a patch
>>> for that, yes. I can have a look at the dma bits laters, once my OMAP
>>> board finally works with the code as it currently stands. I'm still
>>> fighting with the mcasp driver right now ...
>>
>> I quickly prepared two patches to change that, so that topic is out of
>> the way. But I did only compile-test them on OMAP - could you check on
>> your Davinci platform? Note that these apply on top of the patch in
>> discussion here (which isn't applied to the asoc tree yet).
> 
> I put a series together yesterday, just ran out of time to post
> last night after testing. I'm posting that now...it's on top of my
> uio_pruss/genalloc series and only addresss switching davinci-pcm to
> genalloc (and actually enabling ping-pon from sram).

Ok, I don't care which version makes it in after all :)

> I'll take a look a your OMAP patches.

The patches I just sent out are only for Davinci and change the SRAM
functions to genalloc in the mcasp driver. They work just fine on OMAP
of course, as the code is disabled in there.


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-04  9:57                             ` [alsa-devel] " Daniel Mack
@ 2012-10-04 10:28                                 ` Matt Porter
  -1 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-04 10:28 UTC (permalink / raw)
  To: Daniel Mack
  Cc: <alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
	<tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Mark Brown,
	<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
	Ujfalusi,  Peter, Girdwood, Liam,
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>

On Thu, Oct 04, 2012 at 11:57:30AM +0200, Daniel Mack wrote:
> On 04.10.2012 11:38, Porter, Matt wrote:
> > 
> > On Oct 4, 2012, at 5:21 AM, Daniel Mack wrote:
> > 
> >>
> >>
> >> On 02.10.2012 18:50, Daniel Mack wrote:
> >>> On 02.10.2012 18:41, Matt Porter wrote:
> >>>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
> >>>>> On 02.10.2012 13:06, Sekhar Nori wrote:
> >>>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
> >>>>>>> On 02.10.2012 11:37, Mark Brown wrote:
> >>>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> >>>>>>>>
> >>>>>>>>> I also agree that ifdef is not a good solution.
> >>>>>>>>> It is better to have this information passed as device_data and via DT it can
> >>>>>>>>> be decided based on the compatible property for the device.
> >>>>>>>>
> >>>>>>>> That's not really the problem here - the problem is that the APIs used
> >>>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
> >>>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
> >>>>>>>
> >>>>>>> What about following Matt Porter's idea and ignore the SRAM code
> >>>>>>> entirely and port the entire PCM code to generic dmaengine code first?
> >>>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
> >>>>>>> might give that a try in near future.
> >>>>>>>
> >>>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
> >>>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
> >>>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
> >>>>>>
> >>>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
> >>>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
> >>>>>> (conversion should be straightforward and I can help test it) and the
> >>>>>> code that uses SRAM can probably keep using the private EDMA API till
> >>>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
> >>>>>> posted patches to move private EDMA APIs to a common location. That
> >>>>>> should keep AM335x build from breaking. Is this something that is feasible?
> >>>>>
> >>>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
> >>>>> right, we can also do that first.
> >>>>>
> >>>>> I'm looking at that right now and the problem seems that we don't have a
> >>>>> sane way to dynamically look up gen_pools independently of the actual
> >>>>> run-time platform. All users of gen_pools seem to know which platform
> >>>>> they run on and access a platform-specific pool. So I don't currently
> >>>>> see how we could implement multi-platform code, gen_pools are fine but
> >>>>> don't solve the problem here.
> >>>>>
> >>>>> Would it be an idea to add a char* member to gen_pools and a function
> >>>>> that can be used to dynamically look it up again? If a buffer with a
> >>>>> certain name exists, we can use it and install that ping-pong buffer,
> >>>>> otherwise we just don't. While that would be easy to do, it's a
> >>>>> tree-wide change.
> >>>>>
> >>>>> Is there a better way that I miss?
> >>>>
> >>>> At the high level there's two platform models we have to handle, the
> >>>> boot from board file !DT case, and then the boot from DT case. Since
> >>>> Davinci is just starting DT conversion, we mostly care about the !DT
> >>>> base in which the struct gen_pool * is passed in pdata to the ASoC
> >>>> driver. It is then selectable on a per-platform basis where the decision
> >>>> should be made.
> >>>>
> >>>> Given a separate discussion with Sekhar, we're only going to have one
> >>>> SRAM pool on any DaVinci part right now...this was only a question on
> >>>> L138 anyway. But regardless, the created gen_pool will be passed via
> >>>> pdata.
> >>>
> >>> I thought about this too, as mmp does it that way.
> >>>
> >>>> Since DT conversion is starting and we need to consider that now,
> >>>> the idea there is to use the DT-based generic sram driver [1] such that
> >>>> when we do boot from DT on Davinci, the genpool is provided via phandle
> >>>> and the pointer extracted with the OF helpers that are part of the
> >>>> series.
> >>>
> >>> A phandle is the cleanest way I think, yes.
> >>>
> >>>> That's pretty much it. I'm reworking the backend support as discussed
> >>>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
> >>>> that just replaces sram_* with genalloc for davinci ASoC.
> >>>
> >>> As you can also test it, it would be easiest if you came up with a patch
> >>> for that, yes. I can have a look at the dma bits laters, once my OMAP
> >>> board finally works with the code as it currently stands. I'm still
> >>> fighting with the mcasp driver right now ...
> >>
> >> I quickly prepared two patches to change that, so that topic is out of
> >> the way. But I did only compile-test them on OMAP - could you check on
> >> your Davinci platform? Note that these apply on top of the patch in
> >> discussion here (which isn't applied to the asoc tree yet).
> > 
> > I put a series together yesterday, just ran out of time to post
> > last night after testing. I'm posting that now...it's on top of my
> > uio_pruss/genalloc series and only addresss switching davinci-pcm to
> > genalloc (and actually enabling ping-pon from sram).
> 
> Ok, I don't care which version makes it in after all :)

Ok :)

> > I'll take a look a your OMAP patches.
> 
> The patches I just sent out are only for Davinci and change the SRAM
> functions to genalloc in the mcasp driver. They work just fine on OMAP
> of course, as the code is disabled in there.

Ok, same thing as I did and just sent out. These are tested on AM180x
and hook up ping-pong buffering so that there's actually one user of
all this ping-pong code. It's been sitting idle for a long time.

I didn't see your patches come by yet but will take a look to see if
we need to combine.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-04 10:28                                 ` Matt Porter
  0 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-04 10:28 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 04, 2012 at 11:57:30AM +0200, Daniel Mack wrote:
> On 04.10.2012 11:38, Porter, Matt wrote:
> > 
> > On Oct 4, 2012, at 5:21 AM, Daniel Mack wrote:
> > 
> >>
> >>
> >> On 02.10.2012 18:50, Daniel Mack wrote:
> >>> On 02.10.2012 18:41, Matt Porter wrote:
> >>>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
> >>>>> On 02.10.2012 13:06, Sekhar Nori wrote:
> >>>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
> >>>>>>> On 02.10.2012 11:37, Mark Brown wrote:
> >>>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
> >>>>>>>>
> >>>>>>>>> I also agree that ifdef is not a good solution.
> >>>>>>>>> It is better to have this information passed as device_data and via DT it can
> >>>>>>>>> be decided based on the compatible property for the device.
> >>>>>>>>
> >>>>>>>> That's not really the problem here - the problem is that the APIs used
> >>>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
> >>>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
> >>>>>>>
> >>>>>>> What about following Matt Porter's idea and ignore the SRAM code
> >>>>>>> entirely and port the entire PCM code to generic dmaengine code first?
> >>>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
> >>>>>>> might give that a try in near future.
> >>>>>>>
> >>>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
> >>>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
> >>>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
> >>>>>>
> >>>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
> >>>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
> >>>>>> (conversion should be straightforward and I can help test it) and the
> >>>>>> code that uses SRAM can probably keep using the private EDMA API till
> >>>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
> >>>>>> posted patches to move private EDMA APIs to a common location. That
> >>>>>> should keep AM335x build from breaking. Is this something that is feasible?
> >>>>>
> >>>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
> >>>>> right, we can also do that first.
> >>>>>
> >>>>> I'm looking at that right now and the problem seems that we don't have a
> >>>>> sane way to dynamically look up gen_pools independently of the actual
> >>>>> run-time platform. All users of gen_pools seem to know which platform
> >>>>> they run on and access a platform-specific pool. So I don't currently
> >>>>> see how we could implement multi-platform code, gen_pools are fine but
> >>>>> don't solve the problem here.
> >>>>>
> >>>>> Would it be an idea to add a char* member to gen_pools and a function
> >>>>> that can be used to dynamically look it up again? If a buffer with a
> >>>>> certain name exists, we can use it and install that ping-pong buffer,
> >>>>> otherwise we just don't. While that would be easy to do, it's a
> >>>>> tree-wide change.
> >>>>>
> >>>>> Is there a better way that I miss?
> >>>>
> >>>> At the high level there's two platform models we have to handle, the
> >>>> boot from board file !DT case, and then the boot from DT case. Since
> >>>> Davinci is just starting DT conversion, we mostly care about the !DT
> >>>> base in which the struct gen_pool * is passed in pdata to the ASoC
> >>>> driver. It is then selectable on a per-platform basis where the decision
> >>>> should be made.
> >>>>
> >>>> Given a separate discussion with Sekhar, we're only going to have one
> >>>> SRAM pool on any DaVinci part right now...this was only a question on
> >>>> L138 anyway. But regardless, the created gen_pool will be passed via
> >>>> pdata.
> >>>
> >>> I thought about this too, as mmp does it that way.
> >>>
> >>>> Since DT conversion is starting and we need to consider that now,
> >>>> the idea there is to use the DT-based generic sram driver [1] such that
> >>>> when we do boot from DT on Davinci, the genpool is provided via phandle
> >>>> and the pointer extracted with the OF helpers that are part of the
> >>>> series.
> >>>
> >>> A phandle is the cleanest way I think, yes.
> >>>
> >>>> That's pretty much it. I'm reworking the backend support as discussed
> >>>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
> >>>> that just replaces sram_* with genalloc for davinci ASoC.
> >>>
> >>> As you can also test it, it would be easiest if you came up with a patch
> >>> for that, yes. I can have a look at the dma bits laters, once my OMAP
> >>> board finally works with the code as it currently stands. I'm still
> >>> fighting with the mcasp driver right now ...
> >>
> >> I quickly prepared two patches to change that, so that topic is out of
> >> the way. But I did only compile-test them on OMAP - could you check on
> >> your Davinci platform? Note that these apply on top of the patch in
> >> discussion here (which isn't applied to the asoc tree yet).
> > 
> > I put a series together yesterday, just ran out of time to post
> > last night after testing. I'm posting that now...it's on top of my
> > uio_pruss/genalloc series and only addresss switching davinci-pcm to
> > genalloc (and actually enabling ping-pon from sram).
> 
> Ok, I don't care which version makes it in after all :)

Ok :)

> > I'll take a look a your OMAP patches.
> 
> The patches I just sent out are only for Davinci and change the SRAM
> functions to genalloc in the mcasp driver. They work just fine on OMAP
> of course, as the code is disabled in there.

Ok, same thing as I did and just sent out. These are tested on AM180x
and hook up ping-pong buffering so that there's actually one user of
all this ping-pong code. It's been sitting idle for a long time.

I didn't see your patches come by yet but will take a look to see if
we need to combine.

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
  2012-10-04 10:28                                 ` Matt Porter
@ 2012-10-04 11:11                                   ` Daniel Mack
  -1 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-04 11:11 UTC (permalink / raw)
  To: Matt Porter
  Cc: <alsa-devel@alsa-project.org>, <tony@atomide.com>,
	Mark Brown,
	<davinci-linux-open-source@linux.davincidsp.com>,
	Ujfalusi, Peter, Girdwood, Liam,
	<linux-arm-kernel@lists.infradead.org>

On 04.10.2012 12:28, Matt Porter wrote:
> On Thu, Oct 04, 2012 at 11:57:30AM +0200, Daniel Mack wrote:
>> On 04.10.2012 11:38, Porter, Matt wrote:
>>>
>>> On Oct 4, 2012, at 5:21 AM, Daniel Mack wrote:
>>>
>>>>
>>>>
>>>> On 02.10.2012 18:50, Daniel Mack wrote:
>>>>> On 02.10.2012 18:41, Matt Porter wrote:
>>>>>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>>>>>>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>>>>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>>>>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>>>>>>
>>>>>>>>>>> I also agree that ifdef is not a good solution.
>>>>>>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>>>>>>> be decided based on the compatible property for the device.
>>>>>>>>>>
>>>>>>>>>> That's not really the problem here - the problem is that the APIs used
>>>>>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>>>>>>
>>>>>>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>>>>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>>>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>>>>>>> might give that a try in near future.
>>>>>>>>>
>>>>>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>>>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>>>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>>>>>>
>>>>>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>>>>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>>>>>>> (conversion should be straightforward and I can help test it) and the
>>>>>>>> code that uses SRAM can probably keep using the private EDMA API till
>>>>>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>>>>>>> posted patches to move private EDMA APIs to a common location. That
>>>>>>>> should keep AM335x build from breaking. Is this something that is feasible?
>>>>>>>
>>>>>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>>>>>>> right, we can also do that first.
>>>>>>>
>>>>>>> I'm looking at that right now and the problem seems that we don't have a
>>>>>>> sane way to dynamically look up gen_pools independently of the actual
>>>>>>> run-time platform. All users of gen_pools seem to know which platform
>>>>>>> they run on and access a platform-specific pool. So I don't currently
>>>>>>> see how we could implement multi-platform code, gen_pools are fine but
>>>>>>> don't solve the problem here.
>>>>>>>
>>>>>>> Would it be an idea to add a char* member to gen_pools and a function
>>>>>>> that can be used to dynamically look it up again? If a buffer with a
>>>>>>> certain name exists, we can use it and install that ping-pong buffer,
>>>>>>> otherwise we just don't. While that would be easy to do, it's a
>>>>>>> tree-wide change.
>>>>>>>
>>>>>>> Is there a better way that I miss?
>>>>>>
>>>>>> At the high level there's two platform models we have to handle, the
>>>>>> boot from board file !DT case, and then the boot from DT case. Since
>>>>>> Davinci is just starting DT conversion, we mostly care about the !DT
>>>>>> base in which the struct gen_pool * is passed in pdata to the ASoC
>>>>>> driver. It is then selectable on a per-platform basis where the decision
>>>>>> should be made.
>>>>>>
>>>>>> Given a separate discussion with Sekhar, we're only going to have one
>>>>>> SRAM pool on any DaVinci part right now...this was only a question on
>>>>>> L138 anyway. But regardless, the created gen_pool will be passed via
>>>>>> pdata.
>>>>>
>>>>> I thought about this too, as mmp does it that way.
>>>>>
>>>>>> Since DT conversion is starting and we need to consider that now,
>>>>>> the idea there is to use the DT-based generic sram driver [1] such that
>>>>>> when we do boot from DT on Davinci, the genpool is provided via phandle
>>>>>> and the pointer extracted with the OF helpers that are part of the
>>>>>> series.
>>>>>
>>>>> A phandle is the cleanest way I think, yes.
>>>>>
>>>>>> That's pretty much it. I'm reworking the backend support as discussed
>>>>>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
>>>>>> that just replaces sram_* with genalloc for davinci ASoC.
>>>>>
>>>>> As you can also test it, it would be easiest if you came up with a patch
>>>>> for that, yes. I can have a look at the dma bits laters, once my OMAP
>>>>> board finally works with the code as it currently stands. I'm still
>>>>> fighting with the mcasp driver right now ...
>>>>
>>>> I quickly prepared two patches to change that, so that topic is out of
>>>> the way. But I did only compile-test them on OMAP - could you check on
>>>> your Davinci platform? Note that these apply on top of the patch in
>>>> discussion here (which isn't applied to the asoc tree yet).
>>>
>>> I put a series together yesterday, just ran out of time to post
>>> last night after testing. I'm posting that now...it's on top of my
>>> uio_pruss/genalloc series and only addresss switching davinci-pcm to
>>> genalloc (and actually enabling ping-pon from sram).
>>
>> Ok, I don't care which version makes it in after all :)
> 
> Ok :)
> 
>>> I'll take a look a your OMAP patches.
>>
>> The patches I just sent out are only for Davinci and change the SRAM
>> functions to genalloc in the mcasp driver. They work just fine on OMAP
>> of course, as the code is disabled in there.
> 
> Ok, same thing as I did and just sent out. These are tested on AM180x
> and hook up ping-pong buffering so that there's actually one user of
> all this ping-pong code. It's been sitting idle for a long time.
> 
> I didn't see your patches come by yet but will take a look to see if
> we need to combine.

I attached them to my mail for a quick review. I wanted to queue them up
to a bigger series I'll send out later ...


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms
@ 2012-10-04 11:11                                   ` Daniel Mack
  0 siblings, 0 replies; 80+ messages in thread
From: Daniel Mack @ 2012-10-04 11:11 UTC (permalink / raw)
  To: linux-arm-kernel

On 04.10.2012 12:28, Matt Porter wrote:
> On Thu, Oct 04, 2012 at 11:57:30AM +0200, Daniel Mack wrote:
>> On 04.10.2012 11:38, Porter, Matt wrote:
>>>
>>> On Oct 4, 2012, at 5:21 AM, Daniel Mack wrote:
>>>
>>>>
>>>>
>>>> On 02.10.2012 18:50, Daniel Mack wrote:
>>>>> On 02.10.2012 18:41, Matt Porter wrote:
>>>>>> On Tue, Oct 02, 2012 at 03:42:47PM +0200, Daniel Mack wrote:
>>>>>>> On 02.10.2012 13:06, Sekhar Nori wrote:
>>>>>>>> On 10/2/2012 4:03 PM, Daniel Mack wrote:
>>>>>>>>> On 02.10.2012 11:37, Mark Brown wrote:
>>>>>>>>>> On Tue, Oct 02, 2012 at 10:48:53AM +0300, Peter Ujfalusi wrote:
>>>>>>>>>>
>>>>>>>>>>> I also agree that ifdef is not a good solution.
>>>>>>>>>>> It is better to have this information passed as device_data and via DT it can
>>>>>>>>>>> be decided based on the compatible property for the device.
>>>>>>>>>>
>>>>>>>>>> That's not really the problem here - the problem is that the APIs used
>>>>>>>>>> to get the SRAM are DaVinci only so it's not possible to build on OMAP
>>>>>>>>>> or other platforms.  The SRAM code needs to move to a standard API.
>>>>>>>>>
>>>>>>>>> What about following Matt Porter's idea and ignore the SRAM code
>>>>>>>>> entirely and port the entire PCM code to generic dmaengine code first?
>>>>>>>>> The EDMA driver needs to learn support for cyclic DMA for that, and I
>>>>>>>>> might give that a try in near future.
>>>>>>>>>
>>>>>>>>> Later on, the SRAM ping-pong code can get added back using genalloc
>>>>>>>>> functions, as Sekhar proposed. That needs to be done by someone who has
>>>>>>>>> access to a Davinci board though, I only have a AM33xx/OMAP here.
>>>>>>>>
>>>>>>>> We cannot "get rid" of SRAM code and add it back "later". It is required
>>>>>>>> for most DaVinci parts. The SRAM code can be converted to use genalloc
>>>>>>>> (conversion should be straightforward and I can help test it) and the
>>>>>>>> code that uses SRAM can probably keep using the private EDMA API till
>>>>>>>> the dmaengine EDMA driver has cyclic DMA support. Matt has already
>>>>>>>> posted patches to move private EDMA APIs to a common location. That
>>>>>>>> should keep AM335x build from breaking. Is this something that is feasible?
>>>>>>>
>>>>>>> Yes - by "later" I just meant in a subsequent patch. But you're probably
>>>>>>> right, we can also do that first.
>>>>>>>
>>>>>>> I'm looking at that right now and the problem seems that we don't have a
>>>>>>> sane way to dynamically look up gen_pools independently of the actual
>>>>>>> run-time platform. All users of gen_pools seem to know which platform
>>>>>>> they run on and access a platform-specific pool. So I don't currently
>>>>>>> see how we could implement multi-platform code, gen_pools are fine but
>>>>>>> don't solve the problem here.
>>>>>>>
>>>>>>> Would it be an idea to add a char* member to gen_pools and a function
>>>>>>> that can be used to dynamically look it up again? If a buffer with a
>>>>>>> certain name exists, we can use it and install that ping-pong buffer,
>>>>>>> otherwise we just don't. While that would be easy to do, it's a
>>>>>>> tree-wide change.
>>>>>>>
>>>>>>> Is there a better way that I miss?
>>>>>>
>>>>>> At the high level there's two platform models we have to handle, the
>>>>>> boot from board file !DT case, and then the boot from DT case. Since
>>>>>> Davinci is just starting DT conversion, we mostly care about the !DT
>>>>>> base in which the struct gen_pool * is passed in pdata to the ASoC
>>>>>> driver. It is then selectable on a per-platform basis where the decision
>>>>>> should be made.
>>>>>>
>>>>>> Given a separate discussion with Sekhar, we're only going to have one
>>>>>> SRAM pool on any DaVinci part right now...this was only a question on
>>>>>> L138 anyway. But regardless, the created gen_pool will be passed via
>>>>>> pdata.
>>>>>
>>>>> I thought about this too, as mmp does it that way.
>>>>>
>>>>>> Since DT conversion is starting and we need to consider that now,
>>>>>> the idea there is to use the DT-based generic sram driver [1] such that
>>>>>> when we do boot from DT on Davinci, the genpool is provided via phandle
>>>>>> and the pointer extracted with the OF helpers that are part of the
>>>>>> series.
>>>>>
>>>>> A phandle is the cleanest way I think, yes.
>>>>>
>>>>>> That's pretty much it. I'm reworking the backend support as discussed
>>>>>> with Sekhar wrt to my uio_pruss series. I can post a standalone series
>>>>>> that just replaces sram_* with genalloc for davinci ASoC.
>>>>>
>>>>> As you can also test it, it would be easiest if you came up with a patch
>>>>> for that, yes. I can have a look at the dma bits laters, once my OMAP
>>>>> board finally works with the code as it currently stands. I'm still
>>>>> fighting with the mcasp driver right now ...
>>>>
>>>> I quickly prepared two patches to change that, so that topic is out of
>>>> the way. But I did only compile-test them on OMAP - could you check on
>>>> your Davinci platform? Note that these apply on top of the patch in
>>>> discussion here (which isn't applied to the asoc tree yet).
>>>
>>> I put a series together yesterday, just ran out of time to post
>>> last night after testing. I'm posting that now...it's on top of my
>>> uio_pruss/genalloc series and only addresss switching davinci-pcm to
>>> genalloc (and actually enabling ping-pon from sram).
>>
>> Ok, I don't care which version makes it in after all :)
> 
> Ok :)
> 
>>> I'll take a look a your OMAP patches.
>>
>> The patches I just sent out are only for Davinci and change the SRAM
>> functions to genalloc in the mcasp driver. They work just fine on OMAP
>> of course, as the code is disabled in there.
> 
> Ok, same thing as I did and just sent out. These are tested on AM180x
> and hook up ping-pong buffering so that there's actually one user of
> all this ping-pong code. It's been sitting idle for a long time.
> 
> I didn't see your patches come by yet but will take a look to see if
> we need to combine.

I attached them to my mail for a quick review. I wanted to queue them up
to a bigger series I'll send out later ...


Daniel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-10-03 14:07               ` [alsa-devel] " Daniel Mack
@ 2012-10-04 19:50                   ` Matt Porter
  -1 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-04 19:50 UTC (permalink / raw)
  To: Daniel Mack
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	Girdwood,  Liam,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Wed, Oct 03, 2012 at 04:07:41PM +0200, Daniel Mack wrote:
> On 03.10.2012 14:57, Hebbar, Gururaja wrote:
> > On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
> >> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
> >>> On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
> >>>> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> >>>>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> >>>>> register offset and missing generic SRAM APIs support
> >>>>>
> >>>>> Changes
> >>>>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
> >>>>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
> >>>>> - The register offsets are handled depending on the version.
> >>>>> - Provide a config option to indicate missing SRAM API support.
> >>>>
> >>>> Could you give some insight which hardware this was tested on? I'm
> >>>> trying to get this up and running on a AM33xx board, and the patches
> >>>> look all reasonable to me. My problem is that I can't make the DMA
> >>>> engine move forward, I fail to receive a single interrupt on this
> >>>> peripheral after the stream starts. I will continue searching for the
> >>>> reason of this tomorrow, but maybe you can give me some hint by
> >>>> explaining your setup?
> >>>>
> >>>> Note that I'm using your patches together with Matt's from this series:
> >>>>
> >>>>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
> >>>>
> >>>> ... but it doesn't work without those either.
> >>>
> >>>
> >>> When I started working on adding DT support to McASP driver, Matt Porter 
> >>> EDMA port was not yet ready. 
> >>>
> >>> So 
> >>> 1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
> >>>    device init). 
> >>> 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 
> >>>
> >>> 3. Added DT support to McASP driver.
> >>>
> >>> I tested this on AM335x EVM board. 
> >>
> >> Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
> >> kernels.
> >>
> >>> If you need the code, I can share it as a patch (I will send the patch as a 
> >>> private mail since the patch is huge).
> >>
> >> Please do :) Or just push your entire tree somewhere.
> > 
> > I have pushed the code at below git repo
> > Repo :https://github.com/hvaibhav/am335x-linux
> > Branch : am335x-upstream-staging-audio
> > 
> > This includes 
> > 1. (linux-next + AM335x patches)
> > 2. McASP DT conversion
> > 3. EDMA hack
> > 4. AM335x audio specific DT blobs
> > 5. Am335x dma DT blobs [hack]
> 
> Ha, that 5th point was what I was missing, in particular these DMA
> offset matching bits. Thanks a lot! I'll get back to you soon with some
> patches for the mcasp driver.

You should be able to replace #3 with https://lkml.org/lkml/2012/9/20/275
The intention is for McASP to use the private EDMA API on both DaVinci
and AM33xx until the dmaengine conversion of McASP is ready. 

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-10-04 19:50                   ` Matt Porter
  0 siblings, 0 replies; 80+ messages in thread
From: Matt Porter @ 2012-10-04 19:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 03, 2012 at 04:07:41PM +0200, Daniel Mack wrote:
> On 03.10.2012 14:57, Hebbar, Gururaja wrote:
> > On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
> >> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
> >>> On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
> >>>> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> >>>>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> >>>>> register offset and missing generic SRAM APIs support
> >>>>>
> >>>>> Changes
> >>>>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
> >>>>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
> >>>>> - The register offsets are handled depending on the version.
> >>>>> - Provide a config option to indicate missing SRAM API support.
> >>>>
> >>>> Could you give some insight which hardware this was tested on? I'm
> >>>> trying to get this up and running on a AM33xx board, and the patches
> >>>> look all reasonable to me. My problem is that I can't make the DMA
> >>>> engine move forward, I fail to receive a single interrupt on this
> >>>> peripheral after the stream starts. I will continue searching for the
> >>>> reason of this tomorrow, but maybe you can give me some hint by
> >>>> explaining your setup?
> >>>>
> >>>> Note that I'm using your patches together with Matt's from this series:
> >>>>
> >>>>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
> >>>>
> >>>> ... but it doesn't work without those either.
> >>>
> >>>
> >>> When I started working on adding DT support to McASP driver, Matt Porter 
> >>> EDMA port was not yet ready. 
> >>>
> >>> So 
> >>> 1. I took existing edma driver from AM335x Arago release [1] (driver + edma 
> >>>    device init). 
> >>> 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2] 
> >>>
> >>> 3. Added DT support to McASP driver.
> >>>
> >>> I tested this on AM335x EVM board. 
> >>
> >> Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
> >> kernels.
> >>
> >>> If you need the code, I can share it as a patch (I will send the patch as a 
> >>> private mail since the patch is huge).
> >>
> >> Please do :) Or just push your entire tree somewhere.
> > 
> > I have pushed the code at below git repo
> > Repo :https://github.com/hvaibhav/am335x-linux
> > Branch : am335x-upstream-staging-audio
> > 
> > This includes 
> > 1. (linux-next + AM335x patches)
> > 2. McASP DT conversion
> > 3. EDMA hack
> > 4. AM335x audio specific DT blobs
> > 5. Am335x dma DT blobs [hack]
> 
> Ha, that 5th point was what I was missing, in particular these DMA
> offset matching bits. Thanks a lot! I'll get back to you soon with some
> patches for the mcasp driver.

You should be able to replace #3 with https://lkml.org/lkml/2012/9/20/275
The intention is for McASP to use the private EDMA API on both DaVinci
and AM33xx until the dmaengine conversion of McASP is ready. 

-Matt

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-10-03 12:57             ` Hebbar, Gururaja
@ 2012-11-25 10:26               ` Yegor Yefremov
  -1 siblings, 0 replies; 80+ messages in thread
From: Yegor Yefremov @ 2012-11-25 10:26 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, broonie, Nori, Sekhar,
	davinci-linux-open-source, Hiremath, Vaibhav, Daniel Mack,
	Girdwood, Liam, linux-arm-kernel

On Wed, Oct 3, 2012 at 2:57 PM, Hebbar, Gururaja <gururaja.hebbar@ti.com> wrote:
> On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
>> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
>> > On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
>> >> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
>> >>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
>> >>> register offset and missing generic SRAM APIs support
>> >>>
>> >>> Changes
>> >>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
>> >>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
>> >>> - The register offsets are handled depending on the version.
>> >>> - Provide a config option to indicate missing SRAM API support.
>> >>
>> >> Could you give some insight which hardware this was tested on? I'm
>> >> trying to get this up and running on a AM33xx board, and the patches
>> >> look all reasonable to me. My problem is that I can't make the DMA
>> >> engine move forward, I fail to receive a single interrupt on this
>> >> peripheral after the stream starts. I will continue searching for the
>> >> reason of this tomorrow, but maybe you can give me some hint by
>> >> explaining your setup?
>> >>
>> >> Note that I'm using your patches together with Matt's from this series:
>> >>
>> >>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
>> >>
>> >> ... but it doesn't work without those either.
>> >
>> >
>> > When I started working on adding DT support to McASP driver, Matt Porter
>> > EDMA port was not yet ready.
>> >
>> > So
>> > 1. I took existing edma driver from AM335x Arago release [1] (driver + edma
>> >    device init).
>> > 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2]
>> >
>> > 3. Added DT support to McASP driver.
>> >
>> > I tested this on AM335x EVM board.
>>
>> Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
>> kernels.
>>
>> > If you need the code, I can share it as a patch (I will send the patch as a
>> > private mail since the patch is huge).
>>
>> Please do :) Or just push your entire tree somewhere.
>
> I have pushed the code at below git repo
> Repo :https://github.com/hvaibhav/am335x-linux
> Branch : am335x-upstream-staging-audio
>
> This includes
> 1. (linux-next + AM335x patches)
> 2. McASP DT conversion
> 3. EDMA hack
> 4. AM335x audio specific DT blobs
> 5. Am335x dma DT blobs [hack]
>
> Kindly let me know if you need any more details.

What can be expected in 3.8? And what will have to wait for 3.9?

Yegor

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-11-25 10:26               ` Yegor Yefremov
  0 siblings, 0 replies; 80+ messages in thread
From: Yegor Yefremov @ 2012-11-25 10:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 3, 2012 at 2:57 PM, Hebbar, Gururaja <gururaja.hebbar@ti.com> wrote:
> On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
>> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
>> > On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
>> >> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
>> >>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
>> >>> register offset and missing generic SRAM APIs support
>> >>>
>> >>> Changes
>> >>> - Add new MCASP_VERSION_3 to identify new variant. New DT compatible
>> >>>   "ti,omap2-mcasp-audio" to identify version 3 controller.
>> >>> - The register offsets are handled depending on the version.
>> >>> - Provide a config option to indicate missing SRAM API support.
>> >>
>> >> Could you give some insight which hardware this was tested on? I'm
>> >> trying to get this up and running on a AM33xx board, and the patches
>> >> look all reasonable to me. My problem is that I can't make the DMA
>> >> engine move forward, I fail to receive a single interrupt on this
>> >> peripheral after the stream starts. I will continue searching for the
>> >> reason of this tomorrow, but maybe you can give me some hint by
>> >> explaining your setup?
>> >>
>> >> Note that I'm using your patches together with Matt's from this series:
>> >>
>> >>   https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-rfc-v1
>> >>
>> >> ... but it doesn't work without those either.
>> >
>> >
>> > When I started working on adding DT support to McASP driver, Matt Porter
>> > EDMA port was not yet ready.
>> >
>> > So
>> > 1. I took existing edma driver from AM335x Arago release [1] (driver + edma
>> >    device init).
>> > 2. Added this to Vaibhav's Local (linux-next + AM335x patches) tree [2]
>> >
>> > 3. Added DT support to McASP driver.
>> >
>> > I tested this on AM335x EVM board.
>>
>> Hmm, so I think there's a tiny bit missing for the EDMA conversion on DT
>> kernels.
>>
>> > If you need the code, I can share it as a patch (I will send the patch as a
>> > private mail since the patch is huge).
>>
>> Please do :) Or just push your entire tree somewhere.
>
> I have pushed the code at below git repo
> Repo :https://github.com/hvaibhav/am335x-linux
> Branch : am335x-upstream-staging-audio
>
> This includes
> 1. (linux-next + AM335x patches)
> 2. McASP DT conversion
> 3. EDMA hack
> 4. AM335x audio specific DT blobs
> 5. Am335x dma DT blobs [hack]
>
> Kindly let me know if you need any more details.

What can be expected in 3.8? And what will have to wait for 3.9?

Yegor

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-11-25 10:26               ` [alsa-devel] " Yegor Yefremov
@ 2012-11-26 11:32                 ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-11-26 11:32 UTC (permalink / raw)
  To: Yegor Yefremov
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, broonie, Nori, Sekhar,
	davinci-linux-open-source, Hiremath, Vaibhav, Daniel Mack,
	Girdwood, Liam, linux-arm-kernel

Yegor,

On Sun, Nov 25, 2012 at 15:56:27, Yegor Yefremov wrote:
> On Wed, Oct 3, 2012 at 2:57 PM, Hebbar, Gururaja <gururaja.hebbar@ti.com> wrote:
> > On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
> >> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
> >> > On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
> >> >> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> >> >>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> >> >>> register offset and missing generic SRAM APIs support
> >> >>>

..snip..
..snip..

> >>
> >> Please do :) Or just push your entire tree somewhere.
> >
> > I have pushed the code at below git repo
> > Repo :https://github.com/hvaibhav/am335x-linux
> > Branch : am335x-upstream-staging-audio
> >
> > This includes
> > 1. (linux-next + AM335x patches)
> > 2. McASP DT conversion
> > 3. EDMA hack
> > 4. AM335x audio specific DT blobs
> > 5. Am335x dma DT blobs [hack]
> >
> > Kindly let me know if you need any more details.
> 

> What can be expected in 3.8? 

1. ASoC McASP DT conversion is 80% complete. Davinci Machine DT conversion
& McASP pinctrl support is yet to be accepted. I sent a patch recently and 
waiting for feedback.

> And what will have to wait for 3.9?
AFAIK
1. EDMA port for McASP driver
2. AM335x support on Davinci ASoC (Kconfig & makefile)
3. DT blobs for Audio modules on AM335x (am335x-evm.dts & am33xx.dtsi)

> 
> Yegor
> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-11-26 11:32                 ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-11-26 11:32 UTC (permalink / raw)
  To: linux-arm-kernel

Yegor,

On Sun, Nov 25, 2012 at 15:56:27, Yegor Yefremov wrote:
> On Wed, Oct 3, 2012 at 2:57 PM, Hebbar, Gururaja <gururaja.hebbar@ti.com> wrote:
> > On Wed, Oct 03, 2012 at 16:46:39, Daniel Mack wrote:
> >> On 03.10.2012 09:16, Hebbar, Gururaja wrote:
> >> > On Wed, Oct 03, 2012 at 03:58:45, Daniel Mack wrote:
> >> >> On 31.08.2012 14:50, Hebbar, Gururaja wrote:
> >> >>> The OMAP2+ variant of McASP is different from Davinci variant w.r.to some
> >> >>> register offset and missing generic SRAM APIs support
> >> >>>

..snip..
..snip..

> >>
> >> Please do :) Or just push your entire tree somewhere.
> >
> > I have pushed the code at below git repo
> > Repo :https://github.com/hvaibhav/am335x-linux
> > Branch : am335x-upstream-staging-audio
> >
> > This includes
> > 1. (linux-next + AM335x patches)
> > 2. McASP DT conversion
> > 3. EDMA hack
> > 4. AM335x audio specific DT blobs
> > 5. Am335x dma DT blobs [hack]
> >
> > Kindly let me know if you need any more details.
> 

> What can be expected in 3.8? 

1. ASoC McASP DT conversion is 80% complete. Davinci Machine DT conversion
& McASP pinctrl support is yet to be accepted. I sent a patch recently and 
waiting for feedback.

> And what will have to wait for 3.9?
AFAIK
1. EDMA port for McASP driver
2. AM335x support on Davinci ASoC (Kconfig & makefile)
3. DT blobs for Audio modules on AM335x (am335x-evm.dts & am33xx.dtsi)

> 
> Yegor
> 


Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-11-26 11:32                 ` [alsa-devel] " Hebbar, Gururaja
@ 2012-11-26 11:35                   ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-11-26 11:35 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, Nori, Sekhar,
	davinci-linux-open-source, Hiremath, Vaibhav, Daniel Mack,
	Yegor Yefremov, Girdwood, Liam, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 440 bytes --]

On Mon, Nov 26, 2012 at 11:32:49AM +0000, Hebbar, Gururaja wrote:
> On Sun, Nov 25, 2012 at 15:56:27, Yegor Yefremov wrote:

> > What can be expected in 3.8? 

> 1. ASoC McASP DT conversion is 80% complete. Davinci Machine DT conversion
> & McASP pinctrl support is yet to be accepted. I sent a patch recently and 
> waiting for feedback.

I don't have anything in my review queue, please post patches if you
want them reviewed.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-11-26 11:35                   ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-11-26 11:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 26, 2012 at 11:32:49AM +0000, Hebbar, Gururaja wrote:
> On Sun, Nov 25, 2012 at 15:56:27, Yegor Yefremov wrote:

> > What can be expected in 3.8? 

> 1. ASoC McASP DT conversion is 80% complete. Davinci Machine DT conversion
> & McASP pinctrl support is yet to be accepted. I sent a patch recently and 
> waiting for feedback.

I don't have anything in my review queue, please post patches if you
want them reviewed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121126/5539c7b7/attachment.sig>

^ permalink raw reply	[flat|nested] 80+ messages in thread

* RE: [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-11-26 11:35                   ` [alsa-devel] " Mark Brown
@ 2012-11-26 11:42                       ` Hebbar, Gururaja
  -1 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-11-26 11:42 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tony-4v6yS6AI5VpBDgjK7y7TUQ,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
	Daniel Mack, Yegor Yefremov, Girdwood, Liam,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Nov 26, 2012 at 17:05:21, Mark Brown wrote:
> On Mon, Nov 26, 2012 at 11:32:49AM +0000, Hebbar, Gururaja wrote:
> > On Sun, Nov 25, 2012 at 15:56:27, Yegor Yefremov wrote:
> 
> > > What can be expected in 3.8? 
> 
> > 1. ASoC McASP DT conversion is 80% complete. Davinci Machine DT conversion
> > & McASP pinctrl support is yet to be accepted. I sent a patch recently and 
> > waiting for feedback.
> 
> I don't have anything in my review queue, please post patches if you
> want them reviewed.

I already sent the patches for these on 22/11/2012 

http://lkml.org/lkml/2012/11/22/857

> 

Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-11-26 11:42                       ` Hebbar, Gururaja
  0 siblings, 0 replies; 80+ messages in thread
From: Hebbar, Gururaja @ 2012-11-26 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 26, 2012 at 17:05:21, Mark Brown wrote:
> On Mon, Nov 26, 2012 at 11:32:49AM +0000, Hebbar, Gururaja wrote:
> > On Sun, Nov 25, 2012 at 15:56:27, Yegor Yefremov wrote:
> 
> > > What can be expected in 3.8? 
> 
> > 1. ASoC McASP DT conversion is 80% complete. Davinci Machine DT conversion
> > & McASP pinctrl support is yet to be accepted. I sent a patch recently and 
> > waiting for feedback.
> 
> I don't have anything in my review queue, please post patches if you
> want them reviewed.

I already sent the patches for these on 22/11/2012 

http://lkml.org/lkml/2012/11/22/857

> 

Regards, 
Gururaja

^ permalink raw reply	[flat|nested] 80+ messages in thread

* Re: [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
  2012-11-26 11:42                       ` Hebbar, Gururaja
@ 2012-11-26 11:57                         ` Mark Brown
  -1 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-11-26 11:57 UTC (permalink / raw)
  To: Hebbar, Gururaja
  Cc: alsa-devel, Rajashekhara, Sudhakar, tony, Nori, Sekhar,
	davinci-linux-open-source, Hiremath, Vaibhav, Daniel Mack,
	Yegor Yefremov, Girdwood, Liam, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 262 bytes --]

On Mon, Nov 26, 2012 at 11:42:01AM +0000, Hebbar, Gururaja wrote:

> I already sent the patches for these on 22/11/2012 

> http://lkml.org/lkml/2012/11/22/857

You've resent the same bindings again without addressing the review
comments from last time.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 80+ messages in thread

* [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant
@ 2012-11-26 11:57                         ` Mark Brown
  0 siblings, 0 replies; 80+ messages in thread
From: Mark Brown @ 2012-11-26 11:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Nov 26, 2012 at 11:42:01AM +0000, Hebbar, Gururaja wrote:

> I already sent the patches for these on 22/11/2012 

> http://lkml.org/lkml/2012/11/22/857

You've resent the same bindings again without addressing the review
comments from last time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121126/4bcd5e98/attachment.sig>

^ permalink raw reply	[flat|nested] 80+ messages in thread

end of thread, other threads:[~2012-11-26 11:57 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 12:50 [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant Hebbar, Gururaja
2012-08-31 12:50 ` Hebbar, Gururaja
2012-08-31 12:50 ` [PATCH 1/3] " Hebbar, Gururaja
2012-08-31 12:50   ` Hebbar, Gururaja
2012-09-01  0:44   ` Mark Brown
2012-09-01  0:44     ` Mark Brown
2012-09-03  6:57     ` Hebbar, Gururaja
2012-09-03  6:57       ` Hebbar, Gururaja
2012-09-05  4:01       ` Mark Brown
2012-09-05  4:01         ` Mark Brown
2012-08-31 12:50 ` [PATCH 2/3] ASoC: Davinci: pcm: add support for sram-support-less platforms Hebbar, Gururaja
2012-08-31 12:50   ` Hebbar, Gururaja
2012-09-12  7:50   ` Hebbar, Gururaja
2012-09-12  7:50     ` Hebbar, Gururaja
2012-09-12  7:52     ` Mark Brown
2012-09-12  7:52       ` Mark Brown
2012-09-22 15:33   ` Mark Brown
2012-09-22 15:33     ` Mark Brown
2012-09-27  6:57     ` Hebbar, Gururaja
2012-09-27  6:57       ` Hebbar, Gururaja
     [not found]       ` <1BAFE6F6C881BF42822005164F1491C33EA92A1D-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-10-01 15:54         ` Mark Brown
2012-10-01 15:54           ` Mark Brown
2012-10-02  7:48     ` Peter Ujfalusi
2012-10-02  7:48       ` [alsa-devel] " Peter Ujfalusi
2012-10-02  9:37       ` Mark Brown
2012-10-02  9:37         ` [alsa-devel] " Mark Brown
2012-10-02 10:33         ` Daniel Mack
2012-10-02 10:33           ` [alsa-devel] " Daniel Mack
2012-10-02 11:06           ` Sekhar Nori
2012-10-02 11:06             ` Sekhar Nori
2012-10-02 13:42             ` Daniel Mack
2012-10-02 13:42               ` Daniel Mack
     [not found]               ` <506AEF57.2000306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-02 16:41                 ` Matt Porter
2012-10-02 16:41                   ` Matt Porter
2012-10-02 16:50                   ` Daniel Mack
2012-10-02 16:50                     ` [alsa-devel] " Daniel Mack
     [not found]                     ` <506B1B46.2070006-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-02 17:28                       ` Matt Porter
2012-10-02 17:28                         ` Matt Porter
2012-10-04  9:21                     ` Daniel Mack
2012-10-04  9:21                       ` [alsa-devel] " Daniel Mack
     [not found]                       ` <506D552A.2000506-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-04  9:38                         ` Porter, Matt
2012-10-04  9:38                           ` Porter, Matt
2012-10-04  9:57                           ` Daniel Mack
2012-10-04  9:57                             ` [alsa-devel] " Daniel Mack
     [not found]                             ` <506D5D8A.7030902-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-04 10:28                               ` Matt Porter
2012-10-04 10:28                                 ` Matt Porter
2012-10-04 11:11                                 ` Daniel Mack
2012-10-04 11:11                                   ` [alsa-devel] " Daniel Mack
2012-10-02 16:30           ` Matt Porter
2012-10-02 16:30             ` Matt Porter
     [not found]       ` <506A9C65.5040309-l0cyMroinI0@public.gmane.org>
2012-10-02 16:28         ` Matt Porter
2012-10-02 16:28           ` Matt Porter
2012-10-02  8:37     ` Sekhar Nori
2012-10-02  8:37       ` Sekhar Nori
2012-08-31 12:50 ` [PATCH 3/3] ASoC: Davinci: evm: Fix typo in cpu dai name Hebbar, Gururaja
2012-08-31 12:50   ` Hebbar, Gururaja
2012-09-01  0:47   ` Mark Brown
2012-09-01  0:47     ` Mark Brown
2012-10-02 22:28 ` [alsa-devel] [PATCH 0/3] ASoC: Davinci: McASP: add support new McASP IP Variant Daniel Mack
2012-10-02 22:28   ` Daniel Mack
     [not found]   ` <506B6A9D.3090100-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-03  7:16     ` Hebbar, Gururaja
2012-10-03  7:16       ` Hebbar, Gururaja
2012-10-03 11:16       ` Daniel Mack
2012-10-03 11:16         ` [alsa-devel] " Daniel Mack
     [not found]         ` <506C1E97.1070700-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-03 12:57           ` Hebbar, Gururaja
2012-10-03 12:57             ` Hebbar, Gururaja
2012-10-03 14:07             ` Daniel Mack
2012-10-03 14:07               ` [alsa-devel] " Daniel Mack
     [not found]               ` <506C46AD.1090807-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-04 19:50                 ` Matt Porter
2012-10-04 19:50                   ` Matt Porter
2012-11-25 10:26             ` Yegor Yefremov
2012-11-25 10:26               ` [alsa-devel] " Yegor Yefremov
2012-11-26 11:32               ` Hebbar, Gururaja
2012-11-26 11:32                 ` [alsa-devel] " Hebbar, Gururaja
2012-11-26 11:35                 ` Mark Brown
2012-11-26 11:35                   ` [alsa-devel] " Mark Brown
     [not found]                   ` <20121126113521.GD9411-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-11-26 11:42                     ` Hebbar, Gururaja
2012-11-26 11:42                       ` Hebbar, Gururaja
2012-11-26 11:57                       ` Mark Brown
2012-11-26 11:57                         ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.