Re: [PATCH] ALSA: usb-audio: midi2: Restart output URBs on resume

From: Takashi Iwai

Date: Mon May 04 2026 - 11:59:38 EST


On Mon, 04 May 2026 16:08:45 +0200,
Cássio Gabriel wrote:
>
> USB MIDI 2.0 suspend saves the endpoint running state, clears it and
> kills all endpoint URBs. Resume restores the running state, but only
> restarts input endpoints.
>
> For a running output endpoint, this leaves the endpoint marked running
> with an empty URB queue. Output transfer progress depends on either the
> rawmidi trigger path starting the queue or an output completion refilling
> it. After suspend there is no completion left, and output data that
> remains queued in the raw UMP or legacy rawmidi buffer can stay stalled
> until userspace happens to trigger the stream again.
>
> Restore the saved state with atomic accessors, keep input endpoints
> restarted as before, and restart output endpoints that were running before
> suspend. Clear the saved suspend state after restoring it.
>
> Fixes: ff49d1df79ae ("ALSA: usb-audio: USB MIDI 2.0 UMP support")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>

Thanks, applied now.


Takashi