]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: fix enhanced ID parsing in snd_use_case_parse_ctl_elem_id()
authorJaroslav Kysela <perex@perex.cz>
Wed, 2 Nov 2022 14:01:56 +0000 (15:01 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 2 Nov 2022 14:01:58 +0000 (15:01 +0100)
Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/main.c

index 30ab1e4151f07cfaa8a4fa67379f99633e50862c..28c605652783ecf88c3c7c7dd1c65d9d73c1fa2b 100644 (file)
@@ -2793,7 +2793,7 @@ int snd_use_case_parse_ctl_elem_id(snd_ctl_elem_id_t *dst,
            strcmp(ucm_id, "CaptureSwitch"))
                return -EINVAL;
        snd_ctl_elem_id_clear(dst);
-       if (strcasestr(ucm_id, "name="))
+       if (strcasestr(value, "name="))
                return __snd_ctl_ascii_elem_id_parse(dst, value, NULL);
        iface = SND_CTL_ELEM_IFACE_MIXER;
        if (jack_control)