diff options
| author | Takashi Iwai <tiwai@suse.de> | 2024-07-22 16:06:06 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-03 08:54:20 +0200 |
| commit | 689e0780b2290f615dae9d31e66191beb87ec78c (patch) | |
| tree | 1b86da9106c179b8f99bb3ced089799339a9b342 /sound/core | |
| parent | ad4ab148a50f3e319613e5b6849ffa64b4edf462 (diff) | |
| download | linux-689e0780b2290f615dae9d31e66191beb87ec78c.tar.gz linux-689e0780b2290f615dae9d31e66191beb87ec78c.tar.bz2 linux-689e0780b2290f615dae9d31e66191beb87ec78c.zip | |
ALSA: ump: Force 1 Group for MIDI1 FBs
commit ac29d8ae05b770ed3f52d7a60908ab9b126f69d7 upstream.
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: 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing")
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240722140610.10845-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/core')
| -rw-r--r-- | sound/core/ump.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/ump.c b/sound/core/ump.c index b4b2eca3448c..8a7ecec74b5d 100644 --- a/sound/core/ump.c +++ b/sound/core/ump.c @@ -733,6 +733,12 @@ static void fill_fb_info(struct snd_ump_endpoint *ump, info->block_id, info->direction, info->active, info->first_group, info->num_groups, info->midi_ci_version, info->sysex8_streams, info->flags); + + if ((info->flags & SNDRV_UMP_BLOCK_IS_MIDI1) && info->num_groups != 1) { + info->num_groups = 1; + ump_dbg(ump, "FB %d: corrected groups to 1 for MIDI1\n", + info->block_id); + } } /* check whether the FB info gets updated by the current message */ |
