[alsa-devel] Non-cacheable memory to alsa ring buffer

Babu, Ramesh ramesh.babu at intel.com
Mon Jan 2 13:09:29 CET 2012


Hi

How can I allocate non-cacheable region for ring buffer?

I have an issue, where my DMA is not fetching right data from
Memory. I suspect that caching might be issue here.

I am using the below api to allocate memory:

retval = snd_pcm_lib_preallocate_pages_for_all(pcm,
                        SNDRV_DMA_TYPE_CONTINUOUS,
                        snd_dma_continuous_data(GFP_KERNEL),
                        RING_MIN_BUFFER, RING_MAX_BUFFER);

Where, RING_MIN_BUFFER = RING_MAX_BUFFER = (8*1024)

Thanks
Ramesh


More information about the Alsa-devel mailing list