ALSA: pcm: Fix negative appl_ptr handling in pcm-indirect helpers
The indirect-PCM helper codes have an implicit assumption that the
appl_ptr always increases. But the PCM core may deal with the
decrement of appl_ptr via rewind ioctls, and it may screw up the
buffer pointer management.
This patch adds the negative appl_ptr diff in transfer functions and
let returning an error instead of always accepting the appl_ptr
updates. The callers are usually PCM ack callbacks, and they pass the
error to the upper layer accordingly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing
Please register or sign in to comment