ALSA: usb-audio: Update UMP group attributes for GTB blocks, too

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

 



From: Takashi Iwai <tiwai@xxxxxxx>

commit ebaa86c0bddd2c47c516bf2096b17c0bed71d914 upstream.

When a FB is created from a GTB instead of UMP FB Info inquiry, we
missed the update of the corresponding UMP Group attributes.
Export the call of updater and let it be called from the USB driver.

Fixes: 0642a3c5cacc ("ALSA: ump: Update substream name from assigned FB names")
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Link: https://patch.msgid.link/20240807092303.1935-5-tiwai@xxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 include/sound/ump.h |    1 +
 sound/core/ump.c    |    9 +++++----
 sound/usb/midi2.c   |    2 ++
 3 files changed, 8 insertions(+), 4 deletions(-)

--- a/include/sound/ump.h
+++ b/include/sound/ump.h
@@ -122,6 +122,7 @@ static inline int snd_ump_attach_legacy_
 
 int snd_ump_receive_ump_val(struct snd_ump_endpoint *ump, u32 val);
 int snd_ump_switch_protocol(struct snd_ump_endpoint *ump, unsigned int protocol);
+void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump);
 
 /*
  * Some definitions for UMP
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -525,7 +525,7 @@ static void snd_ump_proc_read(struct snd
 }
 
 /* update dir_bits and active flag for all groups in the client */
-static void update_group_attrs(struct snd_ump_endpoint *ump)
+void snd_ump_update_group_attrs(struct snd_ump_endpoint *ump)
 {
 	struct snd_ump_block *fb;
 	struct snd_ump_group *group;
@@ -575,6 +575,7 @@ static void update_group_attrs(struct sn
 		}
 	}
 }
+EXPORT_SYMBOL_GPL(snd_ump_update_group_attrs);
 
 /*
  * UMP endpoint and function block handling
@@ -848,7 +849,7 @@ static int ump_handle_fb_info_msg(struct
 	if (fb) {
 		fill_fb_info(ump, &fb->info, buf);
 		if (ump->parsed) {
-			update_group_attrs(ump);
+			snd_ump_update_group_attrs(ump);
 			seq_notify_fb_change(ump, fb);
 		}
 	}
@@ -880,7 +881,7 @@ static int ump_handle_fb_name_msg(struct
 				buf->raw, 3);
 	/* notify the FB name update to sequencer, too */
 	if (ret > 0 && ump->parsed) {
-		update_group_attrs(ump);
+		snd_ump_update_group_attrs(ump);
 		seq_notify_fb_change(ump, fb);
 	}
 	return ret;
@@ -1055,7 +1056,7 @@ int snd_ump_parse_endpoint(struct snd_um
 	}
 
 	/* initialize group attributions */
-	update_group_attrs(ump);
+	snd_ump_update_group_attrs(ump);
 
  error:
 	ump->parsed = true;
--- a/sound/usb/midi2.c
+++ b/sound/usb/midi2.c
@@ -873,6 +873,8 @@ static int create_gtb_block(struct snd_u
 		fb->info.flags |= SNDRV_UMP_BLOCK_IS_MIDI1 |
 			SNDRV_UMP_BLOCK_IS_LOWSPEED;
 
+	snd_ump_update_group_attrs(rmidi->ump);
+
 	usb_audio_dbg(umidi->chip,
 		      "Created a UMP block %d from GTB, name=%s\n",
 		      blk, fb->info.name);


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

queue-6.6/alsa-seq-ump-fix-seq-port-updates-per-fb-info-notify.patch
queue-6.6/alsa-ump-update-substream-name-from-assigned-fb-name.patch
queue-6.6/alsa-hda-realtek-enable-mute-and-micmute-led-on-hp-probook-430-g8.patch
queue-6.6/alsa-usb-audio-update-ump-group-attributes-for-gtb-blocks-too.patch
queue-6.6/alsa-usb-audio-notify-xrun-for-low-latency-mode.patch
queue-6.6/alsa-usb-audio-add-mixer-mapping-for-corsair-hs80.patch
queue-6.6/asoc-intel-avs-fix-return-status-of-avs_pcm_hw_constraints_init.patch
queue-6.6/alsa-hda-conexant-use-the-new-codec-ssid-matching.patch
queue-6.6/alsa-usb-audio-make-mic-volume-workarounds-globally-.patch
queue-6.6/alsa-hda-realtek-add-support-for-samsung-galaxy-book3-360-np730qfg.patch
queue-6.6/alsa-hda-fix-build-error-without-config_snd_debug.patch
queue-6.6/alsa-seq-ump-use-automatic-cleanup-of-kfree.patch
queue-6.6/alsa-hda-use-own-quirk-lookup-helper.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