On Fri, 2009-07-10 at 19:16 +0100, Russell King wrote: > On Fri, Jul 10, 2009 at 03:11:29PM +0000, James Bottomley wrote: > > The design of coherent memory was for memory based device mailboxes > > managed by the kernel ... trying to give userspace coherent access to > > the same mailbox is problematic because it gives a direct way for the > > process to interfere with a device function ... shouldn't whatever > > you're trying to do be better accomplished by using an API to control > > the device and keeping the coherent mailbox fully in the kernel address > > space? > > As far as sound DMA goes, it's not about mailboxes. It's about a circular > buffer which you want the device to DMA from direct to/from the DAC/ADC > and have the application write/read data directly to/from that same > buffer. But that makes it sound like ordinary streaming DMA from a device to user space ... that's what the dma_map_xx APIs are already designed to handle: I don't understand why you need coherent memory for this (which can be a scarce resource on some platforms). > Without this, you end up having to copy the sound data - at something > around 200KB/s from applications into a driver managed buffer, which is > quite an unnecessary overhead for the CPU. Why? The dma_map_xx API is designed to be zero copy. James -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html