[alsa-devel] [PATCH 0/5] ALSA: pcm: snd_interval_step: fix changes of open intervals
Clemens Ladisch
clemens at ladisch.de
Sun Sep 7 21:43:41 CEST 2014
Changing an interval boundary to a multiple of the step size makes that
boundary exact.
Signed-off-by: Clemens Ladisch <clemens at ladisch.de>
---
sound/core/pcm_lib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 6fd5e1c..b03c7ae 100644
--- a/sound/core/pcm_lib.c
+++ b/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)) {
More information about the Alsa-devel
mailing list