Skip to content
Commit 9066ae7f authored by Stefan Roese's avatar Stefan Roese Committed by Takashi Iwai
Browse files

ALSA: pcm: Use dma_bytes as size parameter in dma_mmap_coherent()

When trying to use the driver (e.g. aplay *.wav), the 4MiB DMA buffer
will get mmapp'ed in 16KiB chunks. But this fails with the 2nd 16KiB
area, as the page offset is outside of the VMA range (size), which is
currently used as size parameter in snd_pcm_lib_default_mmap(). By
using the DMA buffer size (dma_bytes) instead, the complete DMA buffer
can be mmapp'ed and the issue is fixed.

This issue was detected on an ARM platform (TI AM57xx) using the RME
HDSP MADI PCIe soundcard.

Fixes: 657b1989

 ("ALSA: pcm - Use dma_mmap_coherent() if available")
Signed-off-by: default avatarStefan Roese <sr@denx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b0021486
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment