Commit 3f67f669 authored by Takashi Iwai's avatar Takashi Iwai

Merge branch 'topic/seq-midi-fix' into for-linus

* topic/seq-midi-fix:
  sound: seq_midi_event: fix decoding of (N)RPN events
parents 12bc7385 6423f9ea
......@@ -504,10 +504,10 @@ static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf,
if (dev->nostat && count < 12)
return -ENOMEM;
cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f);
bytes[0] = ev->data.control.param & 0x007f;
bytes[1] = (ev->data.control.param & 0x3f80) >> 7;
bytes[2] = ev->data.control.value & 0x007f;
bytes[3] = (ev->data.control.value & 0x3f80) >> 7;
bytes[0] = (ev->data.control.param & 0x3f80) >> 7;
bytes[1] = ev->data.control.param & 0x007f;
bytes[2] = (ev->data.control.value & 0x3f80) >> 7;
bytes[3] = ev->data.control.value & 0x007f;
if (cmd != dev->lastcmd && !dev->nostat) {
if (count < 9)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment