mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
ucm: add If condition block
The syntax is simple:
If./any-if-identificator/ {
Condition {
Type /type_here/
/optional defines/
}
True {
/block used when condition is evaluated as true/
}
False {
/block used when condition is evaluated as false/
}
}
The Type "ControlExists" is implemented:
Condition {
Type ControlExists
Device "hw:${CardId}"
Control "iface=CARD,name='Headphone Jack'"
}
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
b9b2247943
commit
8a36e38dc4
8 changed files with 536 additions and 162 deletions
|
|
@ -64,6 +64,16 @@ struct ctl_list *uc_mgr_get_one_ctl(snd_use_case_mgr_t *uc_mgr)
|
|||
return ctl_list;
|
||||
}
|
||||
|
||||
snd_ctl_t *uc_mgr_get_ctl(snd_use_case_mgr_t *uc_mgr)
|
||||
{
|
||||
struct ctl_list *ctl_list;
|
||||
|
||||
ctl_list = uc_mgr_get_one_ctl(uc_mgr);
|
||||
if (ctl_list)
|
||||
return ctl_list->ctl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void uc_mgr_free_ctl(struct ctl_list *ctl_list)
|
||||
{
|
||||
struct list_head *pos, *npos;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue