diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2014-09-07 21:43:41 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-09-08 10:54:25 +0200 |
commit | df1e471966479526ae64b64d8851a89db26b30bb (patch) | |
tree | 6608122692b7a7fd212a2406440356cf5ca5c4c1 /sound/core/pcm_lib.c | |
parent | 0f519b622151339b7754d0406ddc40940063572a (diff) | |
download | linux-df1e471966479526ae64b64d8851a89db26b30bb.tar.bz2 |
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>
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r-- | sound/core/pcm_lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index 6fd5e1ce5462..b03c7ae5f4e3 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)) { |