Crossover Filter Architecture#
The Crossover Filter subsystem in Sound Open Firmware provides spectral band splitting, multi-driver transducer routing, and frequency-domain decomposition across active loudspeaker systems and multi-band audio processing pipelines.
In acoustic engineering, physical speaker transducers are bounded by rigid physical and mechanical constraints: large-diameter woofers excel at moving large volumes of air to reproduce low-frequency bass but possess too much cone inertia to oscillate rapidly at high frequencies without severe breakup distortion. Conversely, miniature, lightweight tweeters reproduce delicate high-frequency transients effortlessly, but undergo destructive excursion and voice coil burnout if subjected to high-energy bass frequencies.
To overcome these constraints, high-fidelity audio systems employ Multi-Way Loudspeakers (such as 2-way woofer/tweeter systems, 3-way sub/mid/tweeter setups, or 4-way full-range towers). The SOF Crossover component acts as the digital frequency division engine, cleanly partitioning a wideband input audio stream into multiple dedicated frequency bands tailored to individual acoustic drivers or downstream processing components.
SOF implements active digital crossovers using Linkwitz-Riley 4th-Order (LR4) filter networks configured in 2-way, 3-way, and 4-way topologies, providing steep 24 dB/octave attenuation slopes, flat magnitude summation, and in-phase acoustic alignment without comb filtering.
This guide provides a comprehensive, high-level architectural walkthrough of the Crossover filter subsystem, Linkwitz-Riley filter theory, multi-way splitting topologies with all-pass phase alignment, 1-to-N multi-sink buffer distribution, and SIMD hardware acceleration without delving into low-level C code.
—
1. Electro-Acoustic Motivations & Crossover Principles#
An audio crossover is an electrical or digital filter network that splits an incoming wideband audio signal into multiple frequency bands tailored to specific transducers or processors:
Subwoofer Band (< 80 Hz): Extremely high excursion, omnidirectional deep bass reproduction.
Woofer / Bass Band (80 Hz – 1 kHz): Low-to-midrange bass punch, drum transients, and lower vocal registers.
Midrange Band (1 kHz – 4 kHz): Critical human vocal fundamentals, speech clarity, and instrumental harmonics.
Tweeter / High Band (> 4 kHz): High-frequency sibilance, cymbal brilliance, and spatial airiness.
Passive Analog Crossovers vs Active Digital Crossovers#
Traditionally, multi-driver speaker cabinets rely on passive analog crossovers placed inside the loudspeaker cabinet between a single power amplifier and the physical drivers:
Limitations of Passive Analog Crossovers:
Power Dissipation & Thermal Drift: Passive crossovers utilize large inductors with high DC resistance and electrolytic capacitors that dissipate amplifier power as heat. Component heating causes filter values to drift significantly during loud listening sessions.
Damping Factor Loss: Inductors placed in series with woofers degrade the amplifier’s electrical damping factor, resulting in loose, uncontrolled bass ringing.
Component Tolerances & Phase Smearing: Real-world passive component tolerances (often 5% to 10%) cause unpredictable phase shifts, irregular impedance curves, and destructive acoustic notches at the crossover frequency.
Advantages of Active DSP Crossovers in SOF:
Pristine Digital Domain Splitting: Frequency division occurs inside the DSP firmware before digital-to-analog conversion and power amplification (bi-amping, tri-amping, or quad-amping).
Zero Power Loss & Perfect Damping: Power amplifiers connect directly to driver voice coils with zero intervening passive circuitry, maximizing electrical damping and acoustic efficiency.
Mathematical Precision & Stability: Digital filter coefficients operate with mathematical exactness, unaffected by temperature, component aging, or electrical tolerances.
Steep 24 dB/Octave Roll-Offs: Active DSP filters easily achieve steep 4th-order Linkwitz-Riley slopes that would require prohibitively bulky, expensive, and lossy passive components.
Figure 84 Active DSP Crossover vs Passive Analog Crossover Architectures in Multi-Driver Loudspeakers#
—
2. Linkwitz-Riley 4th-Order (LR4) Filter Theory & Phase Alignment#
Selecting the mathematical filter topology for an active acoustic crossover is critical. In audio textbooks, Butterworth filters are renowned for their maximally flat passband response. However, when applied to multi-driver acoustic crossovers, traditional Butterworth filters exhibit severe acoustic flaws.
The Flaws of Conventional Butterworth Crossovers#
The +3 dB Acoustic Bump: Standard Butterworth low-pass and high-pass filters intersect at their \(-3\text{ dB}\) half-power points. While uncorrelated signals (such as independent white noise sources) sum flat, coherent audio signals (such as musical notes spanning the crossover frequency) sum in voltage: \(1/\sqrt{2} + 1/\sqrt{2} = \sqrt{2} \approx +3\text{ dB}\). This produces an unnatural, audible acoustic peak at the crossover frequency \(f_c\).
Phase Quadrature & Acoustic Lobing: Butterworth filters produce a \(90^\circ\) phase difference between their low-pass and high-pass outputs at \(f_c\). When sound radiates into a room from physically separated speaker drivers, this \(90^\circ\) phase disparity causes the primary acoustic radiation lobe to tilt off-axis, creating destructive comb filtering and acoustic notches whenever the listener moves vertically.
The Linkwitz-Riley (LR4) Innovation#
To solve these acoustic dilemmas, acoustic pioneers Siegfried Linkwitz and Russ Riley designed the Linkwitz-Riley filter topology. In Sound Open Firmware, all active crossovers are implemented as 4th-Order Linkwitz-Riley (LR4) networks:
Cascaded Butterworth Pairs: An LR4 filter is constructed by cascading two identical 2nd-order Butterworth filters in series:
\[H_{\text{LR4}}(z) = \Big( H_{\text{Butterworth 2nd}}(z) \Big)^2\]Flat 0 dB Magnitude Summation: Because each 2nd-order stage contributes \(-3\text{ dB}\) of attenuation at \(f_c\), the cascaded LR4 low-pass and high-pass filters are both down by exactly \(-6\text{ dB}\) at the crossover frequency:
\[|H_{\text{LP}}(j\omega_c)| = 0.5 \quad (-6\text{ dB}), \qquad |H_{\text{HP}}(j\omega_c)| = 0.5 \quad (-6\text{ dB})\]When the low-pass and high-pass acoustic outputs sum in the air, their coherent combination is mathematically flat:
\[|H_{\text{LP}}(j\omega) + H_{\text{HP}}(j\omega)| = 1.0 \quad (0\text{ dB}) \quad \forall \omega\]Strict In-Phase Acoustic Alignment: The phase difference between the low-pass and high-pass outputs of an LR4 filter is exactly \(360^\circ\) (or \(0^\circ\) modulo \(360^\circ\)) across all frequencies. Because the drivers operate perfectly in phase across the transition band, the acoustic radiation pattern remains centered along the horizontal listening axis with zero vertical lobing tilt.
Steep 24 dB/Octave Roll-Off: The 4th-order slope provides rapid attenuation outside the passband, shielding fragile tweeters from low-frequency excursion damage and eliminating high-frequency woofer cone breakup resonances.
Figure 85 Linkwitz-Riley 4th-Order (LR4) Magnitude Summation (-6 dB at fc) and In-Phase Acoustic Alignment#
—
3. Crossover Topologies: 2-Way, 3-Way, and 4-Way Splitting#
Sound Open Firmware supports three fundamental crossover topologies configured via parameter blobs and topology tokens:
2-Way Crossover Topology (Woofer + Tweeter)#
Structure: Splits wideband audio at a single cutoff frequency \(f_c\) using one low-pass LR4 filter and one high-pass LR4 filter.
Filter Count: 2 LR4 filters (each composed of 2 biquads in series, totaling 4 biquads per channel).
Outputs: Output 0 (Low / Woofer) and Output 1 (High / Tweeter).
Use Cases: Standard stereo bookshelf speakers, two-way studio monitors, and dual-driver laptop audio systems.
3-Way Crossover Topology & The All-Pass Phase Equalization Trick#
In a 3-way crossover, audio is partitioned into three bands: Low (Sub/Woofer), Mid (Midrange driver), and High (Tweeter) across two cutoff frequencies (\(f_{c1}, f_{c2}\)):
The Asymmetric Phase Dilemma:
The incoming signal is first split into a Low branch and a High branch at \(f_{c1}\) using LR4 pair 0 (
LP0andHP0).The high branch is subsequently split at \(f_{c2}\) using LR4 pair 2 (
LP2andHP2), yielding the Midrange and Tweeter outputs.Notice that the Midrange and Tweeter signals pass through two sequential LR4 filters, while the Low signal only passes through one LR4 filter (
LP0).Because each LR4 filter introduces a phase shift, passing through two filters rotates the phase of Mid and High by \(360^\circ\) relative to Low, causing a catastrophic \(180^\circ\) phase inversion between Low and Mid!
The All-Pass Merger Solution:
To restore phase coherence, SOF routes the Low branch through an auxiliary LR4 filter pair (
LP1andHP1) and immediately sums their outputs back together (crossover_generic_lr4_merge()).Because an LR4 low-pass and high-pass sum to a flat magnitude of 1.0, this operation acts as a pure all-pass filter: it leaves the magnitude of the Low band completely unaltered while introducing the exact phase shift and group delay of an additional LR4 stage!
Consequently, all three output bands pass through exactly two LR4 stages, guaranteeing strict phase alignment across all crossover regions.
4-Way Crossover Topology (Sub + Woofer + Mid + Tweeter)#
Structure: A fully symmetrical 2-stage tree decomposition across three cutoff frequencies (\(f_{c1}, f_{c2}, f_{c3}\)): - Stage 1: Splits the wideband signal into Low-Mid and Mid-High branches using LR4 pair 1 (
LP1,HP1). - Stage 2: Low-Mid is split into Sub and Woofer using LR4 pair 0 (LP0,HP0); Mid-High is split into Midrange and Tweeter using LR4 pair 2 (LP2,HP2).Filter Count: 6 LR4 filters (12 biquads per channel).
Inherent Phase Alignment: Because every signal path traverses exactly two sequential LR4 stages, phase delays are inherently identical across all four bands without requiring auxiliary phase-correction networks.
Figure 86 Crossover Split Topologies: 2-Way, 3-Way (with All-Pass Phase Merger), and 4-Way Tree Decomposition#
—
4. Direct Form I Biquad Cascade Implementation Mechanics#
Each 4th-order Linkwitz-Riley filter is implemented in DSP firmware by cascading two identical 2nd-order Direct Form I (DF1) biquad stages in series.
Direct Form I Difference Equations#
For each biquad section, the output is computed via the standard difference equation:
State Variables & Accumulator Precision#
Independent Delay States: Direct Form I stores two input state variables (\(x[n-1], x[n-2]\)) and two output state variables (\(y[n-1], y[n-2]\)). For an LR4 filter (two biquads), exactly 4 delay slots are allocated per filter (
CROSSOVER_NUM_DELAYS_LR4 = 4).64-Bit Internal Accumulation: All product terms accumulate into a 64-bit register with guard bits before rounding and shifting. This prevents internal overflow and avoids limit cycle oscillations near low-frequency cutoff points.
Fixed-Point Formatting: - Filter coefficients (\(a_1, a_2, b_0, b_1, b_2\)) are represented in high-precision \(Q2.30\) fixed-point format. - Headroom and gain normalization are controlled via per-section
output_shiftandoutput_gain(\(Q2.14\)).
Figure 87 Cascaded Biquad Implementation of an LR4 Filter with 64-Bit Accumulation#
—
5. Multi-Sink Routing, ALSA Topology 2 & IPC4 Pin Indexing#
Unlike standard 1-in-1-out audio effect widgets (such as Volume or Equalizer), the Crossover module is an inherently 1-to-N multi-sink stream splitter: it consumes a single wideband input stream and simultaneously drives multiple independent sink buffers.
Multi-Sink Buffer Management#
Sink Array (``bsinks[]``): The crossover processing function receives an array of output stream buffers corresponding to the number of configured bands (2, 3, or 4).
Sink Assignment Vector (``assign_sinks[]``): A parameter array maps logical crossover frequency outputs to destination sink pipeline IDs:
assign_sinks[0] = 0 # Logical Low band -> Sink Buffer 0 (Woofer Pipeline) assign_sinks[1] = 1 # Logical High band -> Sink Buffer 1 (Tweeter Pipeline)
Passthrough Fallback Mode: When
num_sinks == 1or when the component is disabled via ALSA mixer controls, the module operates in passthrough mode (crossover_default_pass()), replicating input frames across output buffers with zero filtering overhead.
IPC4 Dynamic Pin Indexing#
In SOF IPC4, modules are dynamically bound by connecting source pins to sink pins across independent processing modules. Because the Crossover component produces multiple output pins dynamically, the IPC4 firmware requires upfront knowledge of output pin indices before pipeline instantiation:
Early Initialization Config (``init_config = 1``): In
crossover.toml, the Crossover module setsinit_config = 1, instructing the build system to append the extended base configuration (base_cfg_ext) to the module initialization IPC payload.Pin Binding: This upfront payload informs the IPC4 runtime how many output pins are active, enabling the host driver to bind downstream pipeline widgets directly to individual crossover frequency bands.
ALSA Topology 2 Integration#
The Crossover widget is declared in ALSA Topology 2 configuration files using tools/topology/topology2/include/components/crossover.conf:
Widget Type:
effectComponent UUID:
d1:9a:8c:94:6a:80:31:41:ad:6c:b2:bd:a9:e3:5a:9fStatic ROM Initialization: Default crossover cutoff frequencies, biquad coefficients, and sink routing maps can be compiled directly into the topology binary (
.bin), establishing active speaker frequency division immediately upon hardware boot.
Figure 88 1-to-N Multi-Sink Buffer Distribution and ALSA Topology 2 / IPC4 Output Pin Binding#
—
6. System-Level Deployment: Multi-Amp Systems vs Multi-Band DRC#
The SOF Crossover engine serves two primary architectural deployment models across audio products:
Model A: Standalone Multi-Amplifier Loudspeaker Systems#
In high-end laptops, automotive audio, and smart speakers, the Crossover operates as an autonomous 1-to-N stream splitter:
The input audio stream is split into discrete bands that exit the DSP through separate digital audio interfaces (e.g. multi-channel SoundWire or TDM I2S).
Each band is routed to a dedicated physical amplifier chip optimized for that specific driver (e.g. high-current Class-D amplifier for woofers, ultra-low-noise amplifier for tweeters).
Features per-channel independent volume ramping, limiter protection, and speaker EQ.
Model B: Embedded Spectral Splitting within Multi-Band DRC#
In compact single-amplifier systems, the Crossover operates as an internal component embedded inside the Multi-Band Dynamic Range Compressor (src/audio/multiband_drc/):
The LR4 crossover filter bank partitions the signal into sub-bands internally without exposing multiple external sink pins.
Each band is compressed independently by parallel DRC instances to eliminate spectral pumping.
The bands are recombined into a single wideband output stream delivered to a single shared speaker amplifier.
Figure 89 System-Level Acoustic Deployment: Standalone Multi-Amping vs Multi-Band DRC Subsystem#
—
7. SIMD Vector Acceleration Across DSP Architectures#
Processing multi-channel audio through up to 6 LR4 filters (12 cascaded biquads per channel) imposes significant computational demands on embedded DSP cores.
SOF optimizes the crossover filtering pipeline through dedicated vector implementations:
Cadence Tensilica Xtensa HiFi 3 & HiFi 4:
Vectorized biquad filtering utilizing 64-bit dual multiply-accumulate instructions (
AE_MULAA32RA).Processes multiple audio channels or biquad sections in parallel with hardware saturation.
Automatic circular delay indexing without scalar pointer branching.
Cadence Tensilica Xtensa HiFi 5:
8-way 32-bit vector processing engine (256-bit bus) accelerating parallel multi-channel crossover splits.
Dual 128-bit memory load buses allow simultaneously fetching filter coefficients and audio delay buffers in a single clock cycle.
Generic Portable Scalar C (``crossover_generic.c``):
Clean, portable scalar C implementations designed for non-Xtensa platforms (e.g. ARM Cortex-M7 on Teensy 4.1, RISC-V on ESP32-P4).
Figure 90 SIMD Vector Processing across Hardware Architectures#
—