Skip to content

Commit f27ddcc

Browse files
committed
tools: topology: add dax module to ptl topologies
Added sof-ptl-cs42l43-agg-l3-cs35l56-l2-dax.tplg for PTL platform. Signed-off-by: Jun Lai <jun.lai@dolby.com>
1 parent 04076c4 commit f27ddcc

File tree

7 files changed

+410
-26
lines changed

7 files changed

+410
-26
lines changed

app/overlays/ptl/dax_overlay.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CONFIG_COMP_MODULE_ADAPTER=y
2+
CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING=y
3+
CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING_MOCK=n
4+
CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n
5+
CONFIG_SOF_STACK_SIZE=8192
6+
7+
# LLEXT
8+
CONFIG_LLEXT_HEAP_SIZE=32

tools/rimage/config/ptl.toml.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ index = __COUNTER__
102102
#include <audio/aria/aria.toml>
103103
#endif
104104

105+
#if defined(CONFIG_COMP_DOLBY_DAX_AUDIO_PROCESSING) || defined(LLEXT_FORCE_ALL_MODULAR)
106+
#include <audio/module_adapter/module/dolby/dax.toml>
107+
#endif
108+
105109
#if defined(CONFIG_COMP_DRC) || defined(LLEXT_FORCE_ALL_MODULAR)
106110
#include <audio/drc/drc.toml>
107111
#endif

tools/topology/topology2/cavs-sdw.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<virtual.conf>
1414
<host-copier-gain-mixin-playback.conf>
1515
<mixout-gain-alh-dai-copier-playback.conf>
16+
<mixout-gain-dax-alh-dai-copier-playback.conf>
1617
<mixout-gain-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
1718
<mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback.conf>
1819
<mixout-gain-eqiir-eqfir-drc-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
@@ -107,6 +108,8 @@ Define {
107108
SDW_AMP_XOVER_SELECTOR_PARAMS default
108109
SDW_AMP_XOVER_EQIIR_PARAMS default
109110
SDW_AMP_XOVER_EQFIR_PARAMS default
111+
DOLBY_DAX_CORE_ID 0
112+
USE_DAX "false"
110113
}
111114

112115
# override defaults with platform-specific config
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
#
2+
# BE playback pipeline: mixout-gain-dax-alh-dai-copier.
3+
#
4+
# All attributes defined herein are namespaced
5+
# by alsatplg to "Object.Pipeline.mixout-gain-dax-alh-dai-copier-playback.N.attribute_name"
6+
#
7+
# Usage: mixout-gain-dax-alh-dai-copier-playback pipeline object can be instantiated as:
8+
#
9+
# Object.Pipeline.mixout-gain-dax-alh-dai-copier-playback."N" {
10+
# time_domain "timer"
11+
# }
12+
#
13+
# Where N is the unique pipeline ID within the same alsaconf node.
14+
#
15+
16+
<include/components/alh-dai-copier.conf>
17+
<include/components/dolby-dax.conf>
18+
<include/components/gain.conf>
19+
<include/components/mixout.conf>
20+
<include/components/pipeline.conf>
21+
22+
Class.Pipeline."mixout-gain-dax-alh-dai-copier-playback" {
23+
24+
<include/pipelines/pipeline-common.conf>
25+
26+
attributes {
27+
!constructor [
28+
"index"
29+
]
30+
31+
!immutable [
32+
"direction"
33+
]
34+
35+
#
36+
# mixout-gain-dax-alh-dai-copier-playback objects instantiated within the same alsaconf
37+
# node must have unique instance attribute
38+
#
39+
unique "instance"
40+
}
41+
42+
Object.Widget {
43+
mixout."1" {}
44+
alh-copier."1" {
45+
type dai_in
46+
num_input_audio_formats 1
47+
num_output_audio_formats 1
48+
num_input_pins 1
49+
50+
# copier only supports one format based on mixin/mixout requirements:
51+
# 32-bit 48KHz 2ch
52+
Object.Base.input_audio_format [
53+
{
54+
in_bit_depth 32
55+
in_valid_bit_depth 32
56+
in_sample_type $SAMPLE_TYPE_MSB_INTEGER
57+
in_fmt_cfg "$[($in_channels | ($in_valid_bit_depth * 256))]"
58+
}
59+
]
60+
Object.Base.output_audio_format [
61+
{
62+
out_bit_depth 32
63+
out_valid_bit_depth 32
64+
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
65+
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
66+
}
67+
]
68+
}
69+
gain."1" {
70+
num_input_audio_formats 1
71+
num_output_audio_formats 1
72+
73+
# 32-bit 48KHz 2ch
74+
Object.Base.input_audio_format [
75+
{
76+
in_bit_depth 32
77+
in_valid_bit_depth 32
78+
}
79+
]
80+
Object.Base.output_audio_format [
81+
{
82+
out_bit_depth 32
83+
out_valid_bit_depth 32
84+
}
85+
]
86+
}
87+
dolby-dax."1" {
88+
num_input_audio_formats 1
89+
num_output_audio_formats 1
90+
Object.Base.input_audio_format [
91+
{
92+
in_rate 48000
93+
in_bit_depth 32
94+
in_valid_bit_depth 32
95+
ibs "$[(256 * ($[($in_bit_depth / 8)])) * ($in_channels)]"
96+
}
97+
]
98+
Object.Base.output_audio_format [
99+
{
100+
out_rate 48000
101+
out_bit_depth 32
102+
out_valid_bit_depth 32
103+
obs "$[(256 * ($[($out_bit_depth / 8)])) * ($out_channels)]"
104+
}
105+
]
106+
}
107+
108+
pipeline."1" {
109+
priority 0
110+
lp_mode 0
111+
}
112+
}
113+
114+
Object.Base {
115+
!route [
116+
{
117+
source gain.$index.1
118+
sink dolby-dax.$index.1
119+
}
120+
{
121+
source mixout.$index.1
122+
sink gain.$index.1
123+
}
124+
]
125+
}
126+
127+
direction "playback"
128+
dynamic_pipeline 1
129+
time_domain "timer"
130+
}

tools/topology/topology2/platform/intel/sdw-amp-generic.conf

Lines changed: 113 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,76 @@ IncludeByKey.PASSTHROUGH {
100100

101101
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
102102
"true" {
103+
IncludeByKey.USE_DAX {
104+
"true" {
105+
mixout-gain-dax-alh-dai-copier-playback [
106+
{
107+
index 21
108+
109+
Object.Widget.alh-copier.1 {
110+
stream_name $SDW_SPK_STREAM
111+
node_type $ALH_LINK_OUTPUT_CLASS
112+
num_input_audio_formats 3
113+
Object.Base.input_audio_format [
114+
{
115+
in_bit_depth 16
116+
in_valid_bit_depth 16
117+
}
118+
{
119+
in_bit_depth 32
120+
in_valid_bit_depth 24
121+
}
122+
{
123+
in_bit_depth 32
124+
in_valid_bit_depth 32
125+
}
126+
]
127+
num_output_audio_formats 1
128+
Object.Base.output_audio_format [
129+
{
130+
out_bit_depth 32
131+
out_valid_bit_depth $SDW_LINK_VALID_BITS
132+
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
133+
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
134+
}
135+
]
136+
}
137+
Object.Widget.gain.1 {
138+
Object.Control.mixer.1 {
139+
name 'Post Mixer $AMP_PLAYBACK_NAME Volume'
140+
}
141+
}
142+
Object.Widget.dolby-dax.1 {
143+
core_id $DOLBY_DAX_CORE_ID
144+
Object.Control {
145+
mixer."1" {
146+
name 'DAX Speaker Switch'
147+
}
148+
mixer."2" {
149+
name 'DAX Speaker Switch CP'
150+
}
151+
mixer."3" {
152+
name 'DAX Speaker Switch CTC'
153+
}
154+
mixer."4" {
155+
name 'DAX Speaker Volume'
156+
}
157+
enum."1" {
158+
name 'DAX Speaker Profile'
159+
}
160+
enum."2" {
161+
name 'DAX Speaker Device'
162+
}
163+
bytes."1" {
164+
name 'DAX Speaker Tuning'
165+
max 8192
166+
}
167+
}
168+
}
169+
}
170+
]
171+
}
172+
"false" {
103173
mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback [
104174
{
105175
index 21
@@ -160,6 +230,8 @@ IncludeByKey.PASSTHROUGH {
160230
}
161231
}
162232
]
233+
}
234+
}
163235
}
164236
"false" {
165237
mixout-gain-alh-dai-copier-playback [
@@ -648,16 +720,32 @@ IncludeByKey.PASSTHROUGH {
648720
"true" {
649721
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
650722
"true" {
651-
Object.Base.route [
652-
{
653-
source "drc.21.1"
654-
sink "module-copier.21.22"
723+
IncludeByKey.USE_DAX {
724+
"true" {
725+
Object.Base.route [
726+
{
727+
source "dolby-dax.21.1"
728+
sink "module-copier.21.22"
729+
}
730+
{
731+
source "module-copier.21.22"
732+
sink "alh-copier.$SDW_SPK_STREAM.0"
733+
}
734+
]
655735
}
656-
{
657-
source "module-copier.21.22"
658-
sink "alh-copier.$SDW_SPK_STREAM.0"
736+
"false" {
737+
Object.Base.route [
738+
{
739+
source "drc.21.1"
740+
sink "module-copier.21.22"
741+
}
742+
{
743+
source "module-copier.21.22"
744+
sink "alh-copier.$SDW_SPK_STREAM.0"
745+
}
746+
]
659747
}
660-
]
748+
}
661749
}
662750
"false" {
663751
Object.Base.route [
@@ -676,12 +764,24 @@ IncludeByKey.PASSTHROUGH {
676764
"false" {
677765
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
678766
"true" {
679-
Object.Base.route [
680-
{
681-
source "drc.21.1"
682-
sink "alh-copier.$SDW_SPK_STREAM.0"
767+
IncludeByKey.USE_DAX {
768+
"true" {
769+
Object.Base.route [
770+
{
771+
source "dolby-dax.21.1"
772+
sink "alh-copier.$SDW_SPK_STREAM.0"
773+
}
774+
]
683775
}
684-
]
776+
"false" {
777+
Object.Base.route [
778+
{
779+
source "drc.21.1"
780+
sink "alh-copier.$SDW_SPK_STREAM.0"
781+
}
782+
]
783+
}
784+
}
685785
}
686786
"false" {
687787
Object.Base.route [

0 commit comments

Comments
 (0)