瀏覽代碼

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: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch 11 年之前
父節點
當前提交
df1e471966
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      sound/core/pcm_lib.c

+ 2 - 0
sound/core/pcm_lib.c

@@ -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)) {