Skip to content

About

Speaker protection for Apple Silicon Macs on Linux that works the way macOS's does: an in-graph protection unit driven by the Mac's own tuning, plus the kernel speaker interlock

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

speakerguardd

Speaker protection for Apple Silicon Macs that works the way macOS's does: the same protection unit at the same place in the speaker graph, with the amplifier's voltage and current sense as its second input where the Mac has it, driven by that Mac's own tuning and factory calibration.

  • spp3 for the V/I MacBooks (14" and 16" MacBook Pro, MacBook Air M2/M3, 15" Air M4/M5);
  • lsm2 for the MacBook Neo and the 13" MacBook Air M4/M5;
  • atsp for the 13" MacBook Pro M1/M2 and the MacBook Air M1, later.

The acceptance bar is 1:1 parity: on identical input, the unit's internal state (power, coil and magnet temperatures, closed-loop correction, every constraint and the final gain) matches macOS's own, quantum by quantum, including the failure cases.

Status: 1.0.0-alpha. Not for use yet.

Branches: main is speakerguardd 2. It was developed on the v2 branch, which now follows main for anyone still tracking it; open pull requests against main. The unrelated 0.1.x daemon is frozen on legacy/v0.1 (security and safety fixes only, last release tagged v0.1-final).

Layout

Path What
crates/aurora-speaker-tuning Reader and validator for the Mac's tuning bundle that the Aurora installer stores with the vendor firmware
crates/sgv2-core The protection framework: one ProtectionUnit trait for spp3, lsm2 and atsp; real-time safe
crates/sgv2-lv2 LV2 host for the core, loaded by the PipeWire filter-chain
crates/sgv2-supervisor speakerguardd: path integrity and the kernel interlock
crates/sgv2-render Offline renderer for the differential rig
tools/diffrig Differential rig against macOS: trace schema, comparator, macOS reference host
packaging systemd, SELinux, PipeWire and WirePlumber
docs Design, conventions, provenance

Build

cargo test --workspace
cargo build --release --target aarch64-unknown-linux-musl   # static, for the Macs

The LowFlow exact-law path remains the default build, but has not yet passed its parity gate. A deliberately quieter, separately flagged fallback is available with --features sgv2-core/lowflow-conservative. It retains the saved volume law and exact lane delay, but fixes enabled LF lanes 6 dB below the saved attenuation ceiling instead of using the provisional detector/state model. For the unit's gain bound g_au >= g_floor, the fallback therefore guarantees g_fallback <= 10^(-6/20) * g_au sample by sample on enabled LF lanes; disabled and HF lanes remain exact delays, and muted lanes remain silent.

Credits

The tuning reader and the installer's collection of the tuning bundle are based on aurora-audio-dsp by saku (MIT). See crates/aurora-speaker-tuning/LICENSE-aurora-audio-dsp.

License

MIT. See LICENSE.

About

Speaker protection for Apple Silicon Macs on Linux that works the way macOS's does: an in-graph protection unit driven by the Mac's own tuning, plus the kernel speaker interlock

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages