Skip to content

Commit 16baccf

Browse files
committed
Tools: Topology: Add test topologies for MFCC
There was earlier only topology1 for MFCC. This patch adds topologies sof-hda-benchmark-mfcc16/24/32.tplg and sof-mtl-sdw-benchmark-mfcc16/24/32-sdw0/simplejack.tplg to be able to test the component in testbench environment. Note: Due to 16 kHz DAI rate these can't be used in real devices. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent c6220a8 commit 16baccf

9 files changed

Lines changed: 315 additions & 0 deletions

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<gain.conf>
4141
<igo_nr.conf>
4242
<level_multiplier.conf>
43+
<mfcc.conf>
4344
<micsel.conf>
4445
<mixin.conf>
4546
<mixout.conf>
@@ -817,6 +818,22 @@ IncludeByKey.BENCH_CONFIG {
817818
<include/bench/level_multiplier_s32.conf>
818819
}
819820

821+
#
822+
# MFCC component
823+
#
824+
825+
"mfcc16" {
826+
<include/bench/mfcc_s16.conf>
827+
}
828+
829+
"mfcc24" {
830+
<include/bench/mfcc_s24.conf>
831+
}
832+
833+
"mfcc32" {
834+
<include/bench/mfcc_s32.conf>
835+
}
836+
820837
#
821838
# Micsel component
822839
#

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<gain.conf>
4040
<igo_nr.conf>
4141
<level_multiplier.conf>
42+
<mfcc.conf>
4243
<micsel.conf>
4344
<multiband_drc.conf>
4445
<rtnr.conf>
@@ -440,6 +441,22 @@ IncludeByKey.BENCH_CONFIG {
440441
<include/bench/level_multiplier_s32.conf>
441442
}
442443

444+
#
445+
# MFCC component
446+
#
447+
448+
"mfcc16" {
449+
<include/bench/mfcc_s16.conf>
450+
}
451+
452+
"mfcc24" {
453+
<include/bench/mfcc_s24.conf>
454+
}
455+
456+
"mfcc32" {
457+
<include/bench/mfcc_s32.conf>
458+
}
459+
443460
#
444461
# Micsel component
445462
#

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ set(components
1818
"gain"
1919
"igo_nr"
2020
"level_multiplier"
21+
"mfcc"
2122
"micsel"
2223
"rtnr"
2324
"sound_dose"
@@ -43,6 +44,7 @@ set(component_parameters
4344
"BENCH_GAIN_PARAMS=default"
4445
"BENCH_IGO_NR_PARAMS=default"
4546
"BENCH_LEVEL_MULTIPLIER_PARAMS=default"
47+
"BENCH_MFCC_PARAMS=default"
4648
"BENCH_MICSEL_PARAMS=passthrough"
4749
"BENCH_RTNR_PARAMS=default"
4850
"BENCH_SOUND_DOSE_PARAMS=default"
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Object.Pipeline {
2+
host-gateway-playback [
3+
{
4+
index $BENCH_PLAYBACK_HOST_PIPELINE
5+
Object.Widget.host-copier.1 {
6+
stream_name $ANALOG_PLAYBACK_PCM
7+
pcm_id 0
8+
num_input_audio_formats 3
9+
num_output_audio_formats 1
10+
Object.Base.input_audio_format [
11+
{
12+
in_bit_depth 16
13+
in_valid_bit_depth 16
14+
in_rate 16000
15+
}
16+
{
17+
in_bit_depth 32
18+
in_valid_bit_depth 24
19+
in_rate 16000
20+
}
21+
{
22+
in_bit_depth 32
23+
in_valid_bit_depth 32
24+
in_rate 16000
25+
}
26+
]
27+
Object.Base.output_audio_format [
28+
{
29+
out_bit_depth 16
30+
out_valid_bit_depth 16
31+
out_rate 16000
32+
}
33+
]
34+
}
35+
}
36+
]
37+
38+
host-gateway-capture [
39+
{
40+
index $BENCH_CAPTURE_HOST_PIPELINE
41+
Object.Widget.host-copier.1 {
42+
stream_name $ANALOG_CAPTURE_PCM
43+
pcm_id 0
44+
num_input_audio_formats 1
45+
num_output_audio_formats 3
46+
Object.Base.input_audio_format [
47+
{
48+
in_bit_depth 16
49+
in_valid_bit_depth 16
50+
in_rate 16000
51+
}
52+
]
53+
Object.Base.output_audio_format [
54+
{
55+
out_bit_depth 16
56+
out_valid_bit_depth 16
57+
out_rate 16000
58+
}
59+
{
60+
out_bit_depth 32
61+
out_valid_bit_depth 24
62+
out_rate 16000
63+
}
64+
{
65+
out_bit_depth 32
66+
out_valid_bit_depth 32
67+
out_rate 16000
68+
}
69+
]
70+
}
71+
}
72+
]
73+
}
74+
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Object.Pipeline {
2+
host-gateway-playback [
3+
{
4+
index $BENCH_PLAYBACK_HOST_PIPELINE
5+
Object.Widget.host-copier.1 {
6+
stream_name $ANALOG_PLAYBACK_PCM
7+
pcm_id 0
8+
num_input_audio_formats 3
9+
num_output_audio_formats 1
10+
Object.Base.input_audio_format [
11+
{
12+
in_bit_depth 16
13+
in_valid_bit_depth 16
14+
in_rate 16000
15+
}
16+
{
17+
in_bit_depth 32
18+
in_valid_bit_depth 24
19+
in_rate 16000
20+
}
21+
{
22+
in_bit_depth 32
23+
in_valid_bit_depth 32
24+
in_rate 16000
25+
}
26+
]
27+
Object.Base.output_audio_format [
28+
{
29+
out_bit_depth 32
30+
out_valid_bit_depth 24
31+
out_rate 16000
32+
}
33+
]
34+
}
35+
}
36+
]
37+
38+
host-gateway-capture [
39+
{
40+
index $BENCH_CAPTURE_HOST_PIPELINE
41+
Object.Widget.host-copier.1 {
42+
stream_name $ANALOG_CAPTURE_PCM
43+
pcm_id 0
44+
num_input_audio_formats 1
45+
num_output_audio_formats 3
46+
Object.Base.input_audio_format [
47+
{
48+
in_bit_depth 32
49+
in_valid_bit_depth 24
50+
in_rate 16000
51+
}
52+
]
53+
Object.Base.output_audio_format [
54+
{
55+
out_bit_depth 16
56+
out_valid_bit_depth 16
57+
out_rate 16000
58+
}
59+
{
60+
out_bit_depth 32
61+
out_valid_bit_depth 24
62+
out_rate 16000
63+
}
64+
{
65+
out_bit_depth 32
66+
out_valid_bit_depth 32
67+
out_rate 16000
68+
}
69+
]
70+
}
71+
}
72+
]
73+
}
74+
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Object.Pipeline {
2+
host-gateway-playback [
3+
{
4+
index $BENCH_PLAYBACK_HOST_PIPELINE
5+
Object.Widget.host-copier.1 {
6+
stream_name $ANALOG_PLAYBACK_PCM
7+
pcm_id 0
8+
num_input_audio_formats 3
9+
num_output_audio_formats 1
10+
Object.Base.input_audio_format [
11+
{
12+
in_bit_depth 16
13+
in_valid_bit_depth 16
14+
in_rate 16000
15+
}
16+
{
17+
in_bit_depth 32
18+
in_valid_bit_depth 24
19+
in_rate 16000
20+
}
21+
{
22+
in_bit_depth 32
23+
in_valid_bit_depth 32
24+
in_rate 16000
25+
}
26+
]
27+
Object.Base.output_audio_format [
28+
{
29+
out_bit_depth 32
30+
out_valid_bit_depth 32
31+
out_rate 16000
32+
}
33+
]
34+
}
35+
}
36+
]
37+
38+
host-gateway-capture [
39+
{
40+
index $BENCH_CAPTURE_HOST_PIPELINE
41+
Object.Widget.host-copier.1 {
42+
stream_name $ANALOG_CAPTURE_PCM
43+
pcm_id 0
44+
num_input_audio_formats 1
45+
num_output_audio_formats 3
46+
Object.Base.input_audio_format [
47+
{
48+
in_bit_depth 32
49+
in_valid_bit_depth 32
50+
in_rate 16000
51+
}
52+
]
53+
Object.Base.output_audio_format [
54+
{
55+
out_bit_depth 16
56+
out_valid_bit_depth 16
57+
out_rate 16000
58+
}
59+
{
60+
out_bit_depth 32
61+
out_valid_bit_depth 24
62+
out_rate 16000
63+
}
64+
{
65+
out_bit_depth 32
66+
out_valid_bit_depth 32
67+
out_rate 16000
68+
}
69+
]
70+
}
71+
}
72+
]
73+
}
74+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
num_input_audio_formats 1
2+
num_output_audio_formats 1
3+
4+
# 16-bit 48KHz 2ch
5+
Object.Base.input_audio_format [
6+
{
7+
in_bit_depth 16
8+
in_valid_bit_depth 16
9+
in_rate 16000
10+
}
11+
]
12+
Object.Base.output_audio_format [
13+
{
14+
out_bit_depth 16
15+
out_valid_bit_depth 16
16+
out_rate 16000
17+
}
18+
]
19+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
num_input_audio_formats 1
2+
num_output_audio_formats 1
3+
4+
# 24-bit 48KHz 2ch
5+
Object.Base.input_audio_format [
6+
{
7+
in_bit_depth 32
8+
in_valid_bit_depth 24
9+
in_rate 16000
10+
}
11+
]
12+
Object.Base.output_audio_format [
13+
{
14+
out_bit_depth 32
15+
out_valid_bit_depth 24
16+
out_rate 16000
17+
}
18+
]
19+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
num_input_audio_formats 1
2+
num_output_audio_formats 1
3+
4+
# 32-bit 48KHz 2ch
5+
Object.Base.input_audio_format [
6+
{
7+
in_bit_depth 32
8+
in_valid_bit_depth 32
9+
in_rate 16000
10+
}
11+
]
12+
Object.Base.output_audio_format [
13+
{
14+
out_bit_depth 32
15+
out_valid_bit_depth 32
16+
out_rate 16000
17+
}
18+
]
19+

0 commit comments

Comments
 (0)