[alsa-devel] [PATCH 0/7] extract a simple dmaengine library from shdma.c
This patch series has been triggered by a recent series by Shimoda-san http://www.spinics.net/lists/linux-sh/index.html#09895 In a follow up to that thread it has been decided to extract a common library from the current shdma driver to be re-used by other dmaengine drivers. Primarily this library provides a flexible transfer descriptor management for hardware, that does not dupport scatter-gather lists natively. In such cases this library can be used to split transfer requests into smaller chunks, up to the size, supported by the specific hardware, enter them onto a linked list, thack their completion and call user callbacks. This is a first shot, aimed to be used by the SUDMAC driver. Once it is confirmed, that this version can be conveniently used with it, I'll do some cosmetic clean up, notably, add / improve documentation:-)
Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/
Signed-off-by: Guennadi Liakhovetski g.liakhovetski@gmx.de --- sound/soc/sh/siu_pcm.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index f8f6816..6390fec 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c @@ -330,12 +330,12 @@ static bool filter(struct dma_chan *chan, void *slave) { struct sh_dmae_slave *param = slave;
- pr_debug("%s: slave ID %d\n", __func__, param->slave_id); + pr_debug("%s: slave ID %d\n", __func__, param->simple_slave.slave_id);
if (unlikely(param->dma_dev != chan->device->dev)) return false;
- chan->private = param; + chan->private = ¶m->simple_slave; return true; }
@@ -360,12 +360,12 @@ static int siu_pcm_open(struct snd_pcm_substream *ss) if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) { siu_stream = &port_info->playback; param = &siu_stream->param; - param->slave_id = port ? pdata->dma_slave_tx_b : + param->simple_slave.slave_id = port ? pdata->dma_slave_tx_b : pdata->dma_slave_tx_a; } else { siu_stream = &port_info->capture; param = &siu_stream->param; - param->slave_id = port ? pdata->dma_slave_rx_b : + param->simple_slave.slave_id = port ? pdata->dma_slave_rx_b : pdata->dma_slave_rx_a; }
participants (1)
-
Guennadi Liakhovetski