All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] Sound: PXA: Fix settings of PXAxxx DMA
@ 2015-01-29 10:58 Petr Cvek
  2015-01-29 11:02 ` Daniel Mack
  2015-01-29 12:45   ` Petr Cvek
  0 siblings, 2 replies; 14+ messages in thread
From: Petr Cvek @ 2015-01-29 10:58 UTC (permalink / raw)
  To: linux-arm-kernel

Fix PXA DMA autoincrementation, so capture will not use playback settings
(incrementation in register space instead in target buffer).

Signed-off-by: Petr Cvek <petr.cvek@tul.cz>
---
 sound/arm/pxa2xx-pcm-lib.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
index 01f8fdc..f8ca3ca 100644
--- a/sound/arm/pxa2xx-pcm-lib.c
+++ b/sound/arm/pxa2xx-pcm-lib.c
@@ -45,7 +45,12 @@ int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,
 	size_t period = params_period_bytes(params);
 	pxa_dma_desc *dma_desc;
 	dma_addr_t dma_buff_phys, next_desc_phys;
-	u32 dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG;
+	u32 dcmd = 0;
+
+	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+		dcmd = DCMD_INCSRCADDR | DCMD_FLOWTRG;
+	else
+		dcmd = DCMD_INCTRGADDR | DCMD_FLOWSRC;
 
 	/* temporary transition hack */
 	switch (rtd->params->addr_width) {
-- 
1.7.12.1

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

end of thread, other threads:[~2015-03-06 11:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-29 10:58 [PATCH v4] Sound: PXA: Fix settings of PXAxxx DMA Petr Cvek
2015-01-29 11:02 ` Daniel Mack
2015-01-29 11:05   ` Daniel Mack
2015-01-29 11:24     ` Mark Brown
2015-01-29 12:45 ` [RESEND PATCH " Petr Cvek
2015-01-29 12:45   ` Petr Cvek
2015-01-29 19:43   ` Robert Jarzmik
2015-01-29 19:43     ` Robert Jarzmik
2015-02-27 12:15   ` [PATCH " Petr Cvek
2015-02-27 12:15     ` Petr Cvek
2015-03-02 18:18     ` Mark Brown
2015-03-02 18:18       ` Mark Brown
2015-03-06 11:07       ` Petr Cvek
2015-03-06 11:07         ` Petr Cvek

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.