提交 df1e4719 编写于 作者: C Clemens Ladisch 提交者: Takashi Iwai

ALSA: pcm: snd_interval_step: fix changes of open intervals

Changing an interval boundary to a multiple of the step size makes that
boundary exact.
Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 0f519b62
......@@ -1120,11 +1120,13 @@ static int snd_interval_step(struct snd_interval *i, unsigned int step)
n = i->min % step;
if (n != 0 || i->openmin) {
i->min += step - n;
i->openmin = 0;
changed = 1;
}
n = i->max % step;
if (n != 0 || i->openmax) {
i->max -= n;
i->openmax = 0;
changed = 1;
}
if (snd_interval_checkempty(i)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册