]> git.alsa-project.org Git - alsa-utils.git/commit
topology: pre-process-class: add function to convert valid attribute values to intege...
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Fri, 23 Apr 2021 20:46:24 +0000 (13:46 -0700)
committerJaroslav Kysela <perex@perex.cz>
Tue, 25 May 2021 16:26:51 +0000 (18:26 +0200)
commite3ad68b185c1305cdf924b620ceb091e1b5bbe31
treec0e8c94a6d28d0a357eabf8d0d36c5028f087e32
parent963578af1e1ab617850a0848adf182521c8e3b94
topology: pre-process-class: add function to convert valid attribute values to integer tuple values

Some attributes have valid values that need to be converted
to integer tuple values before it is appended to the
object's private data:

For ex, the buffer widget object's "caps" attribute has the
following definition:
DefineAttribute."caps" {
type "string"
# Token reference and type
token_ref "sof_tkn_buffer.word"
constraints {
value_ref "sof_tkn_mem"
valid_values [
"dai"
"host"
"pass"
"comp"
]
tuple_values [
113
113
113
65
]
}
}

Depending on the user input, the value string values for "caps"
will be converted to the appropriate tuple values.

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