Skip to content

Commit 4e7b6dc

Browse files
committed
Tools: Topology: Add test topology for sound dose component
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent c6fbf08 commit 4e7b6dc

File tree

10 files changed

+206
-0
lines changed

10 files changed

+206
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<mixout.conf>
4444
<multiband_drc.conf>
4545
<rtnr.conf>
46+
<sound_dose.conf>
4647
<src.conf>
4748
<src_lite.conf>
4849
<tdfb.conf>
@@ -817,6 +818,22 @@ IncludeByKey.BENCH_CONFIG {
817818
<include/bench/rtnr_s32.conf>
818819
}
819820

821+
#
822+
# Sound Dose component
823+
#
824+
825+
"sound_dose16" {
826+
<include/bench/sound_dose_s16.conf>
827+
}
828+
829+
"sound_dose24" {
830+
<include/bench/sound_dose_s24.conf>
831+
}
832+
833+
"sound_dose32" {
834+
<include/bench/sound_dose_s32.conf>
835+
}
836+
820837
#
821838
# SRC component
822839
#

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
"igo_nr"
1919
"micsel"
2020
"rtnr"
21+
"sound_dose"
2122
"src"
2223
"src_lite"
2324
"tdfb"
@@ -35,6 +36,7 @@ set(component_parameters
3536
"BENCH_IGO_NR_PARAMS=default"
3637
"BENCH_MICSEL_PARAMS=passthrough"
3738
"BENCH_RTNR_PARAMS=default"
39+
"BENCH_SOUND_DOSE_PARAMS=default"
3840
"BENCH_SRC_PARAMS=default"
3941
"BENCH_SRC_LITE_PARAMS=default"
4042
"BENCH_TDFB_PARAMS=default"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Created initially with script "./bench_comp_generate.sh sound_dose"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in SOUND_DOSE
5+
bytes."1" {
6+
name '$ANALOG_CAPTURE_PCM Sound Dose setup bytes'
7+
IncludeByKey.BENCH_SOUND_DOSE_PARAMS {
8+
"default" "include/components/sound_dose/setup_sens_100db.conf"
9+
}
10+
}
11+
bytes."2" {
12+
name '$ANALOG_CAPTURE_PCM Sound Dose volume bytes'
13+
}
14+
bytes."3" {
15+
name '$ANALOG_CAPTURE_PCM Sound Dose gain bytes'
16+
}
17+
bytes."4" {
18+
name '$ANALOG_CAPTURE_PCM Sound Dose data bytes'
19+
}
20+
#mixer."1" {
21+
# name '$ANALOG_CAPTURE_PCM SOUND_DOSE switch or volume'
22+
#}
23+
#enum."1" {
24+
# name '$ANALOG_CAPTURE_PCM SOUND_DOSE enum'
25+
#}
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Created initially with script "./bench_comp_generate.sh sound_dose"
2+
# may need edits to modify controls
3+
Object.Control {
4+
# Un-comment the supported controls in SOUND_DOSE
5+
bytes."1" {
6+
name '$ANALOG_PLAYBACK_PCM Sound Dose setup bytes'
7+
IncludeByKey.BENCH_SOUND_DOSE_PARAMS {
8+
"default" "include/components/sound_dose/setup_sens_100db.conf"
9+
}
10+
}
11+
bytes."2" {
12+
name '$ANALOG_PLAYBACK_PCM Sound Dose volume bytes'
13+
}
14+
bytes."3" {
15+
name '$ANALOG_PLAYBACK_PCM Sound Dose gain bytes'
16+
}
17+
bytes."4" {
18+
name '$ANALOG_PLAYBACK_PCM Sound Dose data bytes'
19+
}
20+
#mixer."1" {
21+
# name '$ANALOG_PLAYBACK_PCM SOUND_DOSE switch or volume'
22+
#}
23+
#enum."1" {
24+
# name '$ANALOG_PLAYBACK_PCM SOUND_DOSE enum'
25+
#}
26+
}
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 sound_dose"
2+
Object.Base.route [
3+
{
4+
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
5+
source 'sound_dose.1.1'
6+
}
7+
{
8+
sink 'sound_dose.1.1'
9+
source 'host-copier.0.playback'
10+
}
11+
{
12+
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
13+
sink 'sound_dose.3.2'
14+
}
15+
{
16+
source 'sound_dose.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 sound_dose"
2+
Object.Widget.sound_dose.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s16.conf>
5+
<include/bench/sound_dose_controls_playback.conf>
6+
}
7+
Object.Widget.sound_dose.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s16.conf>
10+
<include/bench/sound_dose_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s16.conf>
13+
<include/bench/sound_dose_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 sound_dose"
2+
Object.Widget.sound_dose.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s24.conf>
5+
<include/bench/sound_dose_controls_playback.conf>
6+
}
7+
Object.Widget.sound_dose.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s24.conf>
10+
<include/bench/sound_dose_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s24.conf>
13+
<include/bench/sound_dose_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 sound_dose"
2+
Object.Widget.sound_dose.1 {
3+
index 1
4+
<include/bench/one_input_output_format_s32.conf>
5+
<include/bench/sound_dose_controls_playback.conf>
6+
}
7+
Object.Widget.sound_dose.2 {
8+
index 3
9+
<include/bench/one_input_output_format_s32.conf>
10+
<include/bench/sound_dose_controls_capture.conf>
11+
}
12+
<include/bench/host_io_gateway_pipelines_s32.conf>
13+
<include/bench/sound_dose_hda_route.conf>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#
2+
#
3+
# A Sound Dose component. All attributes defined herein are namespaced
4+
# by alsatplg to "Object.Widget.sound_dose.attribute_name"
5+
#
6+
# Usage: this component can be used by declaring in the parent object. i.e.
7+
#
8+
# Object.Widget.sound_dose."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."sound_dose" {
17+
#
18+
# Pipeline ID
19+
#
20+
DefineAttribute."index" {
21+
type "integer"
22+
}
23+
24+
#
25+
# Unique instance for Sound Dose 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 sound_dose
58+
#
59+
60+
# uuid a43f9d7c-ea75-44d5-942d967991a33809
61+
62+
uuid "7c:9d:3f:a4:75:ea:d5:44:94:2d:96:79:91:a3:38:09"
63+
type "effect"
64+
no_pm "true"
65+
num_input_pins 1
66+
num_output_pins 1
67+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Exported with script sof_sound_dose_blobs.m 23-Jun-2025
2+
# cd tools/tune/sound_dose; octave sof_sound_dose_blobs.m
3+
Object.Base.data."sound_dose_config" {
4+
bytes "
5+
0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00,
6+
0x04,0x00,0x00,0x00,0x01,0xd0,0x01,0x03,
7+
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
8+
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
9+
0x10,0x27,0x00,0x00"
10+
}

0 commit comments

Comments
 (0)