Skip to content

Commit

Permalink
Tools: Topology2: Add switch control to topologies with DRC
Browse files Browse the repository at this point in the history
The mixer control for switch is added to widget definition
of drc.conf.

In cavs-mixin-mixout-efx-hda.conf the existing control name
is changed to have "bytes" similarly as multiband-drc has. The
switch control is added for the widget to implement the switch.

The controls definitions files in benchmark topologies are replaced
to new format from current .conf generator script. The bytes control
is same as before, and the mixer control for switch is added.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
  • Loading branch information
singalsu committed Nov 10, 2023
1 parent b4f3d92 commit 205399b
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 28 deletions.
9 changes: 7 additions & 2 deletions tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ Object.Pipeline {
}
}
Object.Widget.drc.1 {
Object.Control.bytes."1" {
name 'Post Mixer $ANALOG_PLAYBACK_PCM DRC'
Object.Control {
bytes."1" {
name 'Post Mixer $ANALOG_PLAYBACK_PCM DRC bytes'
}
mixer."1" {
name 'Post Mixer $ANALOG_PLAYBACK_PCM DRC switch'
}
}
}
}
Expand Down

This file was deleted.

This file was deleted.

19 changes: 19 additions & 0 deletions tools/topology/topology2/include/bench/drc_controls_capture.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Created initially with script "./bench_comp_generate.sh drc"
# may need edits to modify controls
Object.Control {
# Un-comment the supported controls in DRC
bytes."1" {
name '$ANALOG_CAPTURE_PCM DRC bytes'
IncludeByKey.BENCH_DRC_PARAMS {
"default" "include/components/drc/default.conf"
"enabled" "include/components/drc/enabled.conf"
"passthrough" "include/components/drc/passthrough.conf"
}
}
mixer."1" {
name '$ANALOG_CAPTURE_PCM DRC switch'
}
#enum."1" {
# name '$ANALOG_CAPTURE_PCM DRC enum'
#}
}
19 changes: 19 additions & 0 deletions tools/topology/topology2/include/bench/drc_controls_playback.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Created initially with script "./bench_comp_generate.sh drc"
# may need edits to modify controls
Object.Control {
# Un-comment the supported controls in DRC
bytes."1" {
name '$ANALOG_PLAYBACK_PCM DRC bytes'
IncludeByKey.BENCH_DRC_PARAMS {
"default" "include/components/drc/default.conf"
"enabled" "include/components/drc/enabled.conf"
"passthrough" "include/components/drc/passthrough.conf"
}
}
mixer."1" {
name '$ANALOG_PLAYBACK_PCM DRC switch'
}
#enum."1" {
# name '$ANALOG_PLAYBACK_PCM DRC enum'
#}
}
4 changes: 2 additions & 2 deletions tools/topology/topology2/include/bench/drc_s16.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Object.Widget.drc.1 {
index 1
<include/bench/one_input_output_format_s16.conf>
<include/bench/drc_control_bytes_playback.conf>
<include/bench/drc_controls_playback.conf>
}
Object.Widget.drc.2 {
index 3
<include/bench/one_input_output_format_s16.conf>
<include/bench/drc_control_bytes_capture.conf>
<include/bench/drc_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s16.conf>
<include/bench/drc_hda_route.conf>
4 changes: 2 additions & 2 deletions tools/topology/topology2/include/bench/drc_s24.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Object.Widget.drc.1 {
index 1
<include/bench/one_input_output_format_s24.conf>
<include/bench/drc_control_bytes_playback.conf>
<include/bench/drc_controls_playback.conf>
}
Object.Widget.drc.2 {
index 3
<include/bench/one_input_output_format_s24.conf>
<include/bench/drc_control_bytes_capture.conf>
<include/bench/drc_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s24.conf>
<include/bench/drc_hda_route.conf>
4 changes: 2 additions & 2 deletions tools/topology/topology2/include/bench/drc_s32.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Object.Widget.drc.1 {
index 1
<include/bench/one_input_output_format_s32.conf>
<include/bench/drc_control_bytes_playback.conf>
<include/bench/drc_controls_playback.conf>
}
Object.Widget.drc.2 {
index 3
<include/bench/one_input_output_format_s32.conf>
<include/bench/drc_control_bytes_capture.conf>
<include/bench/drc_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s32.conf>
<include/bench/drc_hda_route.conf>
20 changes: 20 additions & 0 deletions tools/topology/topology2/include/components/drc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ Class.Widget."drc" {
unique "instance"
}

#
# drc widget switch control
#
Object.Control {
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
}
}

#
# Default attributes for drc
#
Expand Down

0 comments on commit 205399b

Please sign in to comment.