]> git.alsa-project.org Git - alsa-utils.git/commit
topology: pre-process-object: add support for prepocessing child objects
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Wed, 21 Apr 2021 18:18:04 +0000 (11:18 -0700)
committerJaroslav Kysela <perex@perex.cz>
Tue, 25 May 2021 16:26:51 +0000 (18:26 +0200)
commit1832f6f25439b9215d15cc6a0efd58ed08a15969
tree5fb57b280c94ce1ae751215f4e445663ec538554
parentdf6cfa77e374971162e032f224fab0dc2cec5c08
topology: pre-process-object: add support for prepocessing child objects

Add support for processing object instances embedded
within objects and classes. For example:
Object.Control.mixer."0" {
#Channel register and shift for Front Left/Right
Object.Base.channel."fl" {
shift 0
}
Object.Base.channel."fr" {
}

Object.Base.tlv."vtlv_m64s2" {
Object.Base.scale."m64s2" {
mute 1
}
}

Object.Base.ops."ctl" {
info  "volsw"
#256 binds the mixer control to volume get/put handlers
get  256
put  256
}
}

and pga class embeds the mixer objects as follows:
Class.Widget."pga" {
...
Object.Control {
mixer."0" {...}
mixer."1" {...}
}

The pre-processor starts with the top-pevel PGA widget object
and processes the mixer objects in the class definition.
This will recursively pre-processes its child objects to add the channels,
tlv and ops.

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