Skip to content

Commit

Permalink
Tools: Topology2: Add sof-hda-benchmark-rtnr16/24/32-<platform>
Browse files Browse the repository at this point in the history
This patch adds build of hda-generic development topologies to
test IGO NR component with all s16/s24/s32 formats.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
  • Loading branch information
singalsu committed Dec 12, 2023
1 parent e659924 commit 2101f88
Show file tree
Hide file tree
Showing 8 changed files with 163 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tools/topology/topology2/cavs-benchmark-hda.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<include/components/dcblock.conf>
<include/components/rtnr.conf>
<include/components/igo_nr.conf>

Define {
ANALOG_PLAYBACK_PCM 'Analog Playback'
Expand Down Expand Up @@ -286,6 +287,22 @@ IncludeByKey.BENCH_CONFIG {
<include/bench/gain_s32.conf>
}

#
# IGO NR component
#

"igo_nr16" {
<include/bench/igo_nr_s16.conf>
}

"igo_nr24" {
<include/bench/igo_nr_s24.conf>
}

"igo_nr32" {
<include/bench/igo_nr_s32.conf>
}

#
# RTNR component
#
Expand Down
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 @@ -15,6 +15,7 @@ set(components
"eqiir"
"eqfir"
"gain"
"igo_nr"
"rtnr"
)

Expand All @@ -25,6 +26,7 @@ set(component_parameters
"BENCH_EQIIR_PARAMS=highpass_50hz_0db_48khz"
"BENCH_EQFIR_PARAMS=loudness"
"BENCH_GAIN_PARAMS=default"
"BENCH_IGO_NR_PARAMS=default"
"BENCH_RTNR_PARAMS=default"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Created initially with script "./bench_comp_generate.sh igo_nr"
# may need edits to modify controls
Object.Control {
# Un-comment the supported controls in IGO_NR
bytes."1" {
name '$ANALOG_CAPTURE_PCM IGO_NR bytes'
Object.Base.data.1 {
# Data is ipc4 header modified copy from
# tools/topology/topology1/sof/pipe-igonr-capture.m4
bytes "0x53,0x4f,0x46,0x34,
0x00,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x20,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x3d,0x00,0x00,0x00,
0x09,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x20,0x00,0x00,
0x34,0x03,0x00,0x00,
0x00,0x00,0x00,0x00"
}
}
mixer."1" {
name '$ANALOG_CAPTURE_PCM IGO_NR enable'
}
#enum."1" {
# name '$ANALOG_CAPTURE_PCM IGO_NR enum'
#}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Created initially with script "./bench_comp_generate.sh igo_nr"
# may need edits to modify controls
Object.Control {
# Un-comment the supported controls in IGO_NR
bytes."1" {
name '$ANALOG_PLAYBACK_PCM IGO_NR bytes'
Object.Base.data.1 {
# Data is ipc4 header modified copy from
# tools/topology/topology1/sof/pipe-igonr-capture.m4
bytes "0x53,0x4f,0x46,0x34,
0x00,0x00,0x00,0x00,
0x44,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x20,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,
0x02,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
0x3d,0x00,0x00,0x00,
0x09,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x20,0x00,0x00,
0x34,0x03,0x00,0x00,
0x00,0x00,0x00,0x00"
}
}
mixer."1" {
name '$ANALOG_PLAYBACK_PCM IGO_NR enable'
}
#enum."1" {
# name '$ANALOG_PLAYBACK_PCM IGO_NR enum'
#}
}
19 changes: 19 additions & 0 deletions tools/topology/topology2/include/bench/igo_nr_hda_route.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Created with script "./bench_comp_generate.sh igo_nr"
Object.Base.route [
{
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
source 'igo_nr.1.1'
}
{
sink 'igo_nr.1.1'
source 'host-copier.0.playback'
}
{
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
sink 'igo_nr.3.2'
}
{
source 'igo_nr.3.2'
sink 'host-copier.0.capture'
}
]
13 changes: 13 additions & 0 deletions tools/topology/topology2/include/bench/igo_nr_s16.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Created with script "./bench_comp_generate.sh igo_nr"
Object.Widget.igo_nr.1 {
index 1
<include/bench/one_input_output_format_s16.conf>
<include/bench/igo_nr_controls_playback.conf>
}
Object.Widget.igo_nr.2 {
index 3
<include/bench/one_input_output_format_s16.conf>
<include/bench/igo_nr_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s16.conf>
<include/bench/igo_nr_hda_route.conf>
13 changes: 13 additions & 0 deletions tools/topology/topology2/include/bench/igo_nr_s24.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Created with script "./bench_comp_generate.sh igo_nr"
Object.Widget.igo_nr.1 {
index 1
<include/bench/one_input_output_format_s24.conf>
<include/bench/igo_nr_controls_playback.conf>
}
Object.Widget.igo_nr.2 {
index 3
<include/bench/one_input_output_format_s24.conf>
<include/bench/igo_nr_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s24.conf>
<include/bench/igo_nr_hda_route.conf>
13 changes: 13 additions & 0 deletions tools/topology/topology2/include/bench/igo_nr_s32.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Created with script "./bench_comp_generate.sh igo_nr"
Object.Widget.igo_nr.1 {
index 1
<include/bench/one_input_output_format_s32.conf>
<include/bench/igo_nr_controls_playback.conf>
}
Object.Widget.igo_nr.2 {
index 3
<include/bench/one_input_output_format_s32.conf>
<include/bench/igo_nr_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s32.conf>
<include/bench/igo_nr_hda_route.conf>

0 comments on commit 2101f88

Please sign in to comment.