Commit graph

3 commits

Author SHA1 Message Date
Ranjani Sridharan
7bf31094e2 topology: pre-process-class: Add functions to check attribute constraints
Add helper functions to check if an attribute is
mandatory, immutable or unique in the class definition.
ex: for a host widget component, these are defined
as follows:

	attributes {
		#
		# host objects instantiated within the same alsaconf node must have unique
		# direction attribute
		#
		unique	"direction"
		mandatory [
			"type"
			"stream_name"
		]
		immutable [
			"uuid"
		]
	}

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-25 18:26:51 +02:00
Ranjani Sridharan
1422c09afd topology: pre-process-class: Add function to look up attribute definition in class
Add a helper function look up attribute definition in the
"DefineAttribute" config in the class definition.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-25 18:26:51 +02:00
Ranjani Sridharan
c832f48404 topology: pre-process-class: Add helper function to look up class definition
Add a helper function to look up the class definition for
an object. ex: for an object instance, Object.Widget.pga.0{}, the
function returns the config pointing to Class.Widget.pga{} in
the input conf.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2021-05-25 18:26:51 +02:00