Re: [PATCH] ALSA: ump: Fix corrupted data bytes at MIDI 1.0 SysEx to UMP conversion
Takashi Iwai <[email protected]>
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 08 Aug 2026 03:45:54 +0200,
HyeongJun An wrote:
>
> The cvt_legacy_sysex_to_ump() initialises only the first word of the
> output packet and ORs the data bytes into it. The second word is left
> alone, and the conversion context is kept across calls, so it still
> carries the previous packet's bytes. Those stale bits corrupt the new
> data. Any SysEx longer than six data bytes is affected.
>
> A SysEx with the twelve data bytes 01..0c comes out as:
>
> 30160102 03040506
> 30260708 0b0e0f0e
>
> The second packet declares six data bytes and four of them are wrong,
> inside the declared length.
>
> The sibling cvt_legacy_cmd_to_ump() already clears the second word. Do
> the same here.
>
> Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
> Cc: [email protected]
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: HyeongJun An <[email protected]>
Applied to for-next branch. Thanks.
Takashi