]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsactl: ucm - try both fixed boot and boot sequences
authorJaroslav Kysela <perex@perex.cz>
Tue, 13 Apr 2021 17:18:38 +0000 (19:18 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 13 Apr 2021 17:19:01 +0000 (19:19 +0200)
The -ENOENT error means that there's no special configuration.
Try to fall-back to the legacy config.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsactl/init_ucm.c

index 9ac8db03c1d4038d88c052432ac89114df6bad3c..b3266010fb02ae9d19bb63379527872d1774325b 100644 (file)
@@ -46,8 +46,11 @@ int init_ucm(int flags, int cardno)
                return err;
        if (flags & FLAG_UCM_FBOOT) {
                err = snd_use_case_set(uc_mgr, "_fboot", NULL);
-               if (err < 0)
+               if (err == -ENOENT && (flags & FLAG_UCM_BOOT) != 0) {
+                       /* nothing */
+               } else if (err < 0) {
                        goto _error;
+               }
        }
        if (flags & FLAG_UCM_BOOT) {
                err = snd_use_case_set(uc_mgr, "_boot", NULL);