· via Hacker News – Front Page (native)
Windows Loudness Equalization DSP reverse-engineered and ported to PipeWire
A reverse-engineered port of Windows' Loudness Equalization DSP and its companion output limiter now runs as PipeWire modules, giving Linux desktops per-application volume leveling.
A new open-source project called pw-loudness-eq has rebuilt Windows' built-in Loudness Equalization audio effect as PipeWire modules, giving Linux desktops per-application volume leveling for the first time. According to the project's README on GitHub, the effect was reverse-engineered from WMALFXGFXDSP.dll — the Windows DSP that implements it — and is released alongside a port of the output limiter from AudioEng.dll, which keeps the boosted signal from overloading the output. The project reached the front page of Hacker News on 25 November.
What ships in the box
The release has three parts. modules/loudness/ pairs a PipeWire module with a DSP plugin that attaches to every application's playback stream and smooths its level, so quiet and loud passages end up at similar volume. modules/limiter/ applies a look-ahead limiter to every playback device so the added gain cannot clip the output. app/ is an optional GTK3 window for toggling the effect globally or per app and setting the release time.
PipeWire 1.4 or newer is required. The project builds with make, installs with sudo make install, and needs a restart of pipewire, pipewire-pulse and wireplumber afterwards; the README lists the required packages for both Arch and Debian.
Settings live in a PipeWire metadata object rather than a config file, so they can be scripted through pw-metadata: enable or disable the effect, set the release time from 2 (fast) to 7 (slow, default 4), and exempt specific apps — the documented example leaves Discord alone. Settings take effect immediately and survive restarts, with runtime changes saved to a state file that overrides the defaults in /usr/share/pipewire/pipewire.conf.d/60-loudness-eq.conf.
How it hooks into the audio graph
Each application's stream gets audioconvert.filter-graph.90 set on it by the loudness module, so the DSP runs inside the stream itself — ahead of the stream's volume and ahead of mixing, mirroring where stream effects sit on Windows. The limiter occupies the other end of the chain, after the mix and after software volume, always on regardless of whether the equalizer is enabled, as on Windows.
Coverage is not total. JACK clients, streams carrying more than eight channels, and Flatpak apps that talk to PipeWire directly are skipped, though Flatpak apps routed through PulseAudio are still processed.
Inside the algorithm
Despite the name, the effect is not a spectrum equalizer but a broadband automatic gain control, and the README documents it in full. Audio is analyzed in frames of N = 2^ceil(log2(fs/100)) samples — 512 at 44.1 or 48 kHz — with 50% overlap. Each channel is windowed and run through a real FFT, and the resulting power spectrum is summed into 25 bands whose edges run from 100 Hz to 24 kHz, with channels combined. A loudness value L is derived from those bands, and the target gain is min((1300/L)^1.6, 10), which caps the boost at +20 dB.
Gain movement is asymmetric. When the target sits below the current gain, the gain drops to it instantly; otherwise it rises toward the target at a rate set by the release parameter, with the default of 4 working out to a time constant of about 4.6 seconds. The equalizer itself adds N samples of latency.
The limiter, ported from CAudioLimiter — which audiodg.exe places on every render device on Windows, after that device's effects and before the hardware — delays the output by 64 frames at 44.1/48 kHz. When a frame entering the delay peaks above the tracked peak (initialized at 0.985), a single gain shared by all channels ramps down linearly to 0.985 divided by that peak, arriving just as the frame exits; it recovers at roughly 19 dB/s, but only once the signal falls to half the tracked peak or below. One subtlety the README calls out: Windows applies device software volume before the limiter, while PipeWire applies it after the device's filter graphs, so the plugin reads each channel's volume from the module and measures peaks on the post-volume signal, applying only its own gain so the end result matches Windows.
Why it matters
The immediate payoff is functional. Loudness leveling is the sort of unglamorous stock feature Windows users take for granted and Linux desktops have lacked natively, and it changes how media sounds: quiet dialogue in films becomes audible without loud passages rattling the room, and late-night listening stops being a volume-riding chore. Because processing happens per stream, each application is leveled independently rather than everything passing through a single global compressor.
The port is also a demonstration of PipeWire's extension points: a third-party module can insert a DSP into every stream's filter graph and a limiter into every device without patching PipeWire itself, which leaves room for more Windows-style audio effects to follow. And by publishing the reverse-engineered math — band edges, gain laws, limiter timing — alongside tests (make check) and an offline processing tool, leq-wav, the project doubles as a precise reference for anyone implementing loudness normalization elsewhere.
- #pipewire
- #linux
- #audio
- #open-source
- #reverse-engineering