Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: Topolology2: Test topologies maintenance for testbench IPC4 version #9545

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 203 additions & 10 deletions tools/topology/topology2/cavs-benchmark-hda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Define {
ANALOG_PLAYBACK_PCM 'Analog Playback'
ANALOG_CAPTURE_PCM 'Analog Capture'
HDA_ANALOG_DAI_NAME 'Analog'
HDA_ANALOG_CAPTURE_RATE 48000
HDA_ANALOG_PLAYBACK_RATE 48000
}

Object.Dai.HDA [
Expand Down Expand Up @@ -54,11 +56,45 @@ IncludeByKey.BENCH_CONFIG {
{
index 3

Object.Widget.mixout.1 {
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
]
}
Object.Widget.dai-copier.1 {
node_type $HDA_LINK_OUTPUT_CLASS
stream_name $HDA_ANALOG_DAI_NAME
dai_type "HDA"
copier_type "HDA"
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
]
Expand All @@ -67,31 +103,84 @@ IncludeByKey.BENCH_CONFIG {
{
index 2

Object.Widget.mixin.1 {
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
]
}
Object.Widget.gain.1 {
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
]
Object.Control.mixer.1 {
name 'Post Mixer $ANALOG_PLAYBACK_PCM Volume'
}
}
Object.Widget.aria.1 {
num_input_audio_formats 1
num_output_audio_formats 1
# 32-bit 48KHz 2ch
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
in_valid_bit_depth 24
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 32
out_valid_bit_depth 24
}
]
Object.Control.bytes."1" {
name "SSP2 Aria Control"
name '$ANALOG_PLAYBACK_PCM ARIA bytes'
}
}
Object.Widget.mixout.1 {
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
]
}
}
]

Expand All @@ -102,29 +191,115 @@ IncludeByKey.BENCH_CONFIG {
Object.Widget.host-copier.1 {
stream_name $ANALOG_PLAYBACK_PCM
pcm_id 0
num_input_audio_formats 3
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 16
in_valid_bit_depth 16
}
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
]
}

Object.Widget.gain.1 {
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
]
Object.Control.mixer.1 {
name 'Pre Mixer $ANALOG_PLAYBACK_PCM Volume'
}
}
Object.Widget.mixin.1 {
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_PLAYBACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_PLAYBACK_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
]
}
}
]

host-gateway-capture [
{
index 3
index 4
Object.Widget.host-copier.1 {
stream_name $ANALOG_CAPTURE_PCM
pcm_id 0
num_input_audio_formats 1
num_output_audio_formats 3
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_CAPTURE_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_CAPTURE_RATE
out_bit_depth 16
out_valid_bit_depth 16
}
{
out_rate $HDA_ANALOG_CAPTURE_RATE
out_bit_depth 32
out_valid_bit_depth 24
}
{
out_rate $HDA_ANALOG_CAPTURE_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
]

highpass-capture-be [
{
index 4
index 5
direction capture

Object.Widget.dai-copier."1" {
Expand All @@ -138,18 +313,36 @@ IncludeByKey.BENCH_CONFIG {
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_CAPTURE_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_CAPTURE_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
Object.Widget.eqiir.1 {
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate $HDA_ANALOG_CAPTURE_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $HDA_ANALOG_CAPTURE_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
Object.Control.bytes."1" {
name '$ANALOG_CAPTURE_PCM IIR Eq'
}
Expand All @@ -174,10 +367,10 @@ IncludeByKey.BENCH_CONFIG {
}
{
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
sink 'eqiir.4.1'
sink 'eqiir.5.1'
}
{
source 'eqiir.4.1'
source 'eqiir.5.1'
sink 'host-copier.0.capture'
}
{
Expand All @@ -191,8 +384,8 @@ IncludeByKey.BENCH_CONFIG {
# Aria component
#

"aria32" {
<include/bench/aria_s32.conf>
"aria24" {
<include/bench/aria_s24.conf>
}

#
Expand Down
10 changes: 5 additions & 5 deletions tools/topology/topology2/development/tplg-targets-bench.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(component_parameters
"BENCH_DCBLOCK_PARAMS=default"
"BENCH_DRC_PARAMS=enabled"
"BENCH_DRC_MULTIBAND_PARAMS=default"
"BENCH_EQIIR_PARAMS=highpass_50hz_0db_48khz"
"BENCH_EQIIR_PARAMS=loudness"
"BENCH_EQFIR_PARAMS=loudness"
"BENCH_GAIN_PARAMS=default"
"BENCH_IGO_NR_PARAMS=default"
Expand All @@ -37,11 +37,11 @@ set(component_parameters
"BENCH_TDFB_PARAMS=default"
)

set(components_s32
set(components_s24
"aria"
)

set(component_parameters_s32
set(component_parameters_s24
"BENCH_ARIA_PARAMS=default"
)

Expand All @@ -55,8 +55,8 @@ foreach(sf ${sampleformats})
endforeach()

# Add components with single format
set (sf "32")
foreach(comp bench_param IN ZIP_LISTS components_s32 component_parameters_s32)
set (sf "24")
foreach(comp bench_param IN ZIP_LISTS components_s24 component_parameters_s24)
set(item "sof-hda-generic\;sof-hda-benchmark-${comp}${sf}\;HDA_CONFIG=benchmark,BENCH_CONFIG=${comp}${sf},${bench_param}")
#message(STATUS "Item=" ${item})
list(APPEND TPLGS "${item}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Created with script "./bench_comp_generate.sh aria"
Object.Widget.aria.1 {
index 1
<include/bench/one_input_output_format_s32.conf>
<include/bench/one_input_output_format_s24.conf>
<include/bench/aria_controls_playback.conf>
}
Object.Widget.aria.2 {
index 3
<include/bench/one_input_output_format_s32.conf>
<include/bench/one_input_output_format_s24.conf>
<include/bench/aria_controls_capture.conf>
}
<include/bench/host_io_gateway_pipelines_s32.conf>
<include/bench/host_io_gateway_pipelines_s24.conf>
<include/bench/aria_hda_route.conf>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
Object.Control.bytes."1" {
name '$ANALOG_CAPTURE_PCM EQFIR bytes'
IncludeByKey.BENCH_EQFIR_PARAMS {
"default" "include/components/eqfir/default.conf"
"loudness" "include/components/eqfir/loudness.conf"
"passthrough" "include/components/eqfir/passthrough.conf"
"default" "include/components/eqfir/passthrough.conf"
"flat" "include/components/eqfir/flat.conf"
"loudness" "include/components/eqfir/loudness.conf"
"midboost" "include/components/eqfir/midboost.conf"
"passthrough" "include/components/eqfir/passthrough.conf"
}
}
Loading