Skip to contentSkip to conversation

ALSA: ump: Don't update FB name for static blocks

PATCH New Takashi Iwai 1 participant 1 message Jul 22, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: ump: Don't update FB name for static blocks

When a device tries to update the FB name string even if its Endpoint is declared as static, we should skip it, just already done for the FB info update reply.

Fixes 37e0e14128e0 ("ALSA: ump: Support UMP Endpoint and Function Block parsing")
---
 sound/core/ump.c | 7 +++++++
 1 file changed, 7 insertions(+)
sound/core/ump.c +7 -0
index 3f61220c23b4..b325fcfa77d0 100644
@@ -806,6 +806,13 @@ static int ump_handle_fb_name_msg(struct snd_ump_endpoint *ump,
 	if (!fb)
 		return -ENODEV;
 
+	if (ump->parsed &&
+	    (ump->info.flags & SNDRV_UMP_EP_INFO_STATIC_BLOCKS)) {
+		ump_dbg(ump, "Skipping static FB name update (blk#%d)\n",
+			fb->info.block_id);
+		return 0;
+	}
+
 	ret = ump_append_string(ump, fb->info.name, sizeof(fb->info.name),
 				buf->raw, 3);
 	/* notify the FB name update to sequencer, too */
Signature · 1 line
2.43.0