All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Cvek <petr.cvek@tul.cz>
To: Mark Brown <broonie@kernel.org>, alsa-devel@alsa-project.org
Cc: linux-arm-kernel@lists.infradead.org, robert.jarzmik@free.fr,
	haojian.zhuang@gmail.com, daniel@zonque.org, lgirdwood@gmail.com
Subject: Re: [PATCH v4] Sound: PXA: Fix settings of PXAxxx DMA
Date: Fri, 06 Mar 2015 12:07:08 +0100	[thread overview]
Message-ID: <54F98A5C.5040507@tul.cz> (raw)
In-Reply-To: <20150302181803.GC21293@sirena.org.uk>

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

Regression from:
  'commit d65a14587a9be853a887a1407db133df1fb68e29 ("ASoC: pxa: use snd_dmaengine_dai_dma_data")'

Signed-off-by: Petr Cvek <petr.cvek@tul.cz>
Acked-by: Daniel Mack <daniel@zonque.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 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 

WARNING: multiple messages have this Message-ID (diff)
From: petr.cvek@tul.cz (Petr Cvek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] Sound: PXA: Fix settings of PXAxxx DMA
Date: Fri, 06 Mar 2015 12:07:08 +0100	[thread overview]
Message-ID: <54F98A5C.5040507@tul.cz> (raw)
In-Reply-To: <20150302181803.GC21293@sirena.org.uk>

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

Regression from:
  'commit d65a14587a9be853a887a1407db133df1fb68e29 ("ASoC: pxa: use snd_dmaengine_dai_dma_data")'

Signed-off-by: Petr Cvek <petr.cvek@tul.cz>
Acked-by: Daniel Mack <daniel@zonque.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 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 

  reply	other threads:[~2015-03-06 11:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-03-06 11:07         ` Petr Cvek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F98A5C.5040507@tul.cz \
    --to=petr.cvek@tul.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.