[alsa-devel] Allocating DMA buffer for non-PCM
clemens at ladisch.de
Thu Feb 14 18:46:30 CET 2013
Adrian Knoth wrote:
> Would you say that the following is the proper way to allocate a DMA
> buffer used to hold level data?
> err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV_SG,
> MADIFX_LEVEL_BUFFER_SIZE, &hdspm->dmaLevelBuffer);
> hdspm->level_buffer = snd_sgbuf_get_ptr(&(hdspm->dmaLevelBuffer), 0);
I don't see the code asking for the address of the second page, so I
guess there isn't one. But then you don't need SG in the first place.
> Better use SNDRV_DMA_TYPE_DEV instead?
More information about the Alsa-devel