Re: [PATCH] ALSA: usx2y: Drain pending US-428 pipe-4 output commands

From: Takashi Iwai

Date: Tue May 19 2026 - 02:11:04 EST


On Tue, 19 May 2026 05:20:41 +0200,
Cássio Gabriel wrote:
>
> 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@xxxxxxxxx>

Applied to for-next branch. Thanks.


Takashi