Skip to content

refactor(live-input): drop the PCM-only pipewire mode, keep the bridge sink - #354

Merged
mgth merged 1 commit into
mainfrom
refactor/remove-pcm-live-input-mode
Sep 2, 2026
Merged

refactor(live-input): drop the PCM-only pipewire mode, keep the bridge sink#354
mgth merged 1 commit into
mainfrom
refactor/remove-pcm-live-input-mode

Conversation

@mgth

@mgth mgth commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Stacked on #353 (both touch reconcile_live_input); merge that one first.

Why

The PCM-only pipewire live-input mode published a second sink (omniphony_input_7_1, f32 7.1 at 48 kHz) that only accepted linear PCM. The pipewire_bridge sink has advertised a linear-PCM alternative next to IEC 61937 for a while, so the PCM-only sink no longer has a reason to exist. This keeps pipewire_bridge as the sole PipeWire input; renaming it to plain pipewire is a later step.

Renderer

  • InputMode::Live and InputModeConfig::Live are gone. The names pipewire and live stay as deserialization aliases of pipewire_bridge (serde, the OSC input/mode control, and Studio's normalize_input_mode), so a saved config or an older client selecting the removed mode lands on the bridge sink instead of failing to parse — a config parse failure would silently fall back to Config::default(). Serialization still writes pipewire_bridge.
  • live_input.rs: the PCM capture loop, its config resolver, PipewirePcmInputConfig and the ActiveCaptureConfig enum are removed; the manager works on PipewireBridgeInputConfig directly. The bridge sink's own PCM fallback (process_pcm, DecodedSource::Live) is untouched.
  • sample_format was consumed only by the PCM resolver, so it is removed end to end: InputSampleFormat, the request field and setter, live_input.sample_format in the config, the /omniphony/control/input/live/format OSC control and its format key in /state/input, and the --input-format CLI flag (parsed and never read).
  • IdleFeedInputs::input_self_feeding only ever described the PCM sink; removed with its test.
  • handler.rs drops the (Live, DecodedSource::Live) acceptance arm; session_run.rs no longer computes the self-feeding flag.

Studio

  • The PipeWire option of the input mode selector, the Format select, its listener and Tauri command, and the liveInput.format state are removed. normalize_input_mode maps live/pipewire to pipewire_bridge.
  • Rows that only the PCM mode ever showed (Backend, Layout, Channels, Sample rate, Map, LFE) stay in the DOM but are hidden and disabled with a comment: the renderer still accepts those request fields, and which of them return is for the PipeWire-mode rework to decide. Placeholders and defaults now match the bridge sink (omniphony, 2 ch, 192 kHz).
  • i18n (8 locales): removed input.mode.pipewire, input.format, help.input.format, input.status.live, input.summary.live, input.summary.liveLayout; reworded help.input.mode and input.infoBody. check-i18n reports full parity.

Verification

  • cargo fmt --all --check, cargo check --workspace --all-targets and cargo test --workspace on the renderer; cargo check on src-tauri; node --check on the edited Studio files; npm run i18n:check; npm run lint:dead.
  • Not exercised at runtime: switching a config saved with input_mode: pipewire — it now resolves to the bridge sink named by live_input.node, with the channel count the file requests (8 is accepted by the bridge resolver).

Not in this PR

  • The rename pipewire_bridgepipewire.
  • Map / LFE / layout request fields, which no code path consumes today; they were not specific to the removed mode.
  • mpv's truehd-auto-detect.lua keys on render.input_mode from outside this repo; not checked here.

🤖 Generated with Claude Code

@mgth
mgth force-pushed the refactor/remove-pcm-live-input-mode branch from a5fb6cb to 71162d8 Compare September 2, 2026 19:09
…e sink

The `pipewire` live-input mode published a second sink that only
accepted linear PCM. The `pipewire_bridge` sink negotiates linear PCM
next to IEC 61937, so the PCM-only sink had no reason left to exist.

`InputMode::Live` and its config twin are gone; `pipewire` and `live`
stay as deserialization aliases of `pipewire_bridge` so a saved config
or an older client keeps loading instead of falling back to defaults.
The PCM capture loop, its resolver and the capture-config enum go with
it, as does `sample_format`, which only that resolver ever read: the
request field, the config key, the OSC control and the `--input-format`
flag. The idle feeder's self-feeding flag only described that sink.

Studio loses the `PipeWire` mode option, the Format select and its
command; the rows only the PCM mode showed stay hidden until the
PipeWire-mode rework decides which return. Locales drop the orphaned
keys and reword the mode help.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mgth
mgth force-pushed the refactor/remove-pcm-live-input-mode branch from 71162d8 to 28041fb Compare September 2, 2026 19:22
@mgth
mgth merged commit 74393b1 into main Sep 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant