Commit 1289e086 by PLN (Algolia)

fix(autoroute): never prune SC->hardware links when Ardour is absent

The PRUNE ran unconditionally every 2s. With Ardour closed it deleted
SuperCollider's ONLY output links, and a linkless pipewire-jack client
self-drives its data loop into a 100%-CPU error spin at RT priority.
Hours of that starved the SOF DSP's IPC until the firmware wedged
(IPC timeout -110) and every sink vanished (2026-09-07). 'SC must
never reach hardware' is Ardour-session policy, not idle-laptop policy:
routing and pruning now both require Tidal tracks in the graph.
parent 7a2b2886
......@@ -58,6 +58,16 @@ reconcile() {
# ADD: the control surface feed (no-op until Ardour registers the port)
link "$CTRL_SRC" "$CTRL_IN"
# No Ardour tracks in the graph = not a performance. Route nothing, and
# above all PRUNE nothing: SC's default sink links are then its ONLY
# links, and a linkless pipewire-jack client self-drives its data loop
# into a 100%-CPU error spin at RT priority. Hours of that starved the
# SOF DSP's IPC until the firmware wedged and every sink vanished
# (2026-09-07). "SC must never reach hardware" is Ardour-session policy,
# not idle-laptop policy.
tracks="$(tidal_track_numbers)"
[ -n "$tracks" ] || return 0
# ADD: orbit pair -> matching Tidal track
while read -r nn; do
[ -n "${nn:-}" ] || continue
......@@ -65,9 +75,10 @@ reconcile() {
l=$((2 * k - 1)); r=$((2 * k))
link "$SC:out_$l" "ardour:Tidal $nn/audio_in 1"
link "$SC:out_$r" "ardour:Tidal $nn/audio_in 2"
done < <(tidal_track_numbers)
done <<< "$tracks"
# PRUNE: SuperCollider must never reach hardware playback directly
# PRUNE: while Ardour is up, SuperCollider must never reach hardware
# playback directly — monitoring is via Ardour Master.
while IFS=$'\t' read -r src dst; do
[ -n "${src:-}" ] && [ -n "${dst:-}" ] && pw-link -d "$src" "$dst" 2>/dev/null
done < <(sc_hw_playback_links)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment