Skip to content

Commit 2bc6ae2

Browse files
committed
[Do not review] Tools: Topology2: Add topology with IGO NR
Use sof-hda-benchmark topology to run igo_nr. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent c2056eb commit 2bc6ae2

9 files changed

Lines changed: 256 additions & 0 deletions

File tree

tools/topology/topology2/cavs-benchmark-hda.conf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<include/components/dcblock.conf>
2+
<include/components/igo_nr.conf>
23

34
Define {
45
ANALOG_PLAYBACK_PCM 'Analog Playback'
@@ -243,4 +244,21 @@ IncludeByKey.BENCH_CONFIG {
243244
"eqiir32" {
244245
<include/bench/eqiir_s32.conf>
245246
}
247+
248+
#
249+
# IGO NR component
250+
#
251+
252+
"igo_nr16" {
253+
<include/bench/igo_nr_s16.conf>
254+
}
255+
256+
"igo_nr24" {
257+
<include/bench/igo_nr_s24.conf>
258+
}
259+
260+
"igo_nr32" {
261+
<include/bench/igo_nr_s32.conf>
262+
}
263+
246264
}

tools/topology/topology2/development/tplg-targets.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-nocodec-bt-mtl-lbm.bin"
138138
"sof-hda-generic\;sof-hda-benchmark-eqfir16-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqfir16,BENCH_EQFIR_PARAMS=loudness"
139139
"sof-hda-generic\;sof-hda-benchmark-eqfir24-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqfir24,BENCH_EQFIR_PARAMS=loudness"
140140
"sof-hda-generic\;sof-hda-benchmark-eqfir32-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqfir32,BENCH_EQFIR_PARAMS=loudness"
141+
"sof-hda-generic\;sof-hda-benchmark-igo_nr16-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=igo_nr16"
142+
"sof-hda-generic\;sof-hda-benchmark-igo_nr24-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=igo_nr24"
143+
"sof-hda-generic\;sof-hda-benchmark-igo_nr32-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=igo_nr32"
141144

142145
# Topology to test IPC4 Crossover
143146
"development/cavs-nocodec-crossover\;sof-tgl-nocodec-crossover-2way\;PLATFORM=tgl,\
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Created initially with script "./bench_comp_generate.sh igo_nr"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in IGO_NR
5+
bytes."1" {
6+
name '$ANALOG_CAPTURE_PCM IGO_NR bytes'
7+
Object.Base.data.1 {
8+
# Data is ipc4 header modified copy from
9+
# tools/topology/topology1/sof/pipe-igonr-capture.m4
10+
bytes "0x53,0x4f,0x46,0x34,
11+
0x00,0x00,0x00,0x00,
12+
0x44,0x00,0x00,0x00,
13+
0x00,0x00,0x00,0x03,
14+
0x00,0x00,0x00,0x00,
15+
0x00,0x00,0x00,0x00,
16+
0x00,0x00,0x00,0x00,
17+
0x00,0x00,0x00,0x00,
18+
0x00,0x20,0x00,0x00,
19+
0x00,0x00,0x00,0x00,
20+
0x00,0x00,0x00,0x00,
21+
0x01,0x00,0x00,0x00,
22+
0x01,0x00,0x00,0x00,
23+
0x01,0x00,0x00,0x00,
24+
0x01,0x00,0x00,0x00,
25+
0x02,0x00,0x00,0x00,
26+
0x02,0x00,0x00,0x00,
27+
0x02,0x00,0x00,0x00,
28+
0x01,0x00,0x00,0x00,
29+
0x3d,0x00,0x00,0x00,
30+
0x09,0x00,0x00,0x00,
31+
0x00,0x00,0x00,0x00,
32+
0x00,0x20,0x00,0x00,
33+
0x34,0x03,0x00,0x00,
34+
0x00,0x00,0x00,0x00"
35+
}
36+
}
37+
mixer."1" {
38+
name '$ANALOG_CAPTURE_PCM IGO_NR enable'
39+
}
40+
#enum."1" {
41+
# name '$ANALOG_CAPTURE_PCM IGO_NR enum'
42+
#}
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Created initially with script "./bench_comp_generate.sh igo_nr"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in IGO_NR
5+
bytes."1" {
6+
name '$ANALOG_PLAYBACK_PCM IGO_NR bytes'
7+
Object.Base.data.1 {
8+
# Data is ipc4 header modified copy from
9+
# tools/topology/topology1/sof/pipe-igonr-capture.m4
10+
bytes "0x53,0x4f,0x46,0x34,
11+
0x00,0x00,0x00,0x00,
12+
0x44,0x00,0x00,0x00,
13+
0x00,0x00,0x00,0x03,
14+
0x00,0x00,0x00,0x00,
15+
0x00,0x00,0x00,0x00,
16+
0x00,0x00,0x00,0x00,
17+
0x00,0x00,0x00,0x00,
18+
0x00,0x20,0x00,0x00,
19+
0x00,0x00,0x00,0x00,
20+
0x00,0x00,0x00,0x00,
21+
0x01,0x00,0x00,0x00,
22+
0x01,0x00,0x00,0x00,
23+
0x01,0x00,0x00,0x00,
24+
0x01,0x00,0x00,0x00,
25+
0x02,0x00,0x00,0x00,
26+
0x02,0x00,0x00,0x00,
27+
0x02,0x00,0x00,0x00,
28+
0x01,0x00,0x00,0x00,
29+
0x3d,0x00,0x00,0x00,
30+
0x09,0x00,0x00,0x00,
31+
0x00,0x00,0x00,0x00,
32+
0x00,0x20,0x00,0x00,
33+
0x34,0x03,0x00,0x00,
34+
0x00,0x00,0x00,0x00"
35+
}
36+
}
37+
mixer."1" {
38+
name '$ANALOG_PLAYBACK_PCM IGO_NR enable'
39+
}
40+
#enum."1" {
41+
# name '$ANALOG_PLAYBACK_PCM IGO_NR enum'
42+
#}
43+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Created with script "./bench_comp_generate.sh igo_nr"
2+
Object.Base.route [
3+
{
4+
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
5+
source 'igo_nr.1.1'
6+
}
7+
{
8+
sink 'igo_nr.1.1'
9+
source 'host-copier.0.playback'
10+
}
11+
{
12+
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
13+
sink 'igo_nr.3.2'
14+
}
15+
{
16+
source 'igo_nr.3.2'
17+
sink 'host-copier.0.capture'
18+
}
19+
]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Created with script "./bench_comp_generate.sh igo_nr"
2+
Object.Widget.igo_nr.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s16.conf>
5+
<include/bench/igo_nr_controls_playback.conf>
6+
}
7+
Object.Widget.igo_nr.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s16.conf>
10+
<include/bench/igo_nr_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s16.conf>
13+
<include/bench/igo_nr_hda_route.conf>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Created with script "./bench_comp_generate.sh igo_nr"
2+
Object.Widget.igo_nr.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s24.conf>
5+
<include/bench/igo_nr_controls_playback.conf>
6+
}
7+
Object.Widget.igo_nr.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s24.conf>
10+
<include/bench/igo_nr_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s24.conf>
13+
<include/bench/igo_nr_hda_route.conf>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Created with script "./bench_comp_generate.sh igo_nr"
2+
Object.Widget.igo_nr.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s32.conf>
5+
<include/bench/igo_nr_controls_playback.conf>
6+
}
7+
Object.Widget.igo_nr.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s32.conf>
10+
<include/bench/igo_nr_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s32.conf>
13+
<include/bench/igo_nr_hda_route.conf>
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#
2+
#
3+
# A generic IGO_NR component. All attributes defined herein are namespaced
4+
# by alsatplg to "Object.Widget.igo_nr.attribute_name"
5+
#
6+
# Usage: this component can be used by declaring in the parent object. i.e.
7+
#
8+
# Object.Widget.igo_nr."N" {
9+
# index 1
10+
# }
11+
# }
12+
13+
#
14+
# Where M is pipeline ID and N is a unique integer in the parent object.
15+
16+
<include/controls/mixer.conf>
17+
18+
Class.Widget."igo_nr" {
19+
#
20+
# Pipeline ID
21+
#
22+
DefineAttribute."index" {
23+
type "integer"
24+
}
25+
26+
#
27+
# Unique instance for IGO_NR widget
28+
#
29+
DefineAttribute."instance" {
30+
type "integer"
31+
}
32+
33+
# Include common widget attributes definition
34+
<include/components/widget-common.conf>
35+
36+
attributes {
37+
!constructor [
38+
"index"
39+
"instance"
40+
]
41+
!mandatory [
42+
"num_input_pins"
43+
"num_output_pins"
44+
"num_input_audio_formats"
45+
"num_output_audio_formats"
46+
]
47+
48+
!immutable [
49+
"uuid"
50+
"type"
51+
]
52+
!deprecated [
53+
"preload_count"
54+
]
55+
unique "instance"
56+
}
57+
58+
#
59+
# IGO_NR widget switch control
60+
#
61+
Object.Control {
62+
# Switch controls
63+
mixer."1" {
64+
Object.Base.channel.1 {
65+
name "fl"
66+
shift 0
67+
}
68+
Object.Base.channel.2 {
69+
name "fr"
70+
}
71+
Object.Base.ops.1 {
72+
name "ctl"
73+
info "volsw"
74+
#259 binds the mixer control to switch get/put handlers
75+
get 259
76+
put 259
77+
}
78+
max 1
79+
}
80+
}
81+
82+
#
83+
# Default attributes for igo_nr
84+
#
85+
# 696ae2bc-2877-11eb-adc1-0242ac120002
86+
uuid "bc:e2:6a:69:77:28:eb:11:ad:c1:02:42:ac:12:00:02"
87+
type "effect"
88+
no_pm "true"
89+
num_input_pins 1
90+
num_output_pins 1
91+
}

0 commit comments

Comments
 (0)