ALSA: pcm: fix delta calculation at boundary wraparound