Skip to contentSkip to conversation

ASoC: follow the updated samsung DMA common operations

PATCH In review Boojin Kim 3 participants 4 messages Jun 5, 2012 – Jun 19, 2012

Subsystems (5)
Sound ASoC SPI Arm Samsung Exynos +1 more subsystems
lore
Share & tools
lore

Boojin Kim

author
#0 lore raw

PATCH 3/3 ASoC: follow the updated samsung DMA common operations

This patch uses config() function to configure DMA transmit options.

---
 sound/soc/samsung/dma.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)
sound/soc/samsung/dma.c +10 -8
index ddc6cde..f3ebc38 100644
@@ -74,7 +74,7 @@ static void dma_enqueue(struct snd_pcm_substream *substream)
 	struct runtime_data *prtd = substream->runtime->private_data;
 	dma_addr_t pos = prtd->dma_pos;
 	unsigned int limit;
-	struct samsung_dma_prep_info dma_info;
+	struct samsung_dma_prep dma_info;
 
 	pr_debug("Entered %s\n", __func__);
 
@@ -146,7 +146,8 @@ static int dma_hw_params(struct snd_pcm_substream *substream,
 	unsigned long totbytes = params_buffer_bytes(params);
 	struct s3c_dma_params *dma =
 		snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
-	struct samsung_dma_info dma_info;
+	struct samsung_dma_req req;
+	struct samsung_dma_config config;
 
 	pr_debug("Entered %s\n", __func__);
 
@@ -166,16 +167,17 @@ static int dma_hw_params(struct snd_pcm_substream *substream,
 
 		prtd->params->ops = samsung_dma_get_ops();
 
-		dma_info.cap = (samsung_dma_has_circular() ?
+		req.cap = (samsung_dma_has_circular() ?
 			DMA_CYCLIC : DMA_SLAVE);
-		dma_info.client = prtd->params->client;
-		dma_info.direction =
+		req.client = prtd->params->client;
+		config.direction =
 			(substream->stream == SNDRV_PCM_STREAM_PLAYBACK
 			? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM);
-		dma_info.width = prtd->params->dma_size;
-		dma_info.fifo = prtd->params->dma_addr;
+		config.width = prtd->params->dma_size;
+		config.fifo = prtd->params->dma_addr;
 		prtd->params->ch = prtd->params->ops->request(
-				prtd->params->channel, &dma_info);
+				prtd->params->channel, &req);
+		prtd->params->ops->config(prtd->params->ch, &config);
 	}
 
 	snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);

--
1.7.1

Acked-by on v1 3/3
#1 lore raw
Quoted 1 line · Boojin Kim

This patch uses config() function to configure DMA transmit options.

It'd be good if we could get all the older Samsung platforms moved over
to dmaengine...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120608/bd3be1c9/attachment.sig>

author
#2 lore raw

Mark Brown wrote

Quoted 5 lines
Quoted 1 line

This patch uses config() function to configure DMA transmit options.

It'd be good if we could get all the older Samsung platforms moved over to dmaengine...

Thanks for your ack :)
And, Our engineer's preparing to move the older Samsung dma driver into dmaengine.

#3 lore raw
Quoted 6 lines · Boojin Kim

Mark Brown wrote

Quoted 4 lines
Quoted 1 line

This patch uses config() function to configure DMA transmit options.

Thanks for your ack and let me pick this up in Samsung tree.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.

Quoted 5 lines
Quoted 1 line

It'd be good if we could get all the older Samsung platforms moved over

to dmaengine...
Thanks for your ack :)
And, Our engineer's preparing to move the older Samsung dma driver into dmaengine.