[PATCH 6.1 109/482] ALSA: pcm: Rewrite recalculate_boundary() to avoid costly loop