mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
ALSA: seq: ump: Fix swapped song position pointer data
[ Upstream commit310fa3ec28
] 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:e9e02819a9
("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>
This commit is contained in:
parent
0c1f28c32a
commit
ac54c155b7
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue