Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761832AbZGAAhG (ORCPT ); Tue, 30 Jun 2009 20:37:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758435AbZGAAa2 (ORCPT ); Tue, 30 Jun 2009 20:30:28 -0400 Received: from kroah.org ([198.145.64.141]:34394 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759870AbZGAAaS (ORCPT ); Tue, 30 Jun 2009 20:30:18 -0400 X-Mailbox-Line: From gregkh@mini.kroah.org Tue Jun 30 17:04:00 2009 Message-Id: <20090701000400.480520283@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Tue, 30 Jun 2009 17:00:10 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Clemens Ladisch , Takashi Iwai Subject: [patch 26/30] sound: seq_midi_event: fix decoding of (N)RPN events References: <20090630235944.868879272@mini.kroah.org> Content-Disposition: inline; filename=sound-seq_midi_event-fix-decoding-of-rpn-events.patch In-Reply-To: <20090701002817.GA6156@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1635 Lines: 34 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Clemens Ladisch commit 6423f9ea8035138d70bae1a278d3b57b743f8b3e upstream. When decoding (N)RPN sequencer events into raw MIDI commands, the extra_decode_xrpn() function had accidentally swapped the MSB and LSB controller values of both the parameter number and the data value. Signed-off-by: Clemens Ladisch Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/core/seq/seq_midi_event.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/sound/core/seq/seq_midi_event.c +++ b/sound/core/seq/seq_midi_event.c @@ -504,10 +504,10 @@ static int extra_decode_xrpn(struct snd_ 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/