feat(pipewire): make auto-connect configurable#1208
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_automaticallyon the PipeWire backend, plumbed throughinit_devices→Device→ConnectParamsand used to conditionally setStreamFlags::AUTOCONNECTin both input and output stream connect paths. - Re-export
crate::host::pipewire::Host as PipeWireHostfromsrc/platform/mod.rsunder 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JACK has a knob to control auto-connection behavior. Add it to PipeWire too.