linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: imx: set watermarks for mx2-dma
       [not found] <1301068306-11997-1-git-send-email-w.sang@pengutronix.de>
@ 2011-03-25 15:51 ` Wolfram Sang
  2011-03-26 11:42   ` Liam Girdwood
  2011-03-25 15:51 ` [PATCH 2/3] ASoC: imx: fix burstsize for DMA Wolfram Sang
  2011-03-25 15:51 ` [PATCH 3/3] ASoC: imx: remove superfluous code in imx-ssi.c Wolfram Sang
  2 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2011-03-25 15:51 UTC (permalink / raw)
  To: alsa-devel
  Cc: Sascha Hauer, Wolfram Sang, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Timur Tabi, Jarkko Nikula,
	open list

They got accidently removed by f0fba2a (ASoC: multi-component - ASoC
Multi-Component Support). Reintroduce them and get rid of the
superfluous defines because the fiq-driver has its own hardcoded values.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 sound/soc/imx/imx-pcm-dma-mx2.c |    5 +++++
 sound/soc/imx/imx-ssi.h         |    3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c
index 671ef8d..b2ed764 100644
--- a/sound/soc/imx/imx-pcm-dma-mx2.c
+++ b/sound/soc/imx/imx-pcm-dma-mx2.c
@@ -303,6 +303,11 @@ static struct snd_soc_platform_driver imx_soc_platform_mx2 = {
 
 static int __devinit imx_soc_platform_probe(struct platform_device *pdev)
 {
+	struct imx_ssi *ssi = platform_get_drvdata(pdev);
+
+	ssi->dma_params_tx.burstsize = 6;
+	ssi->dma_params_rx.burstsize = 4;
+
 	return snd_soc_register_platform(&pdev->dev, &imx_soc_platform_mx2);
 }
 
diff --git a/sound/soc/imx/imx-ssi.h b/sound/soc/imx/imx-ssi.h
index a4406a1..dc8a875 100644
--- a/sound/soc/imx/imx-ssi.h
+++ b/sound/soc/imx/imx-ssi.h
@@ -234,7 +234,4 @@ void imx_pcm_free(struct snd_pcm *pcm);
  */
 #define IMX_SSI_DMABUF_SIZE	(64 * 1024)
 
-#define DMA_RXFIFO_BURST      0x4
-#define DMA_TXFIFO_BURST      0x6
-
 #endif /* _IMX_SSI_H */
-- 
1.7.2.5


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

* [PATCH 2/3] ASoC: imx: fix burstsize for DMA
       [not found] <1301068306-11997-1-git-send-email-w.sang@pengutronix.de>
  2011-03-25 15:51 ` [PATCH 1/3] ASoC: imx: set watermarks for mx2-dma Wolfram Sang
@ 2011-03-25 15:51 ` Wolfram Sang
  2011-03-26 11:42   ` Liam Girdwood
  2011-03-25 15:51 ` [PATCH 3/3] ASoC: imx: remove superfluous code in imx-ssi.c Wolfram Sang
  2 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2011-03-25 15:51 UTC (permalink / raw)
  To: alsa-devel
  Cc: Sascha Hauer, Wolfram Sang, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Timur Tabi, open list

SSI counts in words, the DMA engine in bytes. (Wrong) factor got removed
in bf974a0 (ASoC i.MX: switch to new DMA api).

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 sound/soc/imx/imx-pcm-dma-mx2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c
index b2ed764..aab7765 100644
--- a/sound/soc/imx/imx-pcm-dma-mx2.c
+++ b/sound/soc/imx/imx-pcm-dma-mx2.c
@@ -110,12 +110,12 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream,
 		slave_config.direction = DMA_TO_DEVICE;
 		slave_config.dst_addr = dma_params->dma_addr;
 		slave_config.dst_addr_width = buswidth;
-		slave_config.dst_maxburst = dma_params->burstsize;
+		slave_config.dst_maxburst = dma_params->burstsize * buswidth;
 	} else {
 		slave_config.direction = DMA_FROM_DEVICE;
 		slave_config.src_addr = dma_params->dma_addr;
 		slave_config.src_addr_width = buswidth;
-		slave_config.src_maxburst = dma_params->burstsize;
+		slave_config.src_maxburst = dma_params->burstsize * buswidth;
 	}
 
 	ret = dmaengine_slave_config(iprtd->dma_chan, &slave_config);
-- 
1.7.2.5


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

* [PATCH 3/3] ASoC: imx: remove superfluous code in imx-ssi.c
       [not found] <1301068306-11997-1-git-send-email-w.sang@pengutronix.de>
  2011-03-25 15:51 ` [PATCH 1/3] ASoC: imx: set watermarks for mx2-dma Wolfram Sang
  2011-03-25 15:51 ` [PATCH 2/3] ASoC: imx: fix burstsize for DMA Wolfram Sang
@ 2011-03-25 15:51 ` Wolfram Sang
  2011-03-26 11:42   ` Liam Girdwood
  2 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2011-03-25 15:51 UTC (permalink / raw)
  To: alsa-devel
  Cc: Sascha Hauer, Wolfram Sang, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Timur Tabi, Uwe Kleine-König,
	open list

Checking if IMX_SSI_DMA is set and then set it again is useless.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 sound/soc/imx/imx-ssi.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
index bc92ec6..c331d65 100644
--- a/sound/soc/imx/imx-ssi.c
+++ b/sound/soc/imx/imx-ssi.c
@@ -667,12 +667,6 @@ static int imx_ssi_probe(struct platform_device *pdev)
 	if (res)
 		ssi->dma_params_rx.dma = res->start;
 
-	if ((cpu_is_mx27() || cpu_is_mx21()) &&
-			!(ssi->flags & IMX_SSI_USE_AC97) &&
-			(ssi->flags & IMX_SSI_DMA)) {
-		ssi->flags |= IMX_SSI_DMA;
-	}
-
 	platform_set_drvdata(pdev, ssi);
 
 	ret = snd_soc_register_dai(&pdev->dev, dai);
-- 
1.7.2.5


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

* Re: [PATCH 1/3] ASoC: imx: set watermarks for mx2-dma
  2011-03-25 15:51 ` [PATCH 1/3] ASoC: imx: set watermarks for mx2-dma Wolfram Sang
@ 2011-03-26 11:42   ` Liam Girdwood
  0 siblings, 0 replies; 6+ messages in thread
From: Liam Girdwood @ 2011-03-26 11:42 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: alsa-devel, Sascha Hauer, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Timur Tabi, Jarkko Nikula, open list

On Fri, 2011-03-25 at 16:51 +0100, Wolfram Sang wrote:
> They got accidently removed by f0fba2a (ASoC: multi-component - ASoC
> Multi-Component Support). Reintroduce them and get rid of the
> superfluous defines because the fiq-driver has its own hardcoded values.
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---

Acked-by: Liam Girdwood <lrg@ti.com>



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

* Re: [PATCH 2/3] ASoC: imx: fix burstsize for DMA
  2011-03-25 15:51 ` [PATCH 2/3] ASoC: imx: fix burstsize for DMA Wolfram Sang
@ 2011-03-26 11:42   ` Liam Girdwood
  0 siblings, 0 replies; 6+ messages in thread
From: Liam Girdwood @ 2011-03-26 11:42 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: alsa-devel, Sascha Hauer, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Timur Tabi, open list

On Fri, 2011-03-25 at 16:51 +0100, Wolfram Sang wrote:
> SSI counts in words, the DMA engine in bytes. (Wrong) factor got removed
> in bf974a0 (ASoC i.MX: switch to new DMA api).
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

Acked-by: Liam Girdwood <lrg@ti.com>


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

* Re: [PATCH 3/3] ASoC: imx: remove superfluous code in imx-ssi.c
  2011-03-25 15:51 ` [PATCH 3/3] ASoC: imx: remove superfluous code in imx-ssi.c Wolfram Sang
@ 2011-03-26 11:42   ` Liam Girdwood
  0 siblings, 0 replies; 6+ messages in thread
From: Liam Girdwood @ 2011-03-26 11:42 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: alsa-devel, Sascha Hauer, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Timur Tabi, Uwe Kleine-König, open list

On Fri, 2011-03-25 at 16:51 +0100, Wolfram Sang wrote:
> Checking if IMX_SSI_DMA is set and then set it again is useless.
> 
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

Acked-by: Liam Girdwood <lrg@ti.com>


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

end of thread, other threads:[~2011-03-26 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1301068306-11997-1-git-send-email-w.sang@pengutronix.de>
2011-03-25 15:51 ` [PATCH 1/3] ASoC: imx: set watermarks for mx2-dma Wolfram Sang
2011-03-26 11:42   ` Liam Girdwood
2011-03-25 15:51 ` [PATCH 2/3] ASoC: imx: fix burstsize for DMA Wolfram Sang
2011-03-26 11:42   ` Liam Girdwood
2011-03-25 15:51 ` [PATCH 3/3] ASoC: imx: remove superfluous code in imx-ssi.c Wolfram Sang
2011-03-26 11:42   ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).