diff options
author | Takashi Iwai <[email protected]> | 2023-05-25 10:31:24 +0200 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2023-05-25 10:32:59 +0200 |
commit | 77700b81bd0e47d89d50eb4b3f2f323492f79998 (patch) | |
tree | 02659a4b54abe86c699235ad8b387f1b7d061356 | |
parent | ab2335daa6ef70df56c98c216261a93e28ae52b3 (diff) |
ALSA: ump: Fix parsing of 0xFx command
The MIDI 1.0 parser retrieved the 0xFx command with a wrong bit shift,
resulting in the bogus type. Fix the bit shift size.
Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support")
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]
Suggested-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
-rw-r--r-- | sound/core/ump_convert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/ump_convert.c b/sound/core/ump_convert.c index 164829d3e305..48ab3e1bd62e 100644 --- a/sound/core/ump_convert.c +++ b/sound/core/ump_convert.c @@ -454,7 +454,7 @@ static int do_convert_to_ump(struct snd_ump_endpoint *ump, } if (c & 0x80) { - bytes = cmd_bytes[(c >> 8) & 7]; + bytes = cmd_bytes[(c >> 4) & 7]; cvt->buf[0] = c; cvt->len = 1; cvt->cmd_bytes = bytes; |