]> git.alsa-project.org Git - alsa-utils.git/commit
topology: pre-process-dapm: add support for widget control objects
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Mon, 26 Apr 2021 20:03:57 +0000 (13:03 -0700)
committerJaroslav Kysela <perex@perex.cz>
Tue, 25 May 2021 16:26:51 +0000 (18:26 +0200)
commit79033ceae4c513b837a30a72bfb297697b2fa68e
tree1f2aa98346b9d4431454513af58c1b394aa1c4cc
parent082015dc95b1122e86ec13c3d0ded6eb99b022e6
topology: pre-process-dapm: add support for widget control objects

Add support for pre-processing mixer and byte control objects.
For ex: a pga widget with a mixer control as follows:

Object.pga"0" {
...
mixer.0 {
index 2
max 32
name "2 MasterPlaybackControl"
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
}

access [
read_write
tlv_read
]
}
}

Would be converted to:

SectionControlMixer.'2 Master Playback Volume' {
index 2
max 32
channel {
fl {
reg 1
}
fr {
reg 1
shift 1
}
}
tlv "vtlv_m64s2"
ops.0 {
info volsw
get 256
put 256
}
access [
read_write
tlv_read
]
}

and the SectionWidget for pga.2.0 would be updated to add the mixer references as follows:
SectionWidget.'pga.2.0' {
...
mixer [
"2 Master Playback Volume"
]
}

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