ALSA: ump: Force 1 Group for MIDI1 FBs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Takashi Iwai <tiwai@xxxxxxx>

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@xxxxxxxxxxxxxxx>
Link: https://patch.msgid.link/20240722140610.10845-1-tiwai@xxxxxxx
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 sound/core/ump.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -733,6 +733,12 @@ static void fill_fb_info(struct snd_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 */


Patches currently in stable-queue which might be from tiwai@xxxxxxx are

queue-6.10/alsa-usb-audio-fix-microphone-sound-on-hd-webcam.patch
queue-6.10/alsa-firewire-lib-fix-wrong-value-as-length-of-header-for-cip_no_header-case.patch
queue-6.10/alsa-ump-don-t-update-fb-name-for-static-blocks.patch
queue-6.10/alsa-usb-audio-move-hd-webcam-quirk-to-the-right-place.patch
queue-6.10/alsa-ump-force-1-group-for-midi1-fbs.patch
queue-6.10/alsa-hda-realtek-cs35l41-fixup-remaining-asus-strix-models.patch
queue-6.10/alsa-usb-audio-add-a-quirk-for-sonix-hd-usb-camera.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux