[PATCH 6.12 156/444] ALSA: pcm: Rewrite recalculate_boundary() to avoid costly loop