[PATCH AUTOSEL 5.10 36/39] ALSA: pcm: Rewrite recalculate_boundary() to avoid costly loop