alsactl: ucm - try both fixed boot and boot sequences

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>
This commit is contained in:
Jaroslav Kysela 2021-04-13 19:18:38 +02:00
parent a589d88862
commit 0fe5048a30

View file

@ -46,9 +46,12 @@ 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);
if (err < 0)