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: Topology2: Add DC block component #8145

Merged
merged 5 commits into from
Oct 13, 2023
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
336 changes: 201 additions & 135 deletions tools/topology/topology2/cavs-benchmark-hda.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<include/components/dcblock.conf>

Define {
ANALOG_PLAYBACK_PCM 'Analog Playback'
ANALOG_CAPTURE_PCM 'Analog Capture'
HDA_ANALOG_DAI_NAME 'Analog'
DEEP_BUFFER_PIPELINE_ID 15
DEEP_BUFFER_PCM_ID 31
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1'
DEEP_BUFFER_PIPELINE_SINK 'mixout.2.1'
DEEP_BUFFER_PCM_NAME 'Deepbuffer HDA Analog'
HDA_ANALOG_DAI_NAME 'Analog'
}

Object.Dai.HDA [
Expand All @@ -22,114 +19,6 @@ Object.Dai.HDA [
}
]

Object.Pipeline {
mixout-dai-copier-playback [
{
index 3

Object.Widget.dai-copier.1 {
node_type $HDA_LINK_OUTPUT_CLASS
stream_name $HDA_ANALOG_DAI_NAME
dai_type "HDA"
copier_type "HDA"
}
}
]

mixout-aria-gain-mixin-playback [
{
index 2

Object.Widget.gain.1 {
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_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
Object.Control.bytes."1" {
name "SSP2 Aria Control"
}
}
}
]

host-copier-gain-mixin-playback [
{
index 1

Object.Widget.host-copier.1 {
stream_name $ANALOG_PLAYBACK_PCM
pcm_id 0
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $ANALOG_PLAYBACK_PCM Volume'
}
}
}
]

host-gateway-capture [
{
index 3
Object.Widget.host-copier.1 {
stream_name $ANALOG_CAPTURE_PCM
pcm_id 0
}
}
]

highpass-capture-be [
{
index 4
direction capture

Object.Widget.dai-copier."1" {
dai_type "HDA"
type "dai_out"
copier_type "HDA"
stream_name $HDA_ANALOG_DAI_NAME
node_type $HDA_LINK_INPUT_CLASS
num_output_pins 1
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name '$ANALOG_CAPTURE_PCM IIR Eq'
}
}
}
]
}
Object.PCM.pcm [
{
id 0
Expand All @@ -151,30 +40,207 @@ Object.PCM.pcm [
}
]

# top-level pipeline connections
Object.Base.route [
{
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
source 'mixout.3.1'
IncludeByKey.BENCH_CONFIG {
"benchmark" {
Object.Pipeline {
mixout-dai-copier-playback [
{
index 3

Object.Widget.dai-copier.1 {
node_type $HDA_LINK_OUTPUT_CLASS
stream_name $HDA_ANALOG_DAI_NAME
dai_type "HDA"
copier_type "HDA"
}
}
]

mixout-aria-gain-mixin-playback [
{
index 2

Object.Widget.gain.1 {
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_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
Object.Control.bytes."1" {
name "SSP2 Aria Control"
}
}
}
]

host-copier-gain-mixin-playback [
{
index 1

Object.Widget.host-copier.1 {
stream_name $ANALOG_PLAYBACK_PCM
pcm_id 0
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $ANALOG_PLAYBACK_PCM Volume'
}
}
}
]

host-gateway-capture [
{
index 3
Object.Widget.host-copier.1 {
stream_name $ANALOG_CAPTURE_PCM
pcm_id 0
}
}
]

highpass-capture-be [
{
index 4
direction capture

Object.Widget.dai-copier."1" {
dai_type "HDA"
type "dai_out"
copier_type "HDA"
stream_name $HDA_ANALOG_DAI_NAME
node_type $HDA_LINK_INPUT_CLASS
num_output_pins 1
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name '$ANALOG_CAPTURE_PCM IIR Eq'
}
}
}
]
}

# top-level pipeline connections
Object.Base.route [
{
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback'
source 'mixout.3.1'
}
{
source 'mixin.2.1'
sink 'mixout.3.1'
}
{
source 'mixin.1.1'
sink 'mixout.2.1'
}
{
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
sink 'eqiir.4.1'
}
{
source 'eqiir.4.1'
sink 'host-copier.0.capture'
}
{
source 'host-copier.0.playback'
sink 'gain.1.1'
}
]
}
{
source 'mixin.2.1'
sink 'mixout.3.1'

#
# DCblock component
#

"dcblock16" {
<include/bench/dcblock_s16.conf>
}
{
source 'mixin.1.1'
sink 'mixout.2.1'

"dcblock24" {
<include/bench/dcblock_s24.conf>
}
{
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture'
sink 'eqiir.4.1'

"dcblock32" {
<include/bench/dcblock_s32.conf>
}
{
source 'eqiir.4.1'
sink 'host-copier.0.capture'

#
# DRC component
#

"drc16" {
<include/bench/drc_s16.conf>
}
{
source 'host-copier.0.playback'
sink 'gain.1.1'

"drc24" {
<include/bench/drc_s24.conf>
}
]

"drc32" {
<include/bench/drc_s32.conf>
}

#
# EQFIR component
#

"eqfir16" {
<include/bench/eqfir_s16.conf>
}

"eqfir24" {
<include/bench/eqfir_s24.conf>
}

"eqfir32" {
<include/bench/eqfir_s32.conf>
}

#
# EQIIR component
#

"eqiir16" {
<include/bench/eqiir_s16.conf>
}

"eqiir24" {
<include/bench/eqiir_s24.conf>
}

"eqiir32" {
<include/bench/eqiir_s32.conf>
}
}
20 changes: 17 additions & 3 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,23 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-nocodec-bt-mtl-lbm.bin"

# CAVS HDA topology for benchmarking performance
# Copier - peak volume - mixin - mixout - aria - peak volume - mixin - mixout - copier
"sof-hda-generic\;sof-hda-benchmark-generic-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,USE_CHAIN_DMA=true"
"sof-hda-generic\;sof-hda-benchmark-generic-mtl\;PLATFORM=MTL,HDA_CONFIG=benchmark,USE_CHAIN_DMA=true"
"sof-hda-generic\;sof-hda-benchmark-generic-lnl\;PLATFORM=LNL,HDA_CONFIG=benchmark,USE_CHAIN_DMA=true"
"sof-hda-generic\;sof-hda-benchmark-generic-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,USE_CHAIN_DMA=true,BENCH_CONFIG=benchmark"
"sof-hda-generic\;sof-hda-benchmark-generic-mtl\;PLATFORM=MTL,HDA_CONFIG=benchmark,USE_CHAIN_DMA=true,BENCH_CONFIG=benchmark"
"sof-hda-generic\;sof-hda-benchmark-generic-lnl\;PLATFORM=LNL,HDA_CONFIG=benchmark,USE_CHAIN_DMA=true,BENCH_CONFIG=benchmark"

# Test topologies for simple one source and sink processing components
"sof-hda-generic\;sof-hda-benchmark-dcblock16-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=dcblock16,BENCH_DCBLOCK_PARAMS=default"
"sof-hda-generic\;sof-hda-benchmark-dcblock24-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=dcblock24,BENCH_DCBLOCK_PARAMS=default"
"sof-hda-generic\;sof-hda-benchmark-dcblock32-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=dcblock32,BENCH_DCBLOCK_PARAMS=default"
"sof-hda-generic\;sof-hda-benchmark-drc16-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=drc16,BENCH_DRC_PARAMS=enabled"
"sof-hda-generic\;sof-hda-benchmark-drc24-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=drc24,BENCH_DRC_PARAMS=enabled"
"sof-hda-generic\;sof-hda-benchmark-drc32-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=drc32,BENCH_DRC_PARAMS=enabled"
"sof-hda-generic\;sof-hda-benchmark-eqiir16-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqiir16,BENCH_EQIIR_PARAMS=highpass_50hz_0db_48khz"
"sof-hda-generic\;sof-hda-benchmark-eqiir24-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqiir24,BENCH_EQIIR_PARAMS=highpass_50hz_0db_48khz"
"sof-hda-generic\;sof-hda-benchmark-eqiir32-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqiir32,BENCH_EQIIR_PARAMS=highpass_50hz_0db_48khz"
"sof-hda-generic\;sof-hda-benchmark-eqfir16-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqfir16,BENCH_EQFIR_PARAMS=loudness"
"sof-hda-generic\;sof-hda-benchmark-eqfir24-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqfir24,BENCH_EQFIR_PARAMS=loudness"
"sof-hda-generic\;sof-hda-benchmark-eqfir32-tgl\;PLATFORM=TGL,HDA_CONFIG=benchmark,BENCH_CONFIG=eqfir32,BENCH_EQFIR_PARAMS=loudness"

# Topology to test IPC4 Crossover
"development/cavs-nocodec-crossover\;sof-tgl-nocodec-crossover-2way\;PLATFORM=tgl,\
Expand Down
Loading
Loading