[alsa-devel] mapping externally allocated Scatter Gather DMA buffers

Jaroslav Kysela perex at perex.cz
Tue Oct 26 09:24:39 CEST 2010

On Tue, 26 Oct 2010, Manu Abraham wrote:

> Hi,
> I have been wondering how to interface a Scatter Gather region as a DMA
> buffer for an Audio Grabbing device.
> The device is a NOC type device, similar to a SOC, the audio grabber is a
> part of it, for realizing the audio
> capabilities on the device.
> The hardware DMA is mostly a Scatter Gather based engine, and it can be
> described thus, briefly.

Use snd_pcm_lib_preallocate_pages_for_all() - type SNDRV_DMA_TYPE_DEV_SG 
and snd_pcm_sgbuf_* routines. Check hda_intel.c source for more details.


Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.

More information about the Alsa-devel mailing list