All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix PXA2xx sound DMA autoincrementation flags
@ 2014-11-23  7:04 ` Petr Cvek
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Cvek @ 2014-11-23  7:04 UTC (permalink / raw)
  To: linux-arm-kernel

Fix for address auto-incrementation flags for DMA transmissions for 
PXA2xx sound.

Old version used playback settings for recording, so it wrongly read 
from whole register space (instead of one FIFO register) and wrote into 
single word in memory.

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

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

* [PATCH] Fix PXA2xx sound DMA autoincrementation flags
@ 2014-11-23  7:04 ` Petr Cvek
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Cvek @ 2014-11-23  7:04 UTC (permalink / raw)
  To: linux-arm-kernel

Fix for address auto-incrementation flags for DMA transmissions for 
PXA2xx sound.

Old version used playback settings for recording, so it wrongly read 
from whole register space (instead of one FIFO register) and wrote into 
single word in memory.

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


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

* [PATCH] Fix PXA2xx sound DMA autoincrementation flags
  2014-11-23  7:04 ` Petr Cvek
@ 2014-11-23 16:26   ` Sergei Shtylyov
  -1 siblings, 0 replies; 10+ messages in thread
From: Sergei Shtylyov @ 2014-11-23 16:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 11/23/2014 10:04 AM, Petr Cvek wrote:

> Fix for address auto-incrementation flags for DMA transmissions for PXA2xx sound.

> Old version used playback settings for recording, so it wrongly read from
> whole register space (instead of one FIFO register) and wrote into single word
> in memory.

> 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;
> +    }
[...]

    Your patch has all tabs replaced by spaces, so can't be applied.

WBR, Sergei

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

* Re: [PATCH] Fix PXA2xx sound DMA autoincrementation flags
@ 2014-11-23 16:26   ` Sergei Shtylyov
  0 siblings, 0 replies; 10+ messages in thread
From: Sergei Shtylyov @ 2014-11-23 16:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 11/23/2014 10:04 AM, Petr Cvek wrote:

> Fix for address auto-incrementation flags for DMA transmissions for PXA2xx sound.

> Old version used playback settings for recording, so it wrongly read from
> whole register space (instead of one FIFO register) and wrote into single word
> in memory.

> 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;
> +    }
[...]

    Your patch has all tabs replaced by spaces, so can't be applied.

WBR, Sergei


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

* [PATCH v2] Fix PXA2xx sound DMA autoincrementation flags
  2014-11-23 16:26   ` Sergei Shtylyov
@ 2014-11-23 22:31     ` Petr Cvek
  -1 siblings, 0 replies; 10+ messages in thread
From: Petr Cvek @ 2014-11-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

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

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

* Re: [PATCH v2] Fix PXA2xx sound DMA autoincrementation flags
@ 2014-11-23 22:31     ` Petr Cvek
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Cvek @ 2014-11-23 22:31 UTC (permalink / raw)
  To: linux-arm-kernel

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



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

* [PATCH v2] Fix PXA2xx sound DMA autoincrementation flags
  2014-11-23 22:31     ` Petr Cvek
@ 2014-11-24 11:50       ` Sergei Shtylyov
  -1 siblings, 0 replies; 10+ messages in thread
From: Sergei Shtylyov @ 2014-11-24 11:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 11/24/2014 1:31 AM, Petr Cvek wrote:

> 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;
> +	}

    {} not needed at all here. Sorry for not complaining at once...

WBR, Sergei

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

* Re: [PATCH v2] Fix PXA2xx sound DMA autoincrementation flags
@ 2014-11-24 11:50       ` Sergei Shtylyov
  0 siblings, 0 replies; 10+ messages in thread
From: Sergei Shtylyov @ 2014-11-24 11:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 11/24/2014 1:31 AM, Petr Cvek wrote:

> 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;
> +	}

    {} not needed at all here. Sorry for not complaining at once...

WBR, Sergei


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

* [PATCH v3] Fix PXA2xx sound DMA autoincrementation flags
  2014-11-24 11:50       ` Sergei Shtylyov
@ 2014-11-24 21:19         ` Petr Cvek
  -1 siblings, 0 replies; 10+ messages in thread
From: Petr Cvek @ 2014-11-24 21:19 UTC (permalink / raw)
  To: linux-arm-kernel

Fix for address auto-incrementation flags for DMA transmissions for PXA2xx sound.

Old version used playback settings for recording, so it wrongly read from whole register space (instead of one FIFO register) and wrote into single word in memory.

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 a61d7a9..755f947 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] 10+ messages in thread

* Re: [PATCH v3] Fix PXA2xx sound DMA autoincrementation flags
@ 2014-11-24 21:19         ` Petr Cvek
  0 siblings, 0 replies; 10+ messages in thread
From: Petr Cvek @ 2014-11-24 21:19 UTC (permalink / raw)
  To: linux-arm-kernel

Fix for address auto-incrementation flags for DMA transmissions for PXA2xx sound.

Old version used playback settings for recording, so it wrongly read from whole register space (instead of one FIFO register) and wrote into single word in memory.

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 a61d7a9..755f947 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] 10+ messages in thread

end of thread, other threads:[~2014-11-24 21:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [PATCH v2] " Petr Cvek
2014-11-23 22:31     ` 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

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.