Skip to content

Commit 6e03c12

Browse files
committed
Tools: Topology: Add benchmark tplg for up_down_mixer
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent ce271af commit 6e03c12

9 files changed

Lines changed: 181 additions & 0 deletions

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<include/components/asrc.conf>
66
<include/components/tdfb.conf>
77
<include/components/template_comp.conf>
8+
<include/components/up_down_mixer.conf>
89

910
Define {
1011
ANALOG_PLAYBACK_PCM 'Analog Playback'
@@ -606,4 +607,20 @@ IncludeByKey.BENCH_CONFIG {
606607
"template_comp32" {
607608
<include/bench/template_comp_s32.conf>
608609
}
610+
611+
#
612+
# up_down_mixer component
613+
#
614+
615+
"up_down_mixer16" {
616+
<include/bench/up_down_mixer_s16.conf>
617+
}
618+
619+
"up_down_mixer24" {
620+
<include/bench/up_down_mixer_s24.conf>
621+
}
622+
623+
"up_down_mixer32" {
624+
<include/bench/up_down_mixer_s32.conf>
625+
}
609626
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ set(components
2121
"src_lite"
2222
"tdfb"
2323
"template_comp"
24+
"up_down_mixer"
2425
)
2526

2627
set(component_parameters
@@ -37,6 +38,7 @@ set(component_parameters
3738
"BENCH_SRC_LITE_PARAMS=default"
3839
"BENCH_TDFB_PARAMS=default"
3940
"BENCH_TEMPLATE_COMP_PARAMS=default"
41+
"BENCH_UP_DOWN_MIXER_COMP_PARAMS=default"
4042
)
4143

4244
set(components_s24
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Created initially with script "./bench_comp_generate.sh up_down_mixer"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in UP_DOWN_MIXER
5+
#bytes."1" {
6+
# name '$ANALOG_CAPTURE_PCM UP_DOWN_MIXER bytes'
7+
# IncludeByKey.BENCH_UP_DOWN_MIXER_PARAMS {
8+
# "default" "include/components/up_down_mixer/default.conf"
9+
# }
10+
#}
11+
#mixer."1" {
12+
# name '$ANALOG_CAPTURE_PCM UP_DOWN_MIXER switch or volume'
13+
#}
14+
#enum."1" {
15+
# name '$ANALOG_CAPTURE_PCM UP_DOWN_MIXER enum'
16+
#}
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Created initially with script "./bench_comp_generate.sh up_down_mixer"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in UP_DOWN_MIXER
5+
#bytes."1" {
6+
# name '$ANALOG_PLAYBACK_PCM UP_DOWN_MIXER bytes'
7+
# IncludeByKey.BENCH_UP_DOWN_MIXER_PARAMS {
8+
# "default" "include/components/up_down_mixer/default.conf"
9+
# }
10+
#}
11+
#mixer."1" {
12+
# name '$ANALOG_PLAYBACK_PCM UP_DOWN_MIXER switch or volume'
13+
#}
14+
#enum."1" {
15+
# name '$ANALOG_PLAYBACK_PCM UP_DOWN_MIXER enum'
16+
#}
17+
}
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 up_down_mixer"
2+
Object.Base.route [
3+
{
4+
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
5+
source 'up_down_mixer.1.1'
6+
}
7+
{
8+
sink 'up_down_mixer.1.1'
9+
source 'host-copier.0.playback'
10+
}
11+
{
12+
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
13+
sink 'up_down_mixer.3.2'
14+
}
15+
{
16+
source 'up_down_mixer.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 up_down_mixer"
2+
Object.Widget.up_down_mixer.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s16.conf>
5+
<include/bench/up_down_mixer_controls_playback.conf>
6+
}
7+
Object.Widget.up_down_mixer.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s16.conf>
10+
<include/bench/up_down_mixer_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s16.conf>
13+
<include/bench/up_down_mixer_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 up_down_mixer"
2+
Object.Widget.up_down_mixer.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s24.conf>
5+
<include/bench/up_down_mixer_controls_playback.conf>
6+
}
7+
Object.Widget.up_down_mixer.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s24.conf>
10+
<include/bench/up_down_mixer_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s24.conf>
13+
<include/bench/up_down_mixer_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 up_down_mixer"
2+
Object.Widget.up_down_mixer.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s32.conf>
5+
<include/bench/up_down_mixer_controls_playback.conf>
6+
}
7+
Object.Widget.up_down_mixer.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s32.conf>
10+
<include/bench/up_down_mixer_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s32.conf>
13+
<include/bench/up_down_mixer_hda_route.conf>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#
2+
# up_down_mixer
3+
#
4+
# An up_down_mixer widget. All attributes defined herein are namespaced
5+
# by alsatplg to "Object.Widget.up_down_mixer.N.attribute_name"
6+
#
7+
# Usage: this component can be used by instantiating it in the parent object. i.e.
8+
#
9+
# Object.Widget.up_down_mixer."N" {
10+
# index 5
11+
# cpc 100000
12+
# }
13+
#
14+
# Where N is the unique instance number for the copier object within the same alsaconf node.
15+
16+
Class.Widget."up_down_mixer" {
17+
#
18+
# Pipeline ID for the up_down_mixer object
19+
#
20+
DefineAttribute."index" {}
21+
22+
#
23+
# up_down_mixer object instance
24+
#
25+
DefineAttribute."instance" {}
26+
27+
#include common component definition
28+
<include/components/widget-common.conf>
29+
30+
attributes {
31+
#
32+
# The up_down_mixer widget name would be constructed using the index and
33+
# instance attributes. For ex: "up_down_mixer.1.2".
34+
#
35+
!constructor [
36+
"index"
37+
"instance"
38+
]
39+
40+
#
41+
# mandatory attributes that must be provided when the up_down_mixer class is
42+
# instantiated
43+
#
44+
!mandatory [
45+
"num_input_pins"
46+
"num_output_pins"
47+
"num_input_audio_formats"
48+
"num_output_audio_formats"
49+
]
50+
51+
#
52+
# immutable attributes cannot be modified in the object instance
53+
#
54+
!immutable [
55+
"uuid"
56+
"type"
57+
]
58+
59+
unique "instance"
60+
}
61+
62+
#
63+
# Default attributes for up_down_mixer
64+
#
65+
uuid "0c:06:f8:42:2f:83:bf:4d:b2:47:51:e9:61:99:7b:34"
66+
type "effect"
67+
no_pm "true"
68+
num_input_pins 1
69+
num_output_pins 1
70+
}

0 commit comments

Comments
 (0)