All of lore.kernel.org
 help / color / mirror / Atom feed
From: petr.cvek@tul.cz (Petr Cvek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] Fix PXA2xx sound DMA autoincrementation flags
Date: Sun, 23 Nov 2014 23:31:59 +0100	[thread overview]
Message-ID: <5472605F.4030702@tul.cz> (raw)
In-Reply-To: <54720ACA.2070506@cogentembedded.com>

Add support for SCCB devices into PXA27x I2C controller.

Fix generated START but no STOP for message without I2C_M_NOSTART flag. Add support for I2C_M_IGNORE_NAK flag.

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

diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
index a61d7a9..5d3a415 100644
--- a/sound/arm/pxa2xx-pcm-lib.c
+++ b/sound/arm/pxa2xx-pcm-lib.c
@@ -45,7 +45,13 @@ 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 <petr.cvek@tul.cz>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] Fix PXA2xx sound DMA autoincrementation flags
Date: Sun, 23 Nov 2014 22:31:59 +0000	[thread overview]
Message-ID: <5472605F.4030702@tul.cz> (raw)
In-Reply-To: <54720ACA.2070506@cogentembedded.com>

Add support for SCCB devices into PXA27x I2C controller.

Fix generated START but no STOP for message without I2C_M_NOSTART flag. Add support for I2C_M_IGNORE_NAK flag.

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

diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c
index a61d7a9..5d3a415 100644
--- a/sound/arm/pxa2xx-pcm-lib.c
+++ b/sound/arm/pxa2xx-pcm-lib.c
@@ -45,7 +45,13 @@ 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:[~2014-11-23 22:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-23  7:04 [PATCH] Fix PXA2xx sound DMA autoincrementation flags Petr Cvek
2014-11-23  7:04 ` Petr Cvek
2014-11-23 16:26 ` Sergei Shtylyov
2014-11-23 16:26   ` Sergei Shtylyov
2014-11-23 22:31   ` Petr Cvek [this message]
2014-11-23 22:31     ` [PATCH v2] " Petr Cvek
2014-11-24 11:50     ` Sergei Shtylyov
2014-11-24 11:50       ` Sergei Shtylyov
2014-11-24 21:19       ` [PATCH v3] " Petr Cvek
2014-11-24 21:19         ` 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=5472605F.4030702@tul.cz \
    --to=petr.cvek@tul.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.