Skip to content
  • Takashi Iwai's avatar
    ALSA: pcm: Fix negative appl_ptr handling in pcm-indirect helpers · 96295812
    Takashi Iwai authored
    
    
    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>
    96295812