Skip to content

Commit 541ac9b

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 9a3ae61 commit 541ac9b

File tree

7 files changed

+355
-0
lines changed

7 files changed

+355
-0
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>
@@ -105,6 +106,8 @@ Define {
105106
SDW_AMP_XOVER_SELECTOR_PARAMS default
106107
SDW_AMP_XOVER_EQIIR_PARAMS default
107108
SDW_AMP_XOVER_EQFIR_PARAMS default
109+
DOLBY_DAX_CORE_ID 0
110+
USE_DAX "false"
108111
}
109112

110113
# 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 "$[(512 * ($[($in_bit_depth / 8)])) * ($in_channels / 2)]"
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 "$[(512 * ($[($out_bit_depth / 8)])) * ($out_channels / 2)]"
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: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,76 @@ IncludeByKey.PASSTHROUGH {
9999

100100
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
101101
"true" {
102+
IncludeByKey.USE_DAX {
103+
"true" {
104+
mixout-gain-dax-alh-dai-copier-playback [
105+
{
106+
index 21
107+
108+
Object.Widget.alh-copier.1 {
109+
stream_name $SDW_SPK_STREAM
110+
node_type $ALH_LINK_OUTPUT_CLASS
111+
num_input_audio_formats 3
112+
Object.Base.input_audio_format [
113+
{
114+
in_bit_depth 16
115+
in_valid_bit_depth 16
116+
}
117+
{
118+
in_bit_depth 32
119+
in_valid_bit_depth 24
120+
}
121+
{
122+
in_bit_depth 32
123+
in_valid_bit_depth 32
124+
}
125+
]
126+
num_output_audio_formats 1
127+
Object.Base.output_audio_format [
128+
{
129+
out_bit_depth 32
130+
out_valid_bit_depth $SDW_LINK_VALID_BITS
131+
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
132+
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
133+
}
134+
]
135+
}
136+
Object.Widget.gain.1 {
137+
Object.Control.mixer.1 {
138+
name 'Post Mixer $AMP_PLAYBACK_NAME Volume'
139+
}
140+
}
141+
Object.Widget.dolby-dax.1 {
142+
core_id $DOLBY_DAX_CORE_ID
143+
Object.Control {
144+
mixer."1" {
145+
name 'DAX Speaker Switch'
146+
}
147+
mixer."2" {
148+
name 'DAX Speaker Switch CP'
149+
}
150+
mixer."3" {
151+
name 'DAX Speaker Switch CTC'
152+
}
153+
mixer."4" {
154+
name 'DAX Speaker Volume'
155+
}
156+
enum."1" {
157+
name 'DAX Speaker Profile'
158+
}
159+
enum."2" {
160+
name 'DAX Speaker Device'
161+
}
162+
bytes."1" {
163+
name 'DAX Speaker Tuning'
164+
max 8192
165+
}
166+
}
167+
}
168+
}
169+
]
170+
}
171+
"false" {
102172
mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback [
103173
{
104174
index 21
@@ -159,6 +229,8 @@ IncludeByKey.PASSTHROUGH {
159229
}
160230
}
161231
]
232+
}
233+
}
162234
}
163235
"false" {
164236
mixout-gain-alh-dai-copier-playback [
@@ -639,12 +711,24 @@ IncludeByKey.PASSTHROUGH {
639711
"false" {
640712
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
641713
"true" {
714+
IncludeByKey.USE_DAX {
715+
"true" {
716+
Object.Base.route [
717+
{
718+
source "dolby-dax.21.1"
719+
sink "alh-copier.$SDW_SPK_STREAM.0"
720+
}
721+
]
722+
}
723+
"false" {
642724
Object.Base.route [
643725
{
644726
source "drc.21.1"
645727
sink "alh-copier.$SDW_SPK_STREAM.0"
646728
}
647729
]
730+
}
731+
}
648732
}
649733
"false" {
650734
Object.Base.route [

0 commit comments

Comments
 (0)