diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-05-31 10:51:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-12 12:39:57 +0300 |
commit | ac54c155b76d304c59044deef74d8614578dc576 (patch) | |
tree | bb2e5377c5c3b7cb554fbc649353b0b1bc42ad30 | |
parent | 0c1f28c32a194303da630fca89481334b9547b80 (diff) | |
download | linux-ac54c155b76d304c59044deef74d8614578dc576.tar.xz |
ALSA: seq: ump: Fix swapped song position pointer data
[ Upstream commit 310fa3ec2859f1c094e6e9b5d2e1ca51738c409a ]
At converting between the legacy event and UMP, the parameters for
MIDI Song Position Pointer are incorrectly stored. It should have
been LSB -> MSB order while it stored in MSB -> LSB order.
This patch corrects the ordering.
Fixes: e9e02819a98a ("ALSA: seq: Automatic conversion of UMP events")
Link: https://lore.kernel.org/r/20240531075110.3250-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | sound/core/seq/seq_ump_convert.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/seq/seq_ump_convert.c b/sound/core/seq/seq_ump_convert.c index 903a644b80e2..9bfba69b2a70 100644 --- a/sound/core/seq/seq_ump_convert.c +++ b/sound/core/seq/seq_ump_convert.c @@ -157,7 +157,7 @@ static void ump_system_to_one_param_ev(const union snd_ump_midi1_msg *val, static void ump_system_to_songpos_ev(const union snd_ump_midi1_msg *val, struct snd_seq_event *ev) { - ev->data.control.value = (val->system.parm1 << 7) | val->system.parm2; + ev->data.control.value = (val->system.parm2 << 7) | val->system.parm1; } /* Encoders for 0xf0 - 0xff */ @@ -752,8 +752,8 @@ static int system_2p_ev_to_ump_midi1(const struct snd_seq_event *event, unsigned char status) { data->system.status = status; - data->system.parm1 = (event->data.control.value >> 7) & 0x7f; - data->system.parm2 = event->data.control.value & 0x7f; + data->system.parm1 = event->data.control.value & 0x7f; + data->system.parm2 = (event->data.control.value >> 7) & 0x7f; return 1; } |