Skip to content

Commit 0774fc2

Browse files
singalsulgirdwood
authored andcommitted
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 2c7b820 commit 0774fc2

15 files changed

+362
-1
lines changed

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

Lines changed: 51 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,56 @@ IncludeByKey.BENCH_CONFIG {
900901
<include/bench/src_lite_s32.conf>
901902
}
902903

904+
#
905+
# stft_process component, with five different blob configurations.
906+
#
907+
908+
"stft_process_192_48_16" {
909+
<include/bench/stft_process_s16.conf>
910+
}
911+
"stft_process_192_48_24" {
912+
<include/bench/stft_process_s24.conf>
913+
}
914+
"stft_process_192_48_32" {
915+
<include/bench/stft_process_s32.conf>
916+
}
917+
"stft_process_512_128_16" {
918+
<include/bench/stft_process_s16.conf>
919+
}
920+
"stft_process_512_128_24" {
921+
<include/bench/stft_process_s24.conf>
922+
}
923+
"stft_process_512_128_32" {
924+
<include/bench/stft_process_s32.conf>
925+
}
926+
"stft_process_768_120_16" {
927+
<include/bench/stft_process_s16.conf>
928+
}
929+
"stft_process_768_120_24" {
930+
<include/bench/stft_process_s24.conf>
931+
}
932+
"stft_process_768_120_32" {
933+
<include/bench/stft_process_s32.conf>
934+
}
935+
"stft_process_1024_256_16" {
936+
<include/bench/stft_process_s16.conf>
937+
}
938+
"stft_process_1024_256_24" {
939+
<include/bench/stft_process_s24.conf>
940+
}
941+
"stft_process_1024_256_32" {
942+
<include/bench/stft_process_s32.conf>
943+
}
944+
"stft_process_1536_240_16" {
945+
<include/bench/stft_process_s16.conf>
946+
}
947+
"stft_process_1536_240_24" {
948+
<include/bench/stft_process_s24.conf>
949+
}
950+
"stft_process_1536_240_32" {
951+
<include/bench/stft_process_s32.conf>
952+
}
953+
903954
#
904955
# tdfb component
905956
#

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

Lines changed: 51 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,56 @@ IncludeByKey.BENCH_CONFIG {
523524
<include/bench/src_lite_s32.conf>
524525
}
525526

527+
#
528+
# stft_process component, with five different blob configurations.
529+
#
530+
531+
"stft_process_192_48_16" {
532+
<include/bench/stft_process_s16.conf>
533+
}
534+
"stft_process_192_48_24" {
535+
<include/bench/stft_process_s24.conf>
536+
}
537+
"stft_process_192_48_32" {
538+
<include/bench/stft_process_s32.conf>
539+
}
540+
"stft_process_512_128_16" {
541+
<include/bench/stft_process_s16.conf>
542+
}
543+
"stft_process_512_128_24" {
544+
<include/bench/stft_process_s24.conf>
545+
}
546+
"stft_process_512_128_32" {
547+
<include/bench/stft_process_s32.conf>
548+
}
549+
"stft_process_768_120_16" {
550+
<include/bench/stft_process_s16.conf>
551+
}
552+
"stft_process_768_120_24" {
553+
<include/bench/stft_process_s24.conf>
554+
}
555+
"stft_process_768_120_32" {
556+
<include/bench/stft_process_s32.conf>
557+
}
558+
"stft_process_1024_256_16" {
559+
<include/bench/stft_process_s16.conf>
560+
}
561+
"stft_process_1024_256_24" {
562+
<include/bench/stft_process_s24.conf>
563+
}
564+
"stft_process_1024_256_32" {
565+
<include/bench/stft_process_s32.conf>
566+
}
567+
"stft_process_1536_240_16" {
568+
<include/bench/stft_process_s16.conf>
569+
}
570+
"stft_process_1536_240_24" {
571+
<include/bench/stft_process_s24.conf>
572+
}
573+
"stft_process_1536_240_32" {
574+
<include/bench/stft_process_s32.conf>
575+
}
576+
526577
#
527578
# tdfb component
528579
#

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ set(components
2323
"sound_dose"
2424
"src"
2525
"src_lite"
26+
"stft_process_192_48_"
27+
"stft_process_512_128_"
28+
"stft_process_768_120_"
29+
"stft_process_1024_256_"
30+
"stft_process_1536_240_"
2631
"tdfb"
2732
"template_comp"
2833
)
@@ -43,6 +48,11 @@ set(component_parameters
4348
"BENCH_SOUND_DOSE_PARAMS=default"
4449
"BENCH_SRC_PARAMS=default"
4550
"BENCH_SRC_LITE_PARAMS=default"
51+
"BENCH_STFT_PROCESS_PARAMS=hann_192_48"
52+
"BENCH_STFT_PROCESS_PARAMS=hann_512_128"
53+
"BENCH_STFT_PROCESS_PARAMS=hann_768_120"
54+
"BENCH_STFT_PROCESS_PARAMS=hann_1024_256"
55+
"BENCH_STFT_PROCESS_PARAMS=hann_1536_240"
4656
"BENCH_TDFB_PARAMS=default"
4757
"BENCH_TEMPLATE_COMP_PARAMS=default"
4858
)
@@ -74,7 +84,7 @@ foreach(sf ${sampleformats})
7484
list(APPEND TPLGS "${item}")
7585
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}")
7686
list(APPEND TPLGS "${item}")
77-
# #message(STATUS "Item=" ${item})
87+
#message(STATUS "Item=" ${item})
7888
endforeach()
7989
endforeach()
8090

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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_192_48" "include/components/stft_process/hann_192_48.conf"
9+
"hann_512_128" "include/components/stft_process/hann_512_128.conf"
10+
"hann_768_120" "include/components/stft_process/hann_768_120.conf"
11+
"hann_1024_256" "include/components/stft_process/hann_1024_256.conf"
12+
"hann_1536_240" "include/components/stft_process/hann_1536_240.conf"
13+
}
14+
}
15+
#mixer."1" {
16+
# name '$ANALOG_CAPTURE_PCM STFT_PROCESS switch or volume'
17+
#}
18+
#enum."1" {
19+
# name '$ANALOG_CAPTURE_PCM STFT_PROCESS enum'
20+
#}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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_192_48" "include/components/stft_process/hann_192_48.conf"
9+
"hann_512_128" "include/components/stft_process/hann_512_128.conf"
10+
"hann_768_120" "include/components/stft_process/hann_768_120.conf"
11+
"hann_1024_256" "include/components/stft_process/hann_1024_256.conf"
12+
"hann_1536_240" "include/components/stft_process/hann_1536_240.conf"
13+
}
14+
}
15+
#mixer."1" {
16+
# name '$ANALOG_PLAYBACK_PCM STFT_PROCESS switch or volume'
17+
#}
18+
#enum."1" {
19+
# name '$ANALOG_PLAYBACK_PCM STFT_PROCESS enum'
20+
#}
21+
}
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)