]> git.alsa-project.org Git - alsa-utils.git/commit
topology: pre-process-object: check attribute validity
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Mon, 26 Apr 2021 17:04:54 +0000 (10:04 -0700)
committerJaroslav Kysela <perex@perex.cz>
Tue, 25 May 2021 16:26:51 +0000 (18:26 +0200)
commitb2e85be668294e77d60055ecd4a077393cb2cf7f
tree8dbe50e92bfd17fafaf90abd187416ce8c08d3f2
parent624c814c6565b4df942d1429eb3e2e86bea91ef4
topology: pre-process-object: check attribute validity

Attributes can have constraints set for valid values, min
or max values. If the attribute value is set in an object,
the value must be validated against the set constraints.

An example for attribute constraint would be:
DefineAttribute."direction" {
constraints {
valid_values [
"playback"
"capture"
]
tuple_values [
0
1
]
}
}

where the tuple_values array would translate the valid_values of
playback as 0 and capture as 1.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
topology/pre-process-object.c