]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: ioplug: Use boundary for wrap around
authorTimo Wischer <twischer@de.adit-jv.com>
Fri, 23 Feb 2018 09:28:51 +0000 (10:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 24 Feb 2018 10:41:22 +0000 (11:41 +0100)
commit543a9eac5d857c5a629e81c37d97102de537516a
treed518c919164a83f9b22476ee9cb2e653d7be9376
parentaf531606b73634b56ec0ec73fbea8297a7752172
pcm: ioplug: Use boundary for wrap around

if requested by the IO plugin

Without this changes an IO plugin is not able to report
that buffer_size frames were read from the buffer.
When the buffer was full this is a valid action and
has not to be handled as an under run.

For example when the hw_ptr will be updated with
hw_ptr += buffer_size
and it is using the buffer_size as wrap around
hw_ptr %= buffer_size
would result in the same value as before the add operation.

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/pcm_ioplug.h
src/pcm/pcm_ioplug.c