]> git.ipfire.org Git - thirdparty/linux.git/commit
ALSA: usx2y: Drain pending US-428 pipe-4 output commands
authorCássio Gabriel <cassiogabrielcontato@gmail.com>
Tue, 19 May 2026 03:20:41 +0000 (00:20 -0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 19 May 2026 06:09:36 +0000 (08:09 +0200)
commit18977c0dd722f52217027ff75de2811c53cce2cc
treed3d91d1a35375fd13f83e5ffd3d98b931e35663c
parent0c09413bde6ffa07b4b91a660fb6393dfdead82a
ALSA: usx2y: Drain pending US-428 pipe-4 output commands

The US-428 pipe-4 output path submits at most one pending p4out
entry from the shared-memory ring per input interrupt. If userspace
queues more than one command before the interrupt handler runs, later
commands remain pending until later input interrupts, even when async
pipe-4 URBs are available.

Drain pending entries while idle async URBs are available. Copy each
command into the existing per-URB async buffer before submission, so the
submitted transfer does not depend on a userspace-mapped ring slot
remaining unchanged after p4out_sent is advanced.

Also update p4out_sent only after usb_submit_urb() succeeds, so a
failed submission is not reported as sent.

This keeps the shared-memory ABI unchanged and fixes only the local
queue-draining behavior.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260519-alsa-usx2y-p4out-drain-v1-1-8f0a4550bae2@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/usx2y/usbusx2y.c