]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: pcm_ioplug - fix the avail_update mmap capture copy issue
authorJaroslav Kysela <perex@perex.cz>
Thu, 21 Jan 2021 14:45:49 +0000 (15:45 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 27 Jan 2021 10:39:15 +0000 (11:39 +0100)
commit00eafe98eebff8ecd1ecdc58470068bfd610cc8d
treebf447476c047175efbec56941689e4d7b2c53625
parent55d59821ffb8f44395cf2b7a424d6523da58e66a
pcm: pcm_ioplug - fix the avail_update mmap capture copy issue

It seems that the commit "pcm: ioplug: Transfer all available data"
introduced new regressions (wrong memory access). The second issue
is that the avail_update in ioplug does not move appl_ptr nor hw_ptr,
so it's possible that the transfers may be repetitive.

This patch moves the transfer calls to mmap_begin callback where it
should be. The pointer wraps are handled by design now.

Fixes: 1714332719 ("pcm: ioplug: Transfer all available data")
BugLink: https://github.com/alsa-project/alsa-lib/pull/103
Tested-by: Andreas Pape <apape@de.adit-jv.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm.c
src/pcm/pcm_ioplug.c
src/pcm/pcm_local.h