summaryrefslogtreecommitdiff
path: root/topology/pre-processor.h
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2021-04-23 13:46:24 -0700
committerJaroslav Kysela <perex@perex.cz>2021-05-25 18:26:51 +0200
commite3ad68b185c1305cdf924b620ceb091e1b5bbe31 (patch)
treec0e8c94a6d28d0a357eabf8d0d36c5028f087e32 /topology/pre-processor.h
parent963578af1e1ab617850a0848adf182521c8e3b94 (diff)
downloadalsa-utils-e3ad68b185c1305cdf924b620ceb091e1b5bbe31.tar.gz
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>
Diffstat (limited to 'topology/pre-processor.h')
-rw-r--r--topology/pre-processor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/topology/pre-processor.h b/topology/pre-processor.h
index 81063b7..ce72e09 100644
--- a/topology/pre-processor.h
+++ b/topology/pre-processor.h
@@ -41,6 +41,8 @@ snd_config_type_t tplg_class_get_attribute_type(struct tplg_pre_processor *tplg_
snd_config_t *attr);
const char *tplg_class_get_attribute_token_ref(struct tplg_pre_processor *tplg_pp,
snd_config_t *class, const char *attr_name);
+long tplg_class_attribute_valid_tuple_value(struct tplg_pre_processor *tplg_pp,
+ snd_config_t *class, snd_config_t *attr);
/* config helpers */
snd_config_t *tplg_find_config(snd_config_t *config, const char *name);