Fix PXA2xx sound DMA autoincrementation flags
Subsystems (2)
PATCH 1/1 Fix PXA2xx sound DMA autoincrementation flags
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.
--- sound/arm/pxa2xx-pcm-lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
sound/arm/pxa2xx-pcm-lib.c +0 -0
@@ -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) {Signature · 1 line
1.7.12.1
PATCH 1/1 Fix PXA2xx sound DMA autoincrementation flags
Hello.
Quoted 18 lines · Petr Cvek
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 <[email protected]>--- sound/arm/pxa2xx-pcm-lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)sound/arm/pxa2xx-pcm-lib.c +0
-0@@ -45,7 +45,13 @@ int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, size_t period = params_period_bytes(params);
sound/arm/pxa2xx-pcm-lib.c int __pxa2xx_pcm_hw_params(struct snd_pcm_substream · line 55
Quoted 10 lines
sound/arm/pxa2xx-pcm-lib.c +7
-1pxa_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
PATCH v2 1/1 Fix PXA2xx sound DMA autoincrementation flags
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.
--- sound/arm/pxa2xx-pcm-lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
sound/arm/pxa2xx-pcm-lib.c +7 -1
@@ -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) {
Signature · 1 line
1.7.12.1
PATCH v2 1/1 Fix PXA2xx sound DMA autoincrementation flags
Hello.
Quoted 15 lines · Petr Cvek
Add support for SCCB devices into PXA27x I2C controller.
Fix generated START but no STOP for message without
I2C_M_NOSTARTflag. Add support forI2C_M_IGNORE_NAKflag.Signed-off-by Petr Cvek <[email protected]>--- sound/arm/pxa2xx-pcm-lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)sound/arm/pxa2xx-pcm-lib.c +0
-0@@ -45,7 +45,13 @@ int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream,size_t period =params_period_bytes (params);
sound/arm/pxa2xx-pcm-lib.c int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, · line 54
Quoted 10 lines
sound/arm/pxa2xx-pcm-lib.c +7
-1pxa_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
PATCH v3 1/1 Fix PXA2xx sound DMA autoincrementation flags
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.
--- sound/arm/pxa2xx-pcm-lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
sound/arm/pxa2xx-pcm-lib.c +6 -1
@@ -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) {
Signature · 1 line
1.7.12.1