public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Cássio Gabriel" <cassiogabrielcontato@gmail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: rotate standard MIDI output port scan
Date: Fri, 27 Mar 2026 12:45:10 +0100	[thread overview]
Message-ID: <87o6k9qywp.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260323-usbmidi-port-fairness-v1-1-2d68e97592a1@gmail.com>

On Mon, 23 Mar 2026 14:46:24 +0100,
Cássio Gabriel wrote:
> 
> snd_usbmidi_standard_output() iterates output ports in ascending order
> and drains each active port until the URB is full. On interfaces where
> multiple USB-MIDI cables share one endpoint, sustained traffic on a
> lower-numbered port can consume every refill before higher-numbered
> ports are even examined.
> 
> That behavior dates back to the original implementation and still
> applies with the current multi-URB output path. snd_usbmidi_do_output()
> can refill several idle URBs in one pass, but each refill restarts the
> scan at port 0, so a busy lower-numbered port can keep higher-numbered
> ports from making progress at all.
> 
> Use ep->current_port as the starting point of the scan and advance it
> after each URB fill. This keeps the existing packet formatting and
> per-port state handling intact while preventing persistent starvation of
> higher-numbered ports.
> 
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>

Looks like a nice logical improvement.

Applied to for-next branch now.  Thanks.


Takashi

      reply	other threads:[~2026-03-27 11:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 13:46 [PATCH] ALSA: usb-audio: rotate standard MIDI output port scan Cássio Gabriel
2026-03-27 11:45 ` Takashi Iwai [this message]

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=87o6k9qywp.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=cassiogabrielcontato@gmail.com \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox