Skip to content

Commit dabf0a6

Browse files
singalsulgirdwood
authored andcommitted
Tools: Topology2: Add switch control to topologies with DRC
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>
1 parent 439d69c commit dabf0a6

File tree

9 files changed

+71
-28
lines changed

9 files changed

+71
-28
lines changed

tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ Object.Pipeline {
5656
}
5757
}
5858
Object.Widget.drc.1 {
59-
Object.Control.bytes."1" {
60-
name 'Post Mixer $ANALOG_PLAYBACK_PCM DRC'
59+
Object.Control {
60+
bytes."1" {
61+
name 'Post Mixer $ANALOG_PLAYBACK_PCM DRC bytes'
62+
}
63+
mixer."1" {
64+
name 'Post Mixer $ANALOG_PLAYBACK_PCM DRC switch'
65+
}
6166
}
6267
}
6368
}

tools/topology/topology2/include/bench/drc_control_bytes_capture.conf

Lines changed: 0 additions & 10 deletions
This file was deleted.

tools/topology/topology2/include/bench/drc_control_bytes_playback.conf

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Created initially with script "./bench_comp_generate.sh drc"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in DRC
5+
bytes."1" {
6+
name '$ANALOG_CAPTURE_PCM DRC bytes'
7+
IncludeByKey.BENCH_DRC_PARAMS {
8+
"default" "include/components/drc/default.conf"
9+
"enabled" "include/components/drc/enabled.conf"
10+
"passthrough" "include/components/drc/passthrough.conf"
11+
}
12+
}
13+
mixer."1" {
14+
name '$ANALOG_CAPTURE_PCM DRC switch'
15+
}
16+
#enum."1" {
17+
# name '$ANALOG_CAPTURE_PCM DRC enum'
18+
#}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Created initially with script "./bench_comp_generate.sh drc"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in DRC
5+
bytes."1" {
6+
name '$ANALOG_PLAYBACK_PCM DRC bytes'
7+
IncludeByKey.BENCH_DRC_PARAMS {
8+
"default" "include/components/drc/default.conf"
9+
"enabled" "include/components/drc/enabled.conf"
10+
"passthrough" "include/components/drc/passthrough.conf"
11+
}
12+
}
13+
mixer."1" {
14+
name '$ANALOG_PLAYBACK_PCM DRC switch'
15+
}
16+
#enum."1" {
17+
# name '$ANALOG_PLAYBACK_PCM DRC enum'
18+
#}
19+
}

tools/topology/topology2/include/bench/drc_s16.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Object.Widget.drc.1 {
33
index 1
44
<include/bench/one_input_output_format_s16.conf>
5-
<include/bench/drc_control_bytes_playback.conf>
5+
<include/bench/drc_controls_playback.conf>
66
}
77
Object.Widget.drc.2 {
88
index 3
99
<include/bench/one_input_output_format_s16.conf>
10-
<include/bench/drc_control_bytes_capture.conf>
10+
<include/bench/drc_controls_capture.conf>
1111
}
1212
<include/bench/host_io_gateway_pipelines_s16.conf>
1313
<include/bench/drc_hda_route.conf>

tools/topology/topology2/include/bench/drc_s24.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Object.Widget.drc.1 {
33
index 1
44
<include/bench/one_input_output_format_s24.conf>
5-
<include/bench/drc_control_bytes_playback.conf>
5+
<include/bench/drc_controls_playback.conf>
66
}
77
Object.Widget.drc.2 {
88
index 3
99
<include/bench/one_input_output_format_s24.conf>
10-
<include/bench/drc_control_bytes_capture.conf>
10+
<include/bench/drc_controls_capture.conf>
1111
}
1212
<include/bench/host_io_gateway_pipelines_s24.conf>
1313
<include/bench/drc_hda_route.conf>

tools/topology/topology2/include/bench/drc_s32.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
Object.Widget.drc.1 {
33
index 1
44
<include/bench/one_input_output_format_s32.conf>
5-
<include/bench/drc_control_bytes_playback.conf>
5+
<include/bench/drc_controls_playback.conf>
66
}
77
Object.Widget.drc.2 {
88
index 3
99
<include/bench/one_input_output_format_s32.conf>
10-
<include/bench/drc_control_bytes_capture.conf>
10+
<include/bench/drc_controls_capture.conf>
1111
}
1212
<include/bench/host_io_gateway_pipelines_s32.conf>
1313
<include/bench/drc_hda_route.conf>

tools/topology/topology2/include/components/drc.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,26 @@ Class.Widget."drc" {
5353
unique "instance"
5454
}
5555

56+
#
57+
# drc widget switch control
58+
#
59+
Object.Control {
60+
mixer."1" {
61+
Object.Base.channel.1 {
62+
name "fc"
63+
shift 0
64+
}
65+
Object.Base.ops.1 {
66+
name "ctl"
67+
info "volsw"
68+
#259 binds the mixer control to switch get/put handlers
69+
get 259
70+
put 259
71+
}
72+
max 1
73+
}
74+
}
75+
5676
#
5777
# Default attributes for drc
5878
#

0 commit comments

Comments
 (0)