Skip to content

feat(pipewire): make auto-connect configurable#1208

Merged
roderickvd merged 2 commits into
masterfrom
feat/pipewire-auto-connect
May 18, 2026
Merged

feat(pipewire): make auto-connect configurable#1208
roderickvd merged 2 commits into
masterfrom
feat/pipewire-auto-connect

Conversation

@roderickvd
Copy link
Copy Markdown
Member

JACK has a knob to control auto-connection behavior. Add it to PipeWire too.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a configurable port auto-connection knob to the PipeWire backend, mirroring the JACK backend's set_connect_automatically API. The setting is threaded from the Host through init_devices to each Device via a shared Arc<AtomicBool>, and is read at stream-connect time to toggle the AUTOCONNECT flag on the PipeWire stream. The PR also exports PipeWireHost from src/platform/mod.rs so callers can reach the new API, and minorly cleans up the JACK module doc-comment now that PipeWire offers a similar option.

Changes:

  • New Host::set_connect_automatically on the PipeWire backend, plumbed through init_devicesDeviceConnectParams and used to conditionally set StreamFlags::AUTOCONNECT in both input and output stream connect paths.
  • Re-export crate::host::pipewire::Host as PipeWireHost from src/platform/mod.rs under the appropriate cfg.
  • JACK module documentation tweaks to reflect that PipeWire now has a similar configuration option.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/host/pipewire/mod.rs Adds Arc<AtomicBool> field on Host and the set_connect_automatically setter with docs.
src/host/pipewire/device.rs Stores the shared Arc<AtomicBool> on each Device and forwards its value into ConnectParams.
src/host/pipewire/stream.rs New connect_automatically field on ConnectParams; conditionally sets AUTOCONNECT flag in input/output stream connect paths.
src/platform/mod.rs Re-exports PipeWireHost so the new API is reachable via the platform module.
src/host/jack/mod.rs Minor doc-comment wording adjustments now that PipeWire shares a similar configuration knob.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/host/pipewire/mod.rs Outdated
@roderickvd roderickvd merged commit 986b292 into master May 18, 2026
34 checks passed
@roderickvd roderickvd deleted the feat/pipewire-auto-connect branch May 18, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants