feat: Next-Gen Audio DSP Stack Architecture (Multi-Laptop Auto-Detection, 5.0ms Parallel Lookahead FIR, & Zero-Drop Stream Migration) #7

Open
steve wants to merge 18 commits from nextgen-engine into main
Owner

Summary of Changes

This Pull Request introduces the Next-Gen Audio DSP Stack Architecture to main:

1. 💻 Multi-Laptop Profile Hierarchy & DMI Auto-Detection (Phase 1)

  • Created laptop-configs/<vendor>/<model>/ hardware profile structure holding baseline driver WAVs, graph topology, and profile.json metadata.
  • Authored detect_hardware.py to dynamically query Linux /sys/class/dmi/id/ sysfs metadata (sys_vendor and product_name) to match hardware profiles automatically.
  • Added CLI flags to detect_hardware.py: --help, --list-configs, --model, --manual, --profile, --json, and --quiet with fallback warning reporting.

2. ⏱️ Parallel 5.0ms Lookahead Sidechain FIR Limiting (Phase 2)

  • Enhanced bake-graph.py to generate parallel advance control taps (baked-lookahead-*.wav) alongside main audio path FIRs (baked-*.wav).
  • Main Path FIR: Trims pre-delay lead to 5.0 ms.
  • Lookahead Sidechain FIR: Trims directly to peak index (0.0 ms lead), delivering advance peak warnings to post-convolver limiters (wlim / tlim) 5.0 ms before physical speaker output with 0.0 ms added listener buffer latency.

3. 🎛️ User EQ Graph Merging & Hardware Interoperability

  • Fixed apply.sh so jq always merges user_eq.json into both --bake (graph_simple.json) and un-baked graphs.
  • Moved capture.volumes inside capture.props in PipeWire schema for loudness:volume control binding.
  • Hardware media keys (F11/F12 / Touch Bar) smoothly control the DSP Speakers virtual sink.

4. 🔄 Zero-Drop Stream Migration & Robust Service Reloads

  • Added pactl move-sink-input iteration upon cold restart (HOT=0 default).
  • Active application streams (Firefox/YouTube, Spotify, Chrome) automatically migrate to the new DSP sink without requiring a browser tab reload or app restart.
  • Added wp() helper with 1.5s timeout and copy_file_safe() helper for smooth IPC and permission handling.

5. 📄 Comprehensive Documentation (ARCHITECTURE.md)

  • Authored ARCHITECTURE.md documenting single-pass LTI convolution, Mermaid processing flow diagrams, single-pass FIR baking steps, multi-laptop profile structures, and "Digital Surround" active crossover terminology.
## Summary of Changes This Pull Request introduces the **Next-Gen Audio DSP Stack Architecture** to `main`: ### 1. 💻 Multi-Laptop Profile Hierarchy & DMI Auto-Detection (Phase 1) - Created `laptop-configs/<vendor>/<model>/` hardware profile structure holding baseline driver WAVs, graph topology, and `profile.json` metadata. - Authored `detect_hardware.py` to dynamically query Linux `/sys/class/dmi/id/` sysfs metadata (`sys_vendor` and `product_name`) to match hardware profiles automatically. - Added CLI flags to `detect_hardware.py`: `--help`, `--list-configs`, `--model`, `--manual`, `--profile`, `--json`, and `--quiet` with fallback warning reporting. ### 2. ⏱️ Parallel 5.0ms Lookahead Sidechain FIR Limiting (Phase 2) - Enhanced `bake-graph.py` to generate parallel advance control taps (`baked-lookahead-*.wav`) alongside main audio path FIRs (`baked-*.wav`). - Main Path FIR: Trims pre-delay lead to 5.0 ms. - Lookahead Sidechain FIR: Trims directly to peak index (0.0 ms lead), delivering advance peak warnings to post-convolver limiters (`wlim` / `tlim`) 5.0 ms before physical speaker output with **0.0 ms added listener buffer latency**. ### 3. 🎛️ User EQ Graph Merging & Hardware Interoperability - Fixed `apply.sh` so `jq` always merges `user_eq.json` into both `--bake` (`graph_simple.json`) and un-baked graphs. - Moved `capture.volumes` inside `capture.props` in PipeWire schema for `loudness:volume` control binding. - Hardware media keys (F11/F12 / Touch Bar) smoothly control the DSP Speakers virtual sink. ### 4. 🔄 Zero-Drop Stream Migration & Robust Service Reloads - Added `pactl move-sink-input` iteration upon cold restart (`HOT=0` default). - Active application streams (Firefox/YouTube, Spotify, Chrome) automatically migrate to the new DSP sink without requiring a browser tab reload or app restart. - Added `wp()` helper with 1.5s timeout and `copy_file_safe()` helper for smooth IPC and permission handling. ### 5. 📄 Comprehensive Documentation (`ARCHITECTURE.md`) - Authored `ARCHITECTURE.md` documenting single-pass LTI convolution, Mermaid processing flow diagrams, single-pass FIR baking steps, multi-laptop profile structures, and "Digital Surround" active crossover terminology.
steve added 11 commits 2026-09-01 11:19:21 -04:00
steve added 1 commit 2026-09-01 11:19:29 -04:00
steve added 1 commit 2026-09-01 11:28:01 -04:00
steve added 1 commit 2026-09-01 12:44:28 -04:00
steve added 1 commit 2026-09-01 13:36:32 -04:00
steve added 1 commit 2026-09-01 13:58:01 -04:00
steve added 1 commit 2026-09-01 14:02:29 -04:00
steve added 1 commit 2026-09-01 19:17:46 -04:00
This pull request has changes conflicting with the target branch.
  • graph.json
  • laptop-configs/apple/mbp15_1/graph.json
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin nextgen-engine:nextgen-engine
git checkout nextgen-engine
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: t2linux/mbp15-1-audio-dsp#7