All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 0/5] ALSA: pcm: snd_interval_step: fix changes of open	intervals
Date: Sun, 07 Sep 2014 21:43:41 +0200	[thread overview]
Message-ID: <540CB56D.6080708@ladisch.de> (raw)
In-Reply-To: <540CB520.50909@ladisch.de>

Changing an interval boundary to a multiple of the step size makes that
boundary exact.

Signed-off-by: Clemens Ladisch <clemens@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)) {

  parent reply	other threads:[~2014-09-07 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 19:42 [PATCH 0/5] miscellaneous patches for 3.18 Clemens Ladisch
2014-09-07 19:43 ` [PATCH 1/5] ALSA: pcm: snd_interval_step: drop the min parameter Clemens Ladisch
2014-09-07 19:43 ` Clemens Ladisch [this message]
2014-09-07 19:44 ` [PATCH 3/5] ALSA: usb-audio: add MIDI port names for the Yamaha MOTIF XF Clemens Ladisch
2014-09-07 19:45 ` [PATCH 4/5] ALSA: virtuoso: add one more headphone impedance setting Clemens Ladisch
2014-09-07 19:47 ` [PATCH 5/5] ALSA: virtuoso: add Xonar Essence STX II daughterboard support Clemens Ladisch
2014-09-08  9:00 ` [PATCH 0/5] miscellaneous patches for 3.18 Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=540CB56D.6080708@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.