[PATCH 6.15 184/515] ALSA: pcm: Rewrite recalculate_boundary() to avoid costly loop