Skip to content
Open
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
10 changes: 10 additions & 0 deletions tools/topology/topology2/cavs-mixin-mixout-hda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@ Define {
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1'
DEEP_BUFFER_PIPELINE_SINK 'mixout.2.1'
DEEP_BUFFER_PCM_NAME 'Deepbuffer HDA Analog'
COMPR_PIPELINE_ID 20
COMPR_PCM_ID 50
COMPR_PIPELINE_SRC 'mixin.20.1'
COMPR_PIPELINE_SINK 'mixout.2.1'
COMPR_PCM_NAME 'Compress HDA Analog'
HDA_ANALOG_CAPTURE_RATE 48000
HDA_ANALOG_PLAYBACK_RATE 48000
EFX_FIR_PARAMS 'passthrough'
EFX_IIR_PARAMS 'passthrough'
EFX_DRC_PARAMS 'passthrough'
HDA_MIC_ENHANCED_CAPTURE 'false'
COMPRESSED 'false'
}

# include deep buffer config if buffer size is in 1 - 1000 ms.
IncludeByKey.DEEPBUFFER_FW_DMA_MS{
"[1-1000]" "platform/intel/deep-buffer.conf"
}

IncludeByKey.COMPRESSED {
"true" "platform/intel/compr.conf"
}

Object.Dai.HDA [
{
name $HDA_ANALOG_DAI_NAME
Expand Down
34 changes: 34 additions & 0 deletions tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
<gain-copier-capture.conf>
<deepbuffer-playback.conf>
<deepbuffer-capture.conf>
<compr-playback.conf>
<host-gateway-playback.conf>
<host-gateway-capture.conf>
<host-gateway-tdfb-drc-capture.conf>
<src.conf>
<io-gateway.conf>
<io-gateway-capture.conf>
<highpass-capture-be.conf>
Expand Down Expand Up @@ -53,6 +55,7 @@
<ssp.conf>
<bt-default.conf>
<deep-buffer-default.conf>
<compr-default.conf>
<siggen-host-copier-capture.conf>

Define {
Expand All @@ -71,6 +74,7 @@ Define {
DMIC0_ID 4
DMIC1_ID 5
DMIC0_PCM_CAPS 'Gain Capture 13'

DEEP_BUFFER_PIPELINE_ID 15
DEEP_BUFFER_PCM_ID 31
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1'
Expand All @@ -81,6 +85,18 @@ Define {
DEEP_BUFFER_PIPELINE_SRC_2 'mixin.16.1'
DEEP_BUFFER_PIPELINE_SINK_2 'mixout.21.1'
DEEP_BUFFER_PCM_NAME_2 'Deepbuffer Speaker'

COMPR_PIPELINE_ID 30
COMPR_PCM_ID 50
COMPR_PIPELINE_SRC 'mixin.30.1'
COMPR_PIPELINE_SINK 'mixout.1.1'
COMPR_PCM_NAME 'Compress Jack Out'
COMPR_2_PIPELINE_ID 32
COMPR_2_PCM_ID 52
COMPR_2_PIPELINE_SRC 'mixin.32.1'
COMPR_2_PIPELINE_SINK 'mixout.21.1'
COMPR_2_PCM_NAME 'Compress Speaker'

SDW_JACK_OUT_STREAM 'SDW0-Playback'
SDW_JACK_IN_STREAM 'SDW0-Capture'
SDW_JACK_OUT_BE_ID 0
Expand Down Expand Up @@ -157,5 +173,23 @@ IncludeByKey.SDW_DMIC {

IncludeByKey.SDW_JACK {
"true" "platform/intel/sdw-jack-generic.conf"
"false" {
Define {
# disable compressed audio for Jack
COMPRESSED_1 false
}
}
}

IncludeByKey.NUM_SDW_AMP_LINKS {
"[1-3]" {
Define {
# Enable compressed audio for Speaker
COMPRESSED_2 true
}
}
}

IncludeByKey.COMPRESSED {
"true" "platform/intel/compr.conf"
}
13 changes: 13 additions & 0 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -449,4 +449,17 @@ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt722-4ch-echoref.bin,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\
SDW_JACK_ECHO_REF=true,SDW_SPK_ECHO_REF=true"

# Soundwire topologies with compressed support
"cavs-sdw\;sof-arl-cs42l43-l0-compr\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,SDW_DMIC=1,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"

"cavs-sdw\;sof-ptl-rt721-compr\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"

"cavs-sdw\;sof-ptl-rt722-compr\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,COMPRESSED=true"
)
63 changes: 63 additions & 0 deletions tools/topology/topology2/include/components/decoder.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#
# Decoder widget component definition
#
# A generic decoder widget. All attributes defined herein are namespaced
# by alsatplg to "Object.Widget.decoder.N.attribute_name"
#
# Usage: this component can be used by declaring in a parent object. i.e.
#
# Object.Widget.decoder."N" {
# index 1
# no_pm "true"
# }
#
# Where N is the unique instance number for decoder widget in the same alsaconf node.

Class.Widget."decoder" {
#
# Pipeline ID for the decoder widget object
#
DefineAttribute."index" {}

#
# decoder object instance
#
DefineAttribute."instance" {}

#include common component definition
<include/components/widget-common.conf>

# Attribute categories
attributes {
#
# The decoder widget name would be constructed using the index and instance attributes.
# For ex: "decoder.1.1" or "decoder.10.2" etc.
#
!constructor [
"index"
"instance"
]

#
# immutable attributes cannot be modified in the object instance
#
!immutable [
"type"
]

#
# decoder widget objects instantiated within the same alsaconf node must have unique
# instance attribute
#
unique "instance"
}

# Default attribute values for decoder widget
type "decoder"

# cadence codec UUID
uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa"
no_pm "true"
num_output_pins 1
num_input_pins 1
}
63 changes: 63 additions & 0 deletions tools/topology/topology2/include/components/encoder.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#
# Encoder widget component definition
#
# A generic encoder widget. All attributes defined herein are namespaced
# by alsatplg to "Object.Widget.encoder.N.attribute_name"
#
# Usage: this component can be used by declaring in a parent object. i.e.
#
# Object.Widget.encoder."N" {
# index 1
# no_pm "true"
# }
#
# Where N is the unique instance number for encoder widget in the same alsaconf node.

Class.Widget."encoder" {
#
# Pipeline ID for the encoder widget object
#
DefineAttribute."index" {}

#
# encoder object instance
#
DefineAttribute."instance" {}

#include common component definition
<include/components/widget-common.conf>

# Attribute categories
attributes {
#
# The encoder widget name would be constructed using the index and instance attributes.
# For ex: "encoder.1.1" or "encoder.10.2" etc.
#
!constructor [
"index"
"instance"
]

#
# immutable attributes cannot be modified in the object instance
#
!immutable [
"type"
]

#
# encoder widget objects instantiated within the same alsaconf node must have unique
# instance attribute
#
unique "instance"
}

# Default attribute values for encoder widget
type "encoder"

# cadence codec UUID
uuid "43:84:21:d8:f3:5f:4c:4a:b3:88:6c:fe:07:b9:56:aa"
no_pm "true"
num_output_pins 1
num_input_pins 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#
# FE playback pipeline: compr-playback
#
# All attributes defined herein are namespaced
# by alsatplg to "Object.Pipeline.compr-playback.N.attribute_name"
#
# Usage: compr-playback pipeline object can be instantiated as:
#
# Object.Pipeline.compr-playback."N" {
# period 1000
# time_domain "timer"
# }
#
# Where N is the unique pipeline ID within the same alsaconf node.
#

<include/common/input_audio_format.conf>
<include/common/output_audio_format.conf>
<include/components/host-copier.conf>
<include/components/module-copier.conf>
<include/components/mixin.conf>
<include/components/pipeline.conf>
<include/components/gain.conf>
<include/components/decoder.conf>

Class.Pipeline."compr-playback" {

<include/pipelines/pipeline-common.conf>

attributes {
!constructor [
"index"
]

!immutable [
"direction"
]

#
# compr-playback objects instantiated within the same alsaconf node must have
# unique pipeline_id attribute
#
unique "instance"
}

Object.Widget {
host-copier."1" {
type "aif_in"
node_type $HDA_HOST_OUTPUT_CLASS
num_output_pins 1
}

decoder."1" {
scheduler_domain "DP"
}

module-copier."2" {}

src."1" {}

gain."1" {}

mixin."1" {}

pipeline."1" {
priority 0
# enable lp mode
lp_mode 1
}
}

Object.Base.route [
{
source decoder.$index.1
sink module-copier.$index.2
}
{
source module-copier.$index.2
sink src.$index.1
}
{
source src.$index.1
sink gain.$index.1
}
{
source gain.$index.1
sink mixin.$index.1
}
]

direction "playback"
dynamic_pipeline 1
time_domain "timer"
}
9 changes: 9 additions & 0 deletions tools/topology/topology2/platform/intel/compr-default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# default settings for Compressed Audio Playback
Define {
COMPRESSED false
COMPRESSED_1 true
COMPRESSED_2 false

COMPR_PCM_NAME 'Compress Playback'
COMPR_2_PCM_NAME 'Compress Playback 2'
}
Loading
Loading