Skip to content

Commit edb3277

Browse files
committed
ALSA: seq: Fix incorrect UMP type for system messages
When converting a legacy system message to a UMP packet, it forgot to modify the UMP type field but keeping the default type (either type 2 or 4). Correct to the right type for system messages. Fixes: e9e0281 ("ALSA: seq: Automatic conversion of UMP events") Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent e662c90 commit edb3277

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sound/core/seq/seq_ump_convert.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ static int system_1p_ev_to_ump_midi1(const struct snd_seq_event *event,
739739
union snd_ump_midi1_msg *data,
740740
unsigned char status)
741741
{
742+
data->system.type = UMP_MSG_TYPE_SYSTEM; // override
742743
data->system.status = status;
743744
data->system.parm1 = event->data.control.value & 0x7f;
744745
return 1;
@@ -750,6 +751,7 @@ static int system_2p_ev_to_ump_midi1(const struct snd_seq_event *event,
750751
union snd_ump_midi1_msg *data,
751752
unsigned char status)
752753
{
754+
data->system.type = UMP_MSG_TYPE_SYSTEM; // override
753755
data->system.status = status;
754756
data->system.parm1 = (event->data.control.value >> 7) & 0x7f;
755757
data->system.parm2 = event->data.control.value & 0x7f;

0 commit comments

Comments
 (0)