summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-11-27 08:00:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-09 10:32:51 +0100
commit0357abf951c419bce9ea5c08ce16231bd927e82e (patch)
tree69f564eb39618e0fc5aea039c69f896d68cfe7a5 /sound
parente9bf513718d0796bf4095b45871b3d4f7e79ee94 (diff)
downloadlinux-0357abf951c419bce9ea5c08ce16231bd927e82e.tar.gz
linux-0357abf951c419bce9ea5c08ce16231bd927e82e.tar.bz2
linux-0357abf951c419bce9ea5c08ce16231bd927e82e.zip
ALSA: ump: Fix evaluation of MIDI 1.0 FB info
commit 7be34f6feedd60e418de1c2c48e661d70416635f upstream. The m1.0 field of UMP Function Block info specifies whether the given FB is a MIDI 1.0 port or not. When implementing the UMP support on Linux, I somehow interpreted as if it were bit flags, but the field is actually an enumeration from 0 to 2, where 2 means MIDI 1.0 *and* low speed. This patch corrects the interpretation and sets the right bit flags depending on the m1.0 field of FB Info. This effectively fixes the missing detection of MIDI 1.0 FB when m1.0 is 2. Fixes: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing") Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20241127070059.8099-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/ump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/core/ump.c b/sound/core/ump.c
index 8a7ecec74b5d..b1ce4756961a 100644
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -724,7 +724,10 @@ static void fill_fb_info(struct snd_ump_endpoint *ump,
info->ui_hint = buf->fb_info.ui_hint;
info->first_group = buf->fb_info.first_group;
info->num_groups = buf->fb_info.num_groups;
- info->flags = buf->fb_info.midi_10;
+ if (buf->fb_info.midi_10 < 2)
+ info->flags = buf->fb_info.midi_10;
+ else
+ info->flags = SNDRV_UMP_BLOCK_IS_MIDI1 | SNDRV_UMP_BLOCK_IS_LOWSPEED;
info->active = buf->fb_info.active;
info->midi_ci_version = buf->fb_info.midi_ci_version;
info->sysex8_streams = buf->fb_info.sysex8_streams;