if (_primary_card)
*_primary_card = -1;
- err = get_value1(uc_mgr, &boot_card_sync_time, &uc_mgr->value_list, "BootCardSyncTime");
+ err = get_value1(uc_mgr, &boot_card_sync_time, &uc_mgr->global_value_list, "BootCardSyncTime");
if (err == 0 && boot_card_sync_time != NULL) {
long sync_time;
if (safe_strtol(boot_card_sync_time, &sync_time) == 0 && sync_time > 0 && sync_time <= 240) {
INIT_LIST_HEAD(&mgr->boot_list);
INIT_LIST_HEAD(&mgr->default_list);
INIT_LIST_HEAD(&mgr->value_list);
+ INIT_LIST_HEAD(&mgr->global_value_list);
INIT_LIST_HEAD(&mgr->active_modifiers);
INIT_LIST_HEAD(&mgr->active_devices);
INIT_LIST_HEAD(&mgr->ctl_list);
if (err >= 0 || err != -ENOENT)
return err;
+ err = get_value1(uc_mgr, value, &uc_mgr->global_value_list, identifier);
+ if (err >= 0 || err != -ENOENT)
+ return err;
+
return -ENOENT;
}
if (err < 0)
return err;
- /* parse ValueDefaults first */
- err = snd_config_search(cfg, "ValueDefaults", &n);
+ /* parse ValueGlobals first */
+ err = snd_config_search(cfg, "ValueGlobals", &n);
if (err == 0) {
- err = parse_value(uc_mgr, &uc_mgr->value_list, n);
+ err = parse_value(uc_mgr, &uc_mgr->global_value_list, n);
if (err < 0) {
- snd_error(UCM, "failed to parse ValueDefaults");
+ snd_error(UCM, "failed to parse ValueGlobals");
return err;
}
}
- err = uc_mgr_check_value(&uc_mgr->value_list, "BootCardGroup");
+ err = uc_mgr_check_value(&uc_mgr->global_value_list, "BootCardGroup");
if (err == 0) {
uc_mgr->card_group = true;
/* if we are in boot, skip the main parsing loop */
/* ValueDefaults is now parsed at the top of this function */
if (strcmp(id, "ValueDefaults") == 0) {
+ err = parse_value(uc_mgr, &uc_mgr->value_list, n);
+ if (err < 0) {
+ snd_error(UCM, "failed to parse ValueDefaults");
+ return err;
+ }
continue;
}
+ /* ValueGlobals is parsed at the top of this function */
+ if (strcmp(id, "ValueGlobals") == 0)
+ continue;
+
/* alsa-lib configuration */
if (uc_mgr->conf_format > 3 && strcmp(id, "LibraryConfig") == 0) {
err = parse_libconfig(uc_mgr, n);
#### Boot Synchronization (Syntax 8+)
-The *BootCardGroup* value in *ValueDefaults* allows multiple sound cards to coordinate
+The *BootCardGroup* value in *ValueGlobals* allows multiple sound cards to coordinate
their boot sequences. This value is detected at boot (alsactl/udev/systemd) time. Boot
tools can provide boot synchronization information through a control element named
'Boot' with 64-bit integer type. When present, the UCM library uses this control element
The UCM open call waits until the boot timeout has passed or until restore state
is notified through the synchronization Boot element. The timeout defaults to 30 seconds
-and can be customized using 'BootCardSyncTime' in 'ValueDefaults' (maximum 240 seconds).
+and can be customized using 'BootCardSyncTime' in 'ValueGlobals' (maximum 240 seconds).
If the 'Boot' control element is not present, no boot synchronization is performed.
Example configuration:
~~~{.html}
-ValueDefaults {
+ValueGlobals {
BootCardGroup "amd-acp"
BootCardSyncTime 10 # seconds
}
/* default settings - value list */
struct list_head value_list;
+ /* global value list */
+ struct list_head global_value_list;
+
/* current status */
struct use_case_verb *active_verb;
struct list_head active_devices;
uc_mgr_free_sequence(&uc_mgr->boot_list);
uc_mgr_free_sequence(&uc_mgr->default_list);
uc_mgr_free_value(&uc_mgr->value_list);
+ uc_mgr_free_value(&uc_mgr->global_value_list);
uc_mgr_free_value(&uc_mgr->variable_list);
free(uc_mgr->comment);
free(uc_mgr->conf_dir_name);