Commit 9a4ab167 authored by Takashi Iwai's avatar Takashi Iwai

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: 37e0e141 ("ALSA: ump: Support UMP Endpoint and Function Block parsing")
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240722135929.8612-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 21451dfd
...@@ -806,6 +806,13 @@ static int ump_handle_fb_name_msg(struct snd_ump_endpoint *ump, ...@@ -806,6 +806,13 @@ static int ump_handle_fb_name_msg(struct snd_ump_endpoint *ump,
if (!fb) if (!fb)
return -ENODEV; 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), ret = ump_append_string(ump, fb->info.name, sizeof(fb->info.name),
buf->raw, 3); buf->raw, 3);
/* notify the FB name update to sequencer, too */ /* notify the FB name update to sequencer, too */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment