Commit graph

5 commits

Author SHA1 Message Date
Jaroslav Kysela
4a480362eb ucm: add ${CardDriver} substitution
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-11-21 08:15:38 +01:00
Jaroslav Kysela
cb84b02702 ucm: implement ${sys:sysfs/path} substitution
Example:

Condition {
	Type String
	String1 "${sys:class/dmi/id/board_vendor}"
	String2 "LENOVO"
}

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-11-20 13:58:17 +01:00
Jaroslav Kysela
6a76c01a01 ucm: fix memory leaks detected by the coverity checker
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-11-15 12:52:36 +01:00
Jaroslav Kysela
900638ff4d ucm: add ${CardComponents} substitution to the value string processing
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2019-11-14 15:00:40 +01:00
Jaroslav Kysela
8a36e38dc4 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>
2019-11-14 15:00:37 +01:00