Skip to content

Commit

Permalink
Tools: Topology2: Add sof-hda-benchmark-gain16/24/32-tgl build
Browse files Browse the repository at this point in the history
This patch adds test topologies build for gain component. Testing
of gain can be done with all supported s16/s24/s32 source and sink
formats. The topologies normally use only the s32 format
internally.

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu authored and kv2019i committed Nov 1, 2023
1 parent 98e687e commit 6d6637d
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tools/topology/topology2/cavs-benchmark-hda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,20 @@ IncludeByKey.BENCH_CONFIG {
"eqiir32" {
<include/bench/eqiir_s32.conf>
}

#
# Gain component
#

"gain16" {
<include/bench/gain_s16.conf>
}

"gain24" {
<include/bench/gain_s24.conf>
}

"gain32" {
<include/bench/gain_s32.conf>
}
}
2 changes: 2 additions & 0 deletions tools/topology/topology2/development/tplg-targets-bench.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ set(components
"drc_multiband"
"eqiir"
"eqfir"
"gain"
)

set(component_parameters
Expand All @@ -22,6 +23,7 @@ set(component_parameters
"BENCH_DRC_MULTIBAND_PARAMS=default"
"BENCH_EQIIR_PARAMS=highpass_50hz_0db_48khz"
"BENCH_EQFIR_PARAMS=loudness"
"BENCH_GAIN_PARAMS=default"
)

foreach(p ${platforms})
Expand Down
16 changes: 16 additions & 0 deletions tools/topology/topology2/include/bench/gain_controls_capture.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Created initially with script "./bench_comp_generate.sh gain"
# may need edits to modify controls
Object.Control {
#bytes."1" {
# name '$ANALOG_CAPTURE_PCM GAIN bytes'
# IncludeByKey.BENCH_GAIN_PARAMS {
# "default" "include/components/gain/default.conf"
# }
#}
mixer."1" {
name '$ANALOG_CAPTURE_PCM GAIN volume'
}
#enum."1" {
# name '$ANALOG_CAPTURE_PCM GAIN enum'
#}
}
16 changes: 16 additions & 0 deletions tools/topology/topology2/include/bench/gain_controls_playback.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Created initially with script "./bench_comp_generate.sh gain"
# may need edits to modify controls
Object.Control {
#bytes."1" {
# name '$ANALOG_PLAYBACK_PCM GAIN bytes'
# IncludeByKey.BENCH_GAIN_PARAMS {
# "default" "include/components/gain/default.conf"
# }
#}
mixer."1" {
name '$ANALOG_PLAYBACK_PCM GAIN volume'
}
#enum."1" {
# name '$ANALOG_PLAYBACK_PCM GAIN enum'
#}
}
19 changes: 19 additions & 0 deletions tools/topology/topology2/include/bench/gain_hda_route.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Created with script "./bench_comp_generate.sh gain"
Object.Base.route [
{
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
source 'gain.1.1'
}
{
sink 'gain.1.1'
source 'host-copier.0.playback'
}
{
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
sink 'gain.3.2'
}
{
source 'gain.3.2'
sink 'host-copier.0.capture'
}
]
13 changes: 13 additions & 0 deletions tools/topology/topology2/include/bench/gain_s16.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Created with script "./bench_comp_generate.sh gain"
Object.Widget.gain.1 {
index 1
<include/bench/one_input_output_format_s16.conf>
<include/bench/gain_controls_playback.conf>
}
Object.Widget.gain.2 {
index 3
<include/bench/one_input_output_format_s16.conf>
<include/bench/gain_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s16.conf>
<include/bench/gain_hda_route.conf>
13 changes: 13 additions & 0 deletions tools/topology/topology2/include/bench/gain_s24.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Created with script "./bench_comp_generate.sh gain"
Object.Widget.gain.1 {
index 1
<include/bench/one_input_output_format_s24.conf>
<include/bench/gain_controls_playback.conf>
}
Object.Widget.gain.2 {
index 3
<include/bench/one_input_output_format_s24.conf>
<include/bench/gain_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s24.conf>
<include/bench/gain_hda_route.conf>
13 changes: 13 additions & 0 deletions tools/topology/topology2/include/bench/gain_s32.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Created with script "./bench_comp_generate.sh gain"
Object.Widget.gain.1 {
index 1
<include/bench/one_input_output_format_s32.conf>
<include/bench/gain_controls_playback.conf>
}
Object.Widget.gain.2 {
index 3
<include/bench/one_input_output_format_s32.conf>
<include/bench/gain_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s32.conf>
<include/bench/gain_hda_route.conf>

0 comments on commit 6d6637d

Please sign in to comment.