diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-07-22 16:59:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-03 09:54:20 +0300 |
commit | ad4ab148a50f3e319613e5b6849ffa64b4edf462 (patch) | |
tree | 0705b2e48db86a9c669621a682081b5cc9f31fb6 /sound/core | |
parent | 647cbf2ac6ef0b35e0845acc5fddff1ba6696c81 (diff) | |
download | linux-ad4ab148a50f3e319613e5b6849ffa64b4edf462.tar.xz |
ALSA: ump: Don't update FB name for static blocks
commit 9a4ab167cfb1dea1df0c0c948205a62c7eb3b85b upstream.
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")
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240722135929.8612-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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/core/ump.c b/sound/core/ump.c index d68d3bda97e4..b4b2eca3448c 100644 --- a/sound/core/ump.c +++ b/sound/core/ump.c @@ -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 */ |