mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-20 05:33:44 -04:00
ucm: add integer comparison condition (Syntax 9)
Adds support for integer comparison operations in If.Condition blocks.
Supports operators: ==, !=, <, >, <=, >= for comparing integer values.
Both values are substituted and converted from strings to 64-bit integers.
Hexadecimal (C like) strings are also accepted (like 0x1234).
Example usage:
If.check_channels {
Condition {
Type Integer
Operation ">"
Value1 "${var:channels}"
Value2 "2"
}
True { ... }
}
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
e02e9dc6cf
commit
2943b1e412
2 changed files with 103 additions and 0 deletions
|
|
@ -878,6 +878,32 @@ If.fmic {
|
|||
}
|
||||
~~~
|
||||
|
||||
#### Integer comparison (Type Integer)
|
||||
|
||||
Field | Description
|
||||
---------------------|-----------------------
|
||||
Operation | comparison operator (==, !=, <, >, <=, >=)
|
||||
Value1 | first integer value (string converted to long long)
|
||||
Value2 | second integer value (string converted to long long)
|
||||
|
||||
Note: Integer condition is supported in *Syntax* version *9*+.
|
||||
|
||||
Example:
|
||||
|
||||
~~~{.html}
|
||||
If.check_channels {
|
||||
Condition {
|
||||
Type Integer
|
||||
Operation ">"
|
||||
Value1 "${var:channels}"
|
||||
Value2 "2"
|
||||
}
|
||||
True {
|
||||
...
|
||||
}
|
||||
}
|
||||
~~~
|
||||
|
||||
### Variants
|
||||
|
||||
To avoid duplication of the many configuration files for the cases with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue