mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-16 22:29:37 +02:00
ALSA: seq: Fix missing channel at encoding RPN/NRPN MIDI2 messages
[ Upstream commitc5ab94ea28
] The conversion from the legacy event to MIDI2 UMP for RPN and NRPN missed the setup of the channel number, resulting in always the channel 0. Fix it. Fixes:e9e02819a9
("ALSA: seq: Automatic conversion of UMP events") Link: https://patch.msgid.link/20240625095200.25745-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
fdae4d139f
commit
f981ca3fcf
|
@ -791,7 +791,8 @@ static int paf_ev_to_ump_midi2(const struct snd_seq_event *event,
|
||||||
|
|
||||||
/* set up the MIDI2 RPN/NRPN packet data from the parsed info */
|
/* set up the MIDI2 RPN/NRPN packet data from the parsed info */
|
||||||
static void fill_rpn(struct snd_seq_ump_midi2_bank *cc,
|
static void fill_rpn(struct snd_seq_ump_midi2_bank *cc,
|
||||||
union snd_ump_midi2_msg *data)
|
union snd_ump_midi2_msg *data,
|
||||||
|
unsigned char channel)
|
||||||
{
|
{
|
||||||
if (cc->rpn_set) {
|
if (cc->rpn_set) {
|
||||||
data->rpn.status = UMP_MSG_STATUS_RPN;
|
data->rpn.status = UMP_MSG_STATUS_RPN;
|
||||||
|
@ -808,6 +809,7 @@ static void fill_rpn(struct snd_seq_ump_midi2_bank *cc,
|
||||||
}
|
}
|
||||||
data->rpn.data = upscale_14_to_32bit((cc->cc_data_msb << 7) |
|
data->rpn.data = upscale_14_to_32bit((cc->cc_data_msb << 7) |
|
||||||
cc->cc_data_lsb);
|
cc->cc_data_lsb);
|
||||||
|
data->rpn.channel = channel;
|
||||||
cc->cc_data_msb = cc->cc_data_lsb = 0;
|
cc->cc_data_msb = cc->cc_data_lsb = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -855,7 +857,7 @@ static int cc_ev_to_ump_midi2(const struct snd_seq_event *event,
|
||||||
cc->cc_data_lsb = val;
|
cc->cc_data_lsb = val;
|
||||||
if (!(cc->rpn_set || cc->nrpn_set))
|
if (!(cc->rpn_set || cc->nrpn_set))
|
||||||
return 0; // skip
|
return 0; // skip
|
||||||
fill_rpn(cc, data);
|
fill_rpn(cc, data, channel);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -957,7 +959,7 @@ static int ctrl14_ev_to_ump_midi2(const struct snd_seq_event *event,
|
||||||
cc->cc_data_lsb = lsb;
|
cc->cc_data_lsb = lsb;
|
||||||
if (!(cc->rpn_set || cc->nrpn_set))
|
if (!(cc->rpn_set || cc->nrpn_set))
|
||||||
return 0; // skip
|
return 0; // skip
|
||||||
fill_rpn(cc, data);
|
fill_rpn(cc, data, channel);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user