mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
ucm: add the run-time variable substitution
Those two variables are supported:
${ConfName} - configuration file name
${CardId} - card identification string (like PCH)
${CardName} - card name (driver)
${CardLongName} - card long name (driver)
${env:ENV_NAME} - returns the environment variable ENV_NAME
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
40aef87f1e
commit
0dd89f3892
3 changed files with 179 additions and 22 deletions
|
|
@ -1464,6 +1464,7 @@ static int get_card_long_name(snd_use_case_mgr_t *mgr)
|
|||
_long_name = snd_ctl_card_info_get_longname(info);
|
||||
if (!strcmp(card_name, _name) ||
|
||||
!strcmp(card_name, _long_name)) {
|
||||
snd_strlcpy(mgr->card_short_name, _name, sizeof(mgr->card_short_name));
|
||||
snd_strlcpy(mgr->card_long_name, _long_name, sizeof(mgr->card_long_name));
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1495,6 +1496,7 @@ static int get_by_card(snd_use_case_mgr_t *mgr, const char *ctl_name)
|
|||
_name = snd_ctl_card_info_get_name(info);
|
||||
_long_name = snd_ctl_card_info_get_longname(info);
|
||||
|
||||
snd_strlcpy(mgr->card_short_name, _name, sizeof(mgr->card_short_name));
|
||||
snd_strlcpy(mgr->card_long_name, _long_name, sizeof(mgr->card_long_name));
|
||||
snd_strlcpy(mgr->conf_file_name, _name, sizeof(mgr->conf_file_name));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue