Skip to content

Commit ac29d8a

Browse files
committed
ALSA: ump: Force 1 Group for MIDI1 FBs
When a Function Block declares it being a legacy MIDI1 device, it has to be only with a single UMP Group. Correct the attribute when a device declares it wrongly. Fixes: 37e0e14 ("ALSA: ump: Support UMP Endpoint and Function Block parsing") Cc: <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 9a4ab16 commit ac29d8a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sound/core/ump.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,12 @@ static void fill_fb_info(struct snd_ump_endpoint *ump,
733733
info->block_id, info->direction, info->active,
734734
info->first_group, info->num_groups, info->midi_ci_version,
735735
info->sysex8_streams, info->flags);
736+
737+
if ((info->flags & SNDRV_UMP_BLOCK_IS_MIDI1) && info->num_groups != 1) {
738+
info->num_groups = 1;
739+
ump_dbg(ump, "FB %d: corrected groups to 1 for MIDI1\n",
740+
info->block_id);
741+
}
736742
}
737743

738744
/* check whether the FB info gets updated by the current message */

0 commit comments

Comments
 (0)