PipeWire: fix stopped stream ejection#115
Merged
SolarLiner merged 3 commits intoSolarLiner:mainfrom Feb 9, 2026
Merged
Conversation
SolarLiner
requested changes
Nov 14, 2025
1bfd825 to
1359359
Compare
Contributor
Author
|
I just learned about this pipewire property:
So in theory setting this property could fix the issue without the complexity of this PR (but with some side-effects). I'll give it a try. |
Contributor
|
@strohel Were you able to try |
Contributor
Author
I haven't tried yet, will do once I find time. I think it will also break our "callback not called" detection, but that's not something the upstream should be concerned about. |
Owner
|
@strohel please rebase onto, or merge main, to update your branch, and I'll merge after CI passes 👍🏻 |
SolarLiner
approved these changes
Feb 9, 2026
..instead of sending it through a command channel. I haven't found the reason to do this the more complicated way..?
Attempt to fix SolarLiner#105 v2: don't use a `Mutex`, do some Arc/Weak/Drop/channel/unsave tricks instead.
1359359 to
2f7bd85
Compare
Contributor
Author
|
Rebased, the eject_stream_pipewire.rs example still executes correctly as a sanity check. |
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.
Description
Fixes #105, at least for me.
To be reviewed by commits:
eject_stream_pipewire.rs, which hangs at this pointpw-linkcommandStreamCommands in theprocess()callback (which runs in the RT thread), we now handle them in the PipeWire main loop. This also prompted a transition fromrtrbtopipewire::channel; this makes their handling independentMutexis introduced in the audio callback but we never wait on it in the audio process() callback. I tried hard to avoid it, but I believe it is necessary (short of unsafe code), as we need&mutaccess to theOption<Callback>in two separate threads.Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
eject_stream_pipewire.rsexample.Checklist:
I have made corresponding changes to the documentationCC @mbernat. Supersedes tonarino#5.