]> git.baikalelectronics.ru Git - kernel.git/commit
staging: bcm2835-audio: Use coherent device buffers
authorTakashi Iwai <tiwai@suse.de>
Tue, 4 Sep 2018 15:58:54 +0000 (17:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2018 09:15:00 +0000 (11:15 +0200)
commitb7a0a0a43350e2a100cdb96e515b204d9e6d3bb6
tree1cce16a4cdb00b0c1f1449377946061976227128
parent97087e36e5783a611f75de81dba5fb5569d70ea7
staging: bcm2835-audio: Use coherent device buffers

The memory access to the pages allocated with
SNDRV_DMA_TYPE_CONTINUOUS are basically non-coherent, and it becomes a
problem when a process accesses via mmap.

For the more consistent access, use the device coherent memory, just
by replacing the call pattern in the allocator helpers.

The only point we need to be careful for is the device object passed
there; since bcm2835-audio driver creates fake devices and each card
is created on top of that, we need to pass its parent device as the
real device object.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c