Skip to content

Commit 7540307

Browse files
singalsulgirdwood
authored andcommitted
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 2fe0859 commit 7540307

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>
@@ -98,6 +100,11 @@ Define {
98100
EFX_MIC_TDFB_PARAMS "line2_generic_pm10deg"
99101
EFX_MIC_DRC_PARAMS "dmic_default"
100102
DMIC0_DAI_EQIIR "highpass_40hz_20db"
103+
SDW_AMP_NUM_CHANNELS 2
104+
SDW_AMP_XOVER false
105+
SDW_AMP_XOVER_SELECTOR_PARAMS default
106+
SDW_AMP_XOVER_EQIIR_PARAMS default
107+
SDW_AMP_XOVER_EQFIR_PARAMS default
101108
}
102109

103110
# override defaults with platform-specific config
@@ -125,8 +132,17 @@ IncludeByKey.NUM_HDMIS {
125132
"[3-4]" "platform/intel/hdmi-generic.conf"
126133
}
127134

128-
IncludeByKey.NUM_SDW_AMP_LINKS {
129-
"[1-3]" "platform/intel/sdw-amp-generic.conf"
135+
IncludeByKey.SDW_AMP_XOVER {
136+
"false" {
137+
IncludeByKey.NUM_SDW_AMP_LINKS {
138+
"[1-3]" "platform/intel/sdw-amp-generic.conf"
139+
}
140+
}
141+
"true" {
142+
IncludeByKey.NUM_SDW_AMP_LINKS {
143+
"[1-3]" "platform/intel/sdw-amp-xover.conf"
144+
}
145+
}
130146
}
131147

132148
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
@@ -27,4 +27,18 @@ SDW_DMIC_STREAM=Capture-SmartMic"
2727
"cavs-sdw\;sof-hdmi-pcm5-id6\;SDW_JACK=false,HDMI1_ID=6,HDMI2_ID=7,HDMI3_ID=8"
2828
"cavs-sdw\;sof-hdmi-pcm5-id7\;SDW_JACK=false,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9"
2929

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

0 commit comments

Comments
 (0)