@@ -230,7 +230,7 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* Known identifiers:
* - NULL - return current card
* - _verb - return current verb
- *
+ * - _file - return configuration file loaded for current card
* - [=]{NAME}[/[{modifier}|{/device}][/{verb}]]
* - value identifier {NAME}
* - Search starts at given modifier or device if any,
@@ -1528,6 +1528,20 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
goto __end;
}
err = 0;
+ } else if (strcmp(identifier, "_file") == 0) {
+ /* get the conf file name of the opened card */
+ if ((uc_mgr->card_name == NULL)
+ || (uc_mgr->conf_file_name[0] == '\0')) {
+ err = -ENOENT;
+ goto __end;
+ }
+ *value = strndup(uc_mgr->conf_file_name, MAX_FILE);
+ if (*value == NULL) {
+ err = -ENOMEM;
+ goto __end;
+ }
+ err = 0;
+
} else if (identifier[0] == '_') {
err = -ENOENT;
goto __end;