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: Intel: Add enhanced speaker and DMIC processing to SDW PCs #9652

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<virtual.conf>
singalsu marked this conversation as resolved.
Show resolved Hide resolved
<host-copier-gain-mixin-playback.conf>
<mixout-gain-alh-dai-copier-playback.conf>
<mixout-gain-efx-alh-dai-copier-playback.conf>
<dai-copier-eqiir-gain-module-copier-capture.conf>
<gain-capture.conf>
<gain-copier-capture.conf>
Expand Down Expand Up @@ -79,6 +80,9 @@ Define {
SDW_JACK_CAPTURE_CH 2
ADD_BT false
SDW_LINK_VALID_BITS 24
EFX_SPK_IIR_PARAMS passthrough
EFX_SPK_FIR_PARAMS passthrough
EFX_SPK_DRC_PARAMS passthrough
}

# override defaults with platform-specific config
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
#
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singalsu lets update this to use the subtreecopy construct like we discussed

# BE playback pipeline: mixout-gain-efx-alh-dai-copier.
#
# All attributes defined herein are namespaced
# by alsatplg to "Object.Pipeline.mixout-gain-efx-alh-dai-copier-playback.N.attribute_name"
#
# Usage: mixout-gain-efx-alh-dai-copier-playback pipeline object can be instantiated as:
#
# Object.Pipeline.mixout-gain-efx-alh-dai-copier-playback."N" {
# time_domain "timer"
# }
#
# Where N is the unique pipeline ID within the same alsaconf node.
#

<include/components/alh-dai-copier.conf>
<include/components/gain.conf>
<include/components/eqiir.conf>
<include/components/eqfir.conf>
<include/components/drc.conf>
<include/components/mixout.conf>
<include/components/pipeline.conf>

Class.Pipeline."mixout-gain-efx-alh-dai-copier-playback" {

<include/pipelines/pipeline-common.conf>

attributes {
!constructor [
"index"
]

!immutable [
"direction"
]

#
# mixout-gain-efx-alh-dai-copier-playback objects instantiated within the same alsaconf
# node must have unique instance attribute
#
unique "instance"
}

Object.Widget {
mixout."1" {}
alh-copier."1" {
type dai_in
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1

# copier only supports one format based on mixin/mixout requirements:
# 32-bit 48KHz 2ch
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
gain."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
}
]
}

eqiir."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" {
IncludeByKey.EFX_SPK_IIR_PARAMS {
"passthrough" "include/components/eqiir/passthrough.conf"
"highpass_20hz_0db_48khz" "include/components/eqiir/highpass_20hz_0db_48khz.conf"
"highpass_30hz_0db_48khz" "include/components/eqiir/highpass_30hz_0db_48khz.conf"
"highpass_40hz_0db_48khz" "include/components/eqiir/highpass_40hz_0db_48khz.conf"
"highpass_50hz_0db_48khz" "include/components/eqiir/highpass_50hz_0db_48khz.conf"
"highpass_100hz_0db_48khz" "include/components/eqiir/highpass_100hz_0db_48khz.conf"
}
}
}

eqfir."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" {
IncludeByKey.EFX_SPK_FIR_PARAMS {
"passthrough" "include/components/eqfir/passthrough.conf"
}
}
}

drc."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" {
IncludeByKey.EFX_SPK_DRC_PARAMS {
"passthrough" "include/components/drc/passthrough.conf"
"speaker_default" "include/components/drc/speaker_default.conf"
}
}
}

pipeline."1" {
priority 0
lp_mode 0
}
}

Object.Base.route [
{
source mixout.$index.1
sink gain.$index.1
}
{
source gain.$index.1
sink eqiir.$index.1
}
{
source eqiir.$index.1
sink eqfir.$index.1
}
{
source eqfir.$index.1
sink drc.$index.1
}
]

direction "playback"
dynamic_pipeline 1
time_domain "timer"
}
Loading