]> git.alsa-project.org Git - alsa-lib.git/commitdiff
ucm: rewrite device value only when the local config exists
authorJaroslav Kysela <perex@perex.cz>
Thu, 15 Apr 2021 09:38:39 +0000 (11:38 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 15 Apr 2021 09:38:39 +0000 (11:38 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/main.c

index 04fffa81fe10c3aea345913e842d727fce0829e5..72255d8095afc2a9cb4fd8e64897a38126e168e5 100644 (file)
@@ -584,6 +584,8 @@ static int rewrite_device_value(snd_use_case_mgr_t *uc_mgr, const char *name, ch
                NULL
        };
 
+       if (!uc_mgr_has_local_config(uc_mgr))
+               return 0;
        for (s = _prefix; *s && *value; s++) {
                if (strcmp(*s, name) != 0)
                        continue;