mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
ucm: configuration - allow to define the configuration variables
It may be useful for the library files to use the runtime configuration
variables.
Example:
Define.Var1 "hw:${CardId},2"
Value.PlaybackPCM "${var:Var1}"
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
6cc6024ac5
commit
ed4567d1c9
5 changed files with 130 additions and 5 deletions
|
|
@ -239,6 +239,9 @@ struct snd_use_case_mgr {
|
|||
/* locking */
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
/* UCM internal variables defined in configuration files */
|
||||
struct list_head variable_list;
|
||||
|
||||
/* list of opened control devices */
|
||||
struct list_head ctl_list;
|
||||
|
||||
|
|
@ -289,6 +292,13 @@ void uc_mgr_free_ctl_list(snd_use_case_mgr_t *uc_mgr);
|
|||
|
||||
int uc_mgr_add_value(struct list_head *base, const char *key, char *val);
|
||||
|
||||
const char *uc_mgr_get_variable(snd_use_case_mgr_t *uc_mgr,
|
||||
const char *name);
|
||||
|
||||
int uc_mgr_set_variable(snd_use_case_mgr_t *uc_mgr,
|
||||
const char *name,
|
||||
const char *val);
|
||||
|
||||
int uc_mgr_get_substituted_value(snd_use_case_mgr_t *uc_mgr,
|
||||
char **_rvalue,
|
||||
const char *value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue