Skip to content

Commit

Permalink
Tools: Topology2: Add switch control to multiband-DRC
Browse files Browse the repository at this point in the history
This patch provides processing on/off switch to user space. Use
e.g. alsamixer to control it. The control names are shortened to
see bytes and switch string ends.

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu committed Aug 22, 2023
1 parent ff94121 commit 8982a62
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
10 changes: 8 additions & 2 deletions tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ Object.Pipeline {
}
}
Object.Widget.multiband_drc.1 {
Object.Control.bytes."1" {
name 'Post Mixer $ANALOG_PLAYBACK_PCM Multiband-DRC'
Object.Control {
bytes."1" {
name 'Post Mixer $ANALOG_PLAYBACK_PCM MBDRC bytes'
}
mixer."1" {
name 'Post Mixer $ANALOG_PLAYBACK_PCM MBDRC switch'
max 1
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<include/components/mixout.conf>
<include/components/pipeline.conf>
<include/controls/bytes.conf>
<include/controls/mixer.conf>
<include/components/eqiir.conf>
<include/components/eqfir.conf>
<include/components/drc.conf>
Expand Down Expand Up @@ -155,10 +156,27 @@ Class.Pipeline."mixout-gain-efx-dai-copier-playback" {
out_valid_bit_depth 32
}

Object.Control.bytes."1" {
IncludeByKey.EFX_MULTIBAND_DRC_PARAMS {
"passthrough" "include/components/multiband_drc/passthrough.conf"
"default" "include/components/multiband_drc/default.conf"
Object.Control {
bytes."1" {
IncludeByKey.EFX_MULTIBAND_DRC_PARAMS {
"passthrough" "include/components/multiband_drc/passthrough.conf"
"default" "include/components/multiband_drc/default.conf"
}
}

mixer."1" {
Object.Base.channel.1 {
name "fc"
shift 0
}
Object.Base.ops.1 {
name "ctl"
info "volsw"
#259 binds the mixer control to switch get/put handlers
get 259
put 259
}
max 1
}
}
}
Expand Down

0 comments on commit 8982a62

Please sign in to comment.