Skip to contentSkip to conversation

ALSA: ump: Correct wrong byte size at converting a UMP System message

PATCH New Takashi Iwai 1 participant 1 message Jun 28, 2023 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: ump: Correct wrong byte size at converting a UMP System message

A wrong size for UMP_SYSTEM_STATUS_MIDI_TIME_CODE and case UMP_SYSTEM_STATUS_SONG_SELECT was reported at converting to the legacy MIDI 1.0 stream. This patch corrects the value.

Fixes 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
---
 sound/core/ump_convert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/ump_convert.c +1 -1
index fb61df424a87..de04799fdb69 100644
@@ -73,7 +73,7 @@ static int cvt_ump_system_to_legacy(u32 data, unsigned char *buf)
 	case UMP_SYSTEM_STATUS_MIDI_TIME_CODE:
 	case UMP_SYSTEM_STATUS_SONG_SELECT:
 		buf[1] = (data >> 8) & 0x7f;
-		return 1;
+		return 2;
 	case UMP_SYSTEM_STATUS_SONG_POSITION:
 		buf[1] = (data >> 8) & 0x7f;
 		buf[2] = data & 0x7f;
Signature · 1 line
2.35.3