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
8 changes: 8 additions & 0 deletions app/overlays/ptl/dax_overlay.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CONFIG_COMP_MODULE_ADAPTER=y
CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING=y
CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK=n
CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n
CONFIG_SOF_STACK_SIZE=8192

# LLEXT
CONFIG_LLEXT_HEAP_SIZE=32
4 changes: 4 additions & 0 deletions tools/rimage/config/ptl.toml.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ index = __COUNTER__
#include <audio/aria/aria.toml>
#endif

#if defined(CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING) || defined(LLEXT_FORCE_ALL_MODULAR)
#include <audio/module_adapter/module/dolby/dax.toml>
#endif

#if defined(CONFIG_COMP_DRC) || defined(LLEXT_FORCE_ALL_MODULAR)
#include <audio/drc/drc.toml>
#endif
Expand Down
3 changes: 3 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>
<host-copier-gain-mixin-playback.conf>
<mixout-gain-alh-dai-copier-playback.conf>
<mixout-gain-dax-alh-dai-copier-playback.conf>
<mixout-gain-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
<mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback.conf>
<mixout-gain-eqiir-eqfir-drc-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
Expand Down Expand Up @@ -105,6 +106,8 @@ Define {
SDW_AMP_XOVER_SELECTOR_PARAMS default
SDW_AMP_XOVER_EQIIR_PARAMS default
SDW_AMP_XOVER_EQFIR_PARAMS default
DOLBY_DAX_CORE_ID 0
USE_DAX "false"
}

# override defaults with platform-specific config
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
#
# BE playback pipeline: mixout-gain-dax-alh-dai-copier.
#
# All attributes defined herein are namespaced
# by alsatplg to "Object.Pipeline.mixout-gain-dax-alh-dai-copier-playback.N.attribute_name"
#
# Usage: mixout-gain-dax-alh-dai-copier-playback pipeline object can be instantiated as:
#
# Object.Pipeline.mixout-gain-dax-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/dolby-dax.conf>
<include/components/gain.conf>
<include/components/mixout.conf>
<include/components/pipeline.conf>

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

<include/pipelines/pipeline-common.conf>

attributes {
!constructor [
"index"
]

!immutable [
"direction"
]

#
# mixout-gain-dax-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
}
]
}
dolby-dax."1" {
num_input_audio_formats 1
num_output_audio_formats 1
Object.Base.input_audio_format [
{
in_rate 48000
in_bit_depth 32
in_valid_bit_depth 32
ibs "$[(512 * ($[($in_bit_depth / 8)])) * ($in_channels / 2)]"
}
]
Object.Base.output_audio_format [
{
out_rate 48000
out_bit_depth 32
out_valid_bit_depth 32
obs "$[(512 * ($[($out_bit_depth / 8)])) * ($out_channels / 2)]"
}
]
}

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

Object.Base {
!route [
{
source gain.$index.1
sink dolby-dax.$index.1
}
{
source mixout.$index.1
sink gain.$index.1
}
]
}

direction "playback"
dynamic_pipeline 1
time_domain "timer"
}
84 changes: 84 additions & 0 deletions tools/topology/topology2/platform/intel/sdw-amp-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,76 @@ IncludeByKey.PASSTHROUGH {

IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
"true" {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I feel that USE_DAX should not be conditioned under SDW_SPK_ENHANCED_PLAYBACK. It would be better if we use switch-case structure rather than nested if. e.g.

IncludeByKey.SDW_SPK_ENHANCED_PROC {
        "DRC" {
                ...
        }
        "DAX" {
                ...
        }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe this could be a seperated PR

IncludeByKey.USE_DAX {
"true" {
mixout-gain-dax-alh-dai-copier-playback [
{
index 21

Object.Widget.alh-copier.1 {
stream_name $SDW_SPK_STREAM
node_type $ALH_LINK_OUTPUT_CLASS
num_input_audio_formats 3
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
{
in_bit_depth 32
in_valid_bit_depth 24
}
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth $SDW_LINK_VALID_BITS
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $AMP_PLAYBACK_NAME Volume'
}
}
Object.Widget.dolby-dax.1 {
core_id $DOLBY_DAX_CORE_ID
Object.Control {
mixer."1" {
name 'DAX Speaker Switch'
}
mixer."2" {
name 'DAX Speaker Switch CP'
}
mixer."3" {
name 'DAX Speaker Switch CTC'
}
mixer."4" {
name 'DAX Speaker Volume'
}
enum."1" {
name 'DAX Speaker Profile'
}
enum."2" {
name 'DAX Speaker Device'
}
bytes."1" {
name 'DAX Speaker Tuning'
max 8192
}
}
}
}
]
}
"false" {
mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback [
{
index 21
Expand Down Expand Up @@ -159,6 +229,8 @@ IncludeByKey.PASSTHROUGH {
}
}
]
}
}
}
"false" {
mixout-gain-alh-dai-copier-playback [
Expand Down Expand Up @@ -639,12 +711,24 @@ IncludeByKey.PASSTHROUGH {
"false" {
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
"true" {
IncludeByKey.USE_DAX {
"true" {
Object.Base.route [
{
source "dolby-dax.21.1"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
"false" {
Object.Base.route [
{
source "drc.21.1"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
}
}
"false" {
Object.Base.route [
Expand Down
Loading
Loading