Skip to content

Commit

Permalink
ALSA: ump: Correct wrong byte size at converting a UMP System message
Browse files Browse the repository at this point in the history
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: 0b5288f ("ALSA: ump: Add legacy raw MIDI support")
Link: https://lore.kernel.org/r/20230628094352.15754-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
tiwai committed Jun 28, 2023
1 parent 33cd763 commit 4eecae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/core/ump_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4eecae4

Please sign in to comment.