Skip to content
  • Takashi Iwai's avatar
    ALSA: pcm: Skip ack callback without actual appl_ptr update · f8ff2f28
    Takashi Iwai authored
    
    
    We call ack callback whenever appl_ptr gets updated via
    pcm_lib_apply_appl_ptr().  There are various code paths to call this
    function.  A part of them are for read/write/forward/rewind, where the
    appl_ptr is always changed and thus the call of ack is mandatory.
    OTOH, another part of code paths are from the explicit user call,
    e.g. via SYNC_PTR ioctl.  There, we may receive the same appl_ptr
    value, and in such a case, calling ack is obviously superfluous.
    
    This patch adds the check of the given appl_ptr value, and returns
    immediately if it's no real update.
    
    Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    f8ff2f28