Skip to content

Commit e98d8a8

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 5f558f3 commit e98d8a8

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

tools/topology/topology2/cavs-sdw.conf

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
<virtual.conf>
1414
<host-copier-gain-mixin-playback.conf>
1515
<mixout-gain-alh-dai-copier-playback.conf>
16+
<mixout-gain-micsel-eqiir-alh-dai-copier-playback.conf>
17+
<mixout-gain-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
1618
<mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback.conf>
19+
<mixout-gain-eqiir-eqfir-drc-micsel-eqiir-alh-dai-copier-playback.conf>
20+
<mixout-gain-eqiir-eqfir-drc-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
1721
<dai-copier-gain-eqiir-module-copier-capture.conf>
1822
<gain-capture.conf>
1923
<gain-copier-capture.conf>
@@ -92,6 +96,11 @@ Define {
9296
EFX_MIC_TDFB_PARAMS "line2_generic_pm10deg"
9397
EFX_MIC_DRC_PARAMS "dmic_default"
9498
DMIC0_DAI_EQIIR "highpass_40hz_20db"
99+
SDW_AMP_NUM_CHANNELS 2
100+
SDW_AMP_XOVER false
101+
SDW_AMP_XOVER_SELECTOR_PARAMS default
102+
SDW_AMP_XOVER_EQIIR_PARAMS default
103+
SDW_AMP_XOVER_EQFIR_PARAMS default
95104
}
96105

97106
# override defaults with platform-specific config
@@ -119,8 +128,17 @@ IncludeByKey.NUM_HDMIS {
119128
"[3-4]" "platform/intel/hdmi-generic.conf"
120129
}
121130

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

126144
IncludeByKey.SDW_DMIC {

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,28 @@ 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"
42+
43+
# Topology for speaker with 2-way crossover filter in SOF
44+
# with channels order L-low, R-low, L-high, R-high
45+
"cavs-sdw\;sof-sdca-2amp-id2-xover-basic\;NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\
46+
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
47+
SDW_AMP_NUM_CHANNELS=4,SDW_AMP_XOVER=true,\
48+
SDW_AMP_XOVER_SELECTOR_PARAMS=xover_selector_lr_to_lrlr,\
49+
SDW_AMP_XOVER_EQIIR_PARAMS=xover_lr4_2000hz_llhh_48khz,\
50+
SDW_SPK_ENHANCED_PLAYBACK=false"
51+
2852
)

0 commit comments

Comments
 (0)