Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 96295812 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 6dbaf8b9
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