Skip to content

Commit 7be34f6

Browse files
committed
ALSA: ump: Fix evaluation of MIDI 1.0 FB info
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: 37e0e14 ("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>
1 parent 9ad467a commit 7be34f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sound/core/ump.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,10 @@ static void fill_fb_info(struct snd_ump_endpoint *ump,
788788
info->ui_hint = buf->fb_info.ui_hint;
789789
info->first_group = buf->fb_info.first_group;
790790
info->num_groups = buf->fb_info.num_groups;
791-
info->flags = buf->fb_info.midi_10;
791+
if (buf->fb_info.midi_10 < 2)
792+
info->flags = buf->fb_info.midi_10;
793+
else
794+
info->flags = SNDRV_UMP_BLOCK_IS_MIDI1 | SNDRV_UMP_BLOCK_IS_LOWSPEED;
792795
info->active = buf->fb_info.active;
793796
info->midi_ci_version = buf->fb_info.midi_ci_version;
794797
info->sysex8_streams = buf->fb_info.sysex8_streams;

0 commit comments

Comments
 (0)