After opening a card, this command can show the name of the actually
loaded configuration file, either matches the card name or card long name.
So developers can check if there is a device-sepcific configuration file
available for a given card.
Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 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}
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;