[PATCH 6.16 200/570] ALSA: pcm: Rewrite recalculate_boundary() to avoid costly loop