Skip to content

Commit b0ab82b

Browse files
committed
Tools: Topology: Build topologies with 2-way speaker crossover
This patch modifies cavs-sdw.conf to use sdw-amp-xover.conf when crossover feature is enabled with SDW_AMP_XOVER set to true. The built SDCA function topologies are sof-sdca-2amp-id2-xover.tplg and sof-sdca-2amp-feedback-id3-xover.tplg. The currently built topology duplicates a stereo L,R stream into L,R,L,R stream and applies 4th order Linkwitz-Riley low-pass for the first pair and high-pass for the second pair. The crossover frequency is set to 2 kHz as example. The crossover parameters should be changed to match the acoustical design of speaker acoustics of the device. Also there could be different channels mappings and high/low-pass apply need. Other variants can be created with the Octave scripts in the next patch. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 21beadb commit b0ab82b

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

tools/topology/topology2/cavs-sdw.conf

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
<virtual.conf>
1414
<host-copier-gain-mixin-playback.conf>
1515
<mixout-gain-alh-dai-copier-playback.conf>
16+
<mixout-gain-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
1617
<mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback.conf>
18+
<mixout-gain-eqiir-eqfir-drc-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
1719
<dai-copier-gain-eqiir-module-copier-capture.conf>
1820
<gain-capture.conf>
1921
<gain-copier-capture.conf>
@@ -92,6 +94,11 @@ Define {
9294
EFX_MIC_TDFB_PARAMS "line2_generic_pm10deg"
9395
EFX_MIC_DRC_PARAMS "dmic_default"
9496
DMIC0_DAI_EQIIR "highpass_40hz_20db"
97+
SDW_AMP_NUM_CHANNELS 2
98+
SDW_AMP_XOVER false
99+
SDW_AMP_XOVER_SELECTOR_PARAMS default
100+
SDW_AMP_XOVER_EQIIR_PARAMS default
101+
SDW_AMP_XOVER_EQFIR_PARAMS default
95102
}
96103

97104
# override defaults with platform-specific config
@@ -119,8 +126,17 @@ IncludeByKey.NUM_HDMIS {
119126
"[3-4]" "platform/intel/hdmi-generic.conf"
120127
}
121128

122-
IncludeByKey.NUM_SDW_AMP_LINKS {
123-
"[1-3]" "platform/intel/sdw-amp-generic.conf"
129+
IncludeByKey.SDW_AMP_XOVER {
130+
"false" {
131+
IncludeByKey.NUM_SDW_AMP_LINKS {
132+
"[1-3]" "platform/intel/sdw-amp-generic.conf"
133+
}
134+
}
135+
"true" {
136+
IncludeByKey.NUM_SDW_AMP_LINKS {
137+
"[1-3]" "platform/intel/sdw-amp-xover.conf"
138+
}
139+
}
124140
}
125141

126142
IncludeByKey.SDW_DMIC {

tools/topology/topology2/production/tplg-targets-sdca-generic.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,18 @@ SDW_DMIC_STREAM=Capture-SmartMic"
2525
"cavs-sdw\;sof-hdmi-pcm5-id6\;SDW_JACK=false,HDMI1_ID=6,HDMI2_ID=7,HDMI3_ID=8"
2626
"cavs-sdw\;sof-hdmi-pcm5-id7\;SDW_JACK=false,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9"
2727

28+
# Topology for speaker with 2-way crossover filter in SOF
29+
# with channels order L-low, R-low, L-high, R-high
30+
"cavs-sdw\;sof-sdca-2amp-id2-xover\;NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\
31+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
32+
SDW_AMP_NUM_CHANNELS=4,SDW_AMP_XOVER=true,\
33+
SDW_AMP_XOVER_SELECTOR_PARAMS=xover_selector_lr_to_lrlr,\
34+
SDW_AMP_XOVER_EQIIR_PARAMS=xover_lr4_2000hz_llhh_48khz"
35+
36+
"cavs-sdw\;sof-sdca-2amp-feedback-id3-xover\;NUM_SDW_AMP_LINKS=2,\
37+
SDW_JACK=false,SDW_AMP_FEEDBACK=true,SDW_SPK_STREAM=Playback-SmartAmp,\
38+
SDW_SPK_IN_STREAM=Capture-SmartAmp,NUM_HDMIS=0,\
39+
SDW_AMP_NUM_CHANNELS=4,SDW_AMP_XOVER=true,\
40+
SDW_AMP_XOVER_SELECTOR_PARAMS=xover_selector_lr_to_lrlr,\
41+
SDW_AMP_XOVER_EQIIR_PARAMS=xover_lr4_2000hz_llhh_48khz"
2842
)

0 commit comments

Comments
 (0)