Skip to content

Commit 02eb3f3

Browse files
committed
Tools: Topology: Add STFT process test topology
This patch adds build of topologies to test the STFT process module. The topologies initialize the processing for 512, 768, 1024 and 1536 size FFTs. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 66cdcf5 commit 02eb3f3

14 files changed

+323
-1
lines changed

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<sound_dose.conf>
4949
<src.conf>
5050
<src_lite.conf>
51+
<stft_process.conf>
5152
<tdfb.conf>
5253
<template_comp.conf>
5354

@@ -900,6 +901,47 @@ IncludeByKey.BENCH_CONFIG {
900901
<include/bench/src_lite_s32.conf>
901902
}
902903

904+
#
905+
# stft_process component, with four different blob configurations
906+
#
907+
908+
"stft_process_512_128_16" {
909+
<include/bench/stft_process_s16.conf>
910+
}
911+
"stft_process_512_128_24" {
912+
<include/bench/stft_process_s24.conf>
913+
}
914+
"stft_process_512_128_32" {
915+
<include/bench/stft_process_s32.conf>
916+
}
917+
"stft_process_768_120_16" {
918+
<include/bench/stft_process_s16.conf>
919+
}
920+
"stft_process_768_120_24" {
921+
<include/bench/stft_process_s24.conf>
922+
}
923+
"stft_process_768_120_32" {
924+
<include/bench/stft_process_s32.conf>
925+
}
926+
"stft_process_1024_256_16" {
927+
<include/bench/stft_process_s16.conf>
928+
}
929+
"stft_process_1024_256_24" {
930+
<include/bench/stft_process_s24.conf>
931+
}
932+
"stft_process_1024_256_32" {
933+
<include/bench/stft_process_s32.conf>
934+
}
935+
"stft_process_1536_240_16" {
936+
<include/bench/stft_process_s16.conf>
937+
}
938+
"stft_process_1536_240_24" {
939+
<include/bench/stft_process_s24.conf>
940+
}
941+
"stft_process_1536_240_32" {
942+
<include/bench/stft_process_s32.conf>
943+
}
944+
903945
#
904946
# tdfb component
905947
#

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<sound_dose.conf>
4646
<src.conf>
4747
<src_lite.conf>
48+
<stft_process.conf>
4849
<tdfb.conf>
4950
<template_comp.conf>
5051

@@ -523,6 +524,47 @@ IncludeByKey.BENCH_CONFIG {
523524
<include/bench/src_lite_s32.conf>
524525
}
525526

527+
#
528+
# stft_process component, with four different blob configurations
529+
#
530+
531+
"stft_process_512_128_16" {
532+
<include/bench/stft_process_s16.conf>
533+
}
534+
"stft_process_512_128_24" {
535+
<include/bench/stft_process_s24.conf>
536+
}
537+
"stft_process_512_128_32" {
538+
<include/bench/stft_process_s32.conf>
539+
}
540+
"stft_process_768_120_16" {
541+
<include/bench/stft_process_s16.conf>
542+
}
543+
"stft_process_768_120_24" {
544+
<include/bench/stft_process_s24.conf>
545+
}
546+
"stft_process_768_120_32" {
547+
<include/bench/stft_process_s32.conf>
548+
}
549+
"stft_process_1024_256_16" {
550+
<include/bench/stft_process_s16.conf>
551+
}
552+
"stft_process_1024_256_24" {
553+
<include/bench/stft_process_s24.conf>
554+
}
555+
"stft_process_1024_256_32" {
556+
<include/bench/stft_process_s32.conf>
557+
}
558+
"stft_process_1536_240_16" {
559+
<include/bench/stft_process_s16.conf>
560+
}
561+
"stft_process_1536_240_24" {
562+
<include/bench/stft_process_s24.conf>
563+
}
564+
"stft_process_1536_240_32" {
565+
<include/bench/stft_process_s32.conf>
566+
}
567+
526568
#
527569
# tdfb component
528570
#

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ set(components
2323
"sound_dose"
2424
"src"
2525
"src_lite"
26+
"stft_process_512_128_"
27+
"stft_process_768_120_"
28+
"stft_process_1024_256_"
29+
"stft_process_1536_240_"
2630
"tdfb"
2731
"template_comp"
2832
)
@@ -43,6 +47,10 @@ set(component_parameters
4347
"BENCH_SOUND_DOSE_PARAMS=default"
4448
"BENCH_SRC_PARAMS=default"
4549
"BENCH_SRC_LITE_PARAMS=default"
50+
"BENCH_STFT_PROCESS_PARAMS=hann_512_128"
51+
"BENCH_STFT_PROCESS_PARAMS=hann_768_120"
52+
"BENCH_STFT_PROCESS_PARAMS=hann_1024_256"
53+
"BENCH_STFT_PROCESS_PARAMS=hann_1536_240"
4654
"BENCH_TDFB_PARAMS=default"
4755
"BENCH_TEMPLATE_COMP_PARAMS=default"
4856
)
@@ -74,7 +82,7 @@ foreach(sf ${sampleformats})
7482
list(APPEND TPLGS "${item}")
7583
set(item "cavs-benchmark-sdw\;sof-${plat}-sdw-benchmark-${comp}${sf}-simplejack\;PLATFORM=${plat},SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,BENCH_MODULE_FORMAT=s${sf},BENCH_CONFIG=${comp}${sf},${bench_param}")
7684
list(APPEND TPLGS "${item}")
77-
# #message(STATUS "Item=" ${item})
85+
#message(STATUS "Item=" ${item})
7886
endforeach()
7987
endforeach()
8088

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Created initially with script "./bench_comp_generate.sh stft_process"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in STFT_PROCESS
5+
bytes."1" {
6+
name '$ANALOG_CAPTURE_PCM STFT_PROCESS bytes'
7+
IncludeByKey.BENCH_STFT_PROCESS_PARAMS {
8+
"hann_512_128" "include/components/stft_process/hann_512_128.conf"
9+
"hann_768_120" "include/components/stft_process/hann_768_120.conf"
10+
"hann_1024_256" "include/components/stft_process/hann_1024_256.conf"
11+
"hann_1536_240" "include/components/stft_process/hann_1536_240.conf"
12+
}
13+
}
14+
#mixer."1" {
15+
# name '$ANALOG_CAPTURE_PCM STFT_PROCESS switch or volume'
16+
#}
17+
#enum."1" {
18+
# name '$ANALOG_CAPTURE_PCM STFT_PROCESS enum'
19+
#}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Created initially with script "./bench_comp_generate.sh stft_process"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in STFT_PROCESS
5+
bytes."1" {
6+
name '$ANALOG_PLAYBACK_PCM STFT_PROCESS bytes'
7+
IncludeByKey.BENCH_STFT_PROCESS_PARAMS {
8+
"hann_512_128" "include/components/stft_process/hann_512_128.conf"
9+
"hann_768_120" "include/components/stft_process/hann_768_120.conf"
10+
"hann_1024_256" "include/components/stft_process/hann_1024_256.conf"
11+
"hann_1536_240" "include/components/stft_process/hann_1536_240.conf"
12+
}
13+
}
14+
#mixer."1" {
15+
# name '$ANALOG_PLAYBACK_PCM STFT_PROCESS switch or volume'
16+
#}
17+
#enum."1" {
18+
# name '$ANALOG_PLAYBACK_PCM STFT_PROCESS enum'
19+
#}
20+
}
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 stft_process"
2+
Object.Base.route [
3+
{
4+
sink '$BENCH_PLAYBACK_DAI_COPIER'
5+
source 'stft_process.$BENCH_PLAYBACK_HOST_PIPELINE.1'
6+
}
7+
{
8+
sink 'stft_process.$BENCH_PLAYBACK_HOST_PIPELINE.1'
9+
source 'host-copier.0.playback'
10+
}
11+
{
12+
source '$BENCH_CAPTURE_DAI_COPIER'
13+
sink 'stft_process.$BENCH_CAPTURE_HOST_PIPELINE.2'
14+
}
15+
{
16+
source 'stft_process.$BENCH_CAPTURE_HOST_PIPELINE.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 stft_process"
2+
Object.Widget.stft_process.1 {
3+
index $BENCH_PLAYBACK_HOST_PIPELINE
4+
<include/bench/one_input_output_format_s16.conf>
5+
<include/bench/stft_process_controls_playback.conf>
6+
}
7+
Object.Widget.stft_process.2 {
8+
index $BENCH_CAPTURE_HOST_PIPELINE
9+
<include/bench/one_input_output_format_s16.conf>
10+
<include/bench/stft_process_controls_capture.conf>
11+
}
12+
<include/bench/host_gateway_pipelines_s16.conf>
13+
<include/bench/stft_process_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 stft_process"
2+
Object.Widget.stft_process.1 {
3+
index $BENCH_PLAYBACK_HOST_PIPELINE
4+
<include/bench/one_input_output_format_s24.conf>
5+
<include/bench/stft_process_controls_playback.conf>
6+
}
7+
Object.Widget.stft_process.2 {
8+
index $BENCH_CAPTURE_HOST_PIPELINE
9+
<include/bench/one_input_output_format_s24.conf>
10+
<include/bench/stft_process_controls_capture.conf>
11+
}
12+
<include/bench/host_gateway_pipelines_s24.conf>
13+
<include/bench/stft_process_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 stft_process"
2+
Object.Widget.stft_process.1 {
3+
index $BENCH_PLAYBACK_HOST_PIPELINE
4+
<include/bench/one_input_output_format_s32.conf>
5+
<include/bench/stft_process_controls_playback.conf>
6+
}
7+
Object.Widget.stft_process.2 {
8+
index $BENCH_CAPTURE_HOST_PIPELINE
9+
<include/bench/one_input_output_format_s32.conf>
10+
<include/bench/stft_process_controls_capture.conf>
11+
}
12+
<include/bench/host_gateway_pipelines_s32.conf>
13+
<include/bench/stft_process_route.conf>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#
2+
#
3+
# A STFT_PROCESS component for SOF. All attributes defined herein are namespaced
4+
# by alsatplg to "Object.Widget.stft_process.attribute_name"
5+
#
6+
# Usage: this component can be used by declaring in the parent object. i.e.
7+
#
8+
# Object.Widget.stft_process."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+
Class.Widget."stft_process" {
17+
#
18+
# Pipeline ID
19+
#
20+
DefineAttribute."index" {
21+
type "integer"
22+
}
23+
24+
#
25+
# Unique instance for STFT_PROCESS widget
26+
#
27+
DefineAttribute."instance" {
28+
type "integer"
29+
}
30+
31+
# Include common widget attributes definition
32+
<include/components/widget-common.conf>
33+
34+
attributes {
35+
!constructor [
36+
"index"
37+
"instance"
38+
]
39+
!mandatory [
40+
"num_input_pins"
41+
"num_output_pins"
42+
"num_input_audio_formats"
43+
"num_output_audio_formats"
44+
]
45+
46+
!immutable [
47+
"uuid"
48+
"type"
49+
]
50+
!deprecated [
51+
"preload_count"
52+
]
53+
unique "instance"
54+
}
55+
56+
#
57+
# Default attributes for stft_process
58+
#
59+
uuid "a6:6e:11:0d:50:91:de:46:98:b8:b2:b3:a7:91:da:29"
60+
type "effect"
61+
no_pm "true"
62+
num_input_pins 1
63+
num_output_pins 1
64+
}

0 commit comments

Comments
 (0)