Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559220 > unrolled thread

[PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic

Started byNicolas Iooss <nicolas.iooss_linux@m4x.org>
First post2017-01-15 13:50 +0100
Last post2017-01-15 20:20 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic Nicolas Iooss <nicolas.iooss_linux@m4x.org> - 2017-01-15 13:50 +0100
    Re: [alsa-devel] [PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction  enum when calling dmaengine_prep_dma_cyclic Fabio Estevam <festevam@gmail.com> - 2017-01-15 14:30 +0100
    Re: [PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when  calling dmaengine_prep_dma_cyclic Nicolin Chen <nicoleotsuka@gmail.com> - 2017-01-15 20:20 +0100

#1559220 — [PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic

FromNicolas Iooss <nicolas.iooss_linux@m4x.org>
Date2017-01-15 13:50 +0100
Subject[PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic
Message-ID<sZSpX-2zL-9@gated-at.bofh.it>
When fsl_asrc_dma_prepare_and_submit() calls
dmaengine_prep_dma_cyclic(), it uses either DMA_TO_DEVICE or
DMA_FROM_DEVICE. These values are both items of dma_data_direction enum,
not of dma_data_direction enum, which is the type expected by
dmaengine_prep_dma_cyclic().

Replace DMA_TO_DEVICE with DMA_MEM_TO_DEV and DMA_FROM_DEVICE with
DMA_DEV_TO_MEM to fix this type mismatch issue.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
 sound/soc/fsl/fsl_asrc_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c
index dc30d780f874..282d841840b1 100644
--- a/sound/soc/fsl/fsl_asrc_dma.c
+++ b/sound/soc/fsl/fsl_asrc_dma.c
@@ -76,7 +76,7 @@ static int fsl_asrc_dma_prepare_and_submit(struct snd_pcm_substream *substream)
 			pair->dma_chan[!dir], runtime->dma_addr,
 			snd_pcm_lib_buffer_bytes(substream),
 			snd_pcm_lib_period_bytes(substream),
-			dir == OUT ? DMA_TO_DEVICE : DMA_FROM_DEVICE, flags);
+			dir == OUT ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM, flags);
 	if (!pair->desc[!dir]) {
 		dev_err(dev, "failed to prepare slave DMA for Front-End\n");
 		return -ENOMEM;
-- 
2.11.0

[toc] | [next] | [standalone]


#1559232 — Re: [alsa-devel] [PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic

FromFabio Estevam <festevam@gmail.com>
Date2017-01-15 14:30 +0100
SubjectRe: [alsa-devel] [PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic
Message-ID<sZT2G-31B-21@gated-at.bofh.it>
In reply to#1559220
On Sun, Jan 15, 2017 at 10:43 AM, Nicolas Iooss
<nicolas.iooss_linux@m4x.org> wrote:
> When fsl_asrc_dma_prepare_and_submit() calls
> dmaengine_prep_dma_cyclic(), it uses either DMA_TO_DEVICE or
> DMA_FROM_DEVICE. These values are both items of dma_data_direction enum,
> not of dma_data_direction enum, which is the type expected by
> dmaengine_prep_dma_cyclic().
>
> Replace DMA_TO_DEVICE with DMA_MEM_TO_DEV and DMA_FROM_DEVICE with
> DMA_DEV_TO_MEM to fix this type mismatch issue.
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

[toc] | [prev] | [next] | [standalone]


#1559329 — Re: [PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic

FromNicolin Chen <nicoleotsuka@gmail.com>
Date2017-01-15 20:20 +0100
SubjectRe: [PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic
Message-ID<sZYvo-6jp-17@gated-at.bofh.it>
In reply to#1559220
On Sun, Jan 15, 2017 at 01:43:31PM +0100, Nicolas Iooss wrote:
> When fsl_asrc_dma_prepare_and_submit() calls
> dmaengine_prep_dma_cyclic(), it uses either DMA_TO_DEVICE or
> DMA_FROM_DEVICE. These values are both items of dma_data_direction enum,
> not of dma_data_direction enum, which is the type expected by
> dmaengine_prep_dma_cyclic().
> 
> Replace DMA_TO_DEVICE with DMA_MEM_TO_DEV and DMA_FROM_DEVICE with
> DMA_DEV_TO_MEM to fix this type mismatch issue.
> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

Thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web