Allocation Parameters _DEV & _CONTINUOUS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SNDRV_DMA_TYPE_DEV and SNDRV_DMA_TYPE_CONTINUOUS are two options for the preallocation of the buffer.

The ALSA help and Docs are a little vague on this. Can I get a rephrase of when to use one vs the other?

Here's my digging in the source code and a first pass guess.....

Looks like _CONTINUOUS simply grabs a page of continuous memory and passes the page back to the user. This assumes no outside force is writing into without the Cache Controller's knowledge.

_DEV is for an outside DMA which might be writing direct to DDR, which won't update the dirty/invalid bits in the cachelines? It calls dma_alloc_coherent, which can support both hardware and software coherency. If the memory is marked as HW coherent, then no cache operations take place, as the HW handles it, and if the memory isn't marked as coherent, the CPU knows to always treat the buffer as non-cached (or maybe dirty/invalid on all applicable cachelines)?

Can someone please shed some more light for me?

Thanks!
Rob
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux