On Tue, 2008-05-06 at 13:31 +0200, Takashi Iwai wrote:
quoted
I don't think we can easily update the DMA API at this stage. What
we
quoted
could do is provide a way to retrieve the struct page array from the
result of dma_alloc_coherent...
In most cases, it can be obtained via pfn_to_page(), I suppose. But,
it's definitely arch-specific thingy, and a generic solution would be
really appreciated.
You can't get a pfn out of the result of dma_alloc_coherent on
non-coherent powerpc at least. It's a virtual mapping created from the
underlying pages set to be non-cacheable. virt_to_* will do no good.
Alternatively, we can change the ALSA PCM core code that accesses the
virtual linear buffer and handles SG-buffers as they are. Maybe it'll
give a bit more useful clean-up in the whole memory-management codes
in ALSA in the end.
I need to get my head around what the exact usage in Alsa is, and it's a
bit too late for me to thing right now :-)
Ben.