[PATCH 6.6 134/587] ALSA: pcm: Rewrite recalculate_boundary() to avoid costly loop