Re: [PATCH] ALSA: pcm: Fix incorrect numerator selection in snd_interval_ratden()

From: Takashi Iwai

Date: Fri Nov 20 2026 - 12:04:24 EST


On Fri, 20 Nov 2026 12:36:32 +0100,
Sreeraj S Kurup wrote:
>
> When the calculated numerator is smaller than num_min, the
> function incorrectly sets it to num_max instead of num_min.
>
> This can produce an invalid interval by making the calculated
> minimum numerator larger than the maximum numerator, even when
> a valid range exists.
>
> Set the numerator to num_min when it falls below the minimum
> allowed value. This allows the function to calculate the correct
> lower bound and prevents valid intervals from being rejected.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@xxxxxxxxx>

Applied to for-next branch. Thanks.


Takashi