Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sound/pipewire: destroy multiple pipewire streams that are not destroyed #644

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

dorindabassey
Copy link
Contributor

Summary of the PR

The PCM command transition prepare->prepare or set_param->prepare is allowed by the specification. however this type of transition in pipewire lead to multiple creation of pipewire streams that are not destroyed. This PR ensures that in a case like this, when the prepare fn() in the pipewire backend is called multiple times without the release fn(), there should be only one pipewire stream.

Close #490

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

@MatiasVara
Copy link
Contributor

LGTM. I also wonder if panicking is the correct behavior when it is not possible to disconnect.

@dorindabassey dorindabassey force-pushed the fixstream branch 2 times, most recently from ee9ddde to 1809dae Compare April 2, 2024 15:07
vhost-device-sound/src/lib.rs Outdated Show resolved Hide resolved
@dorindabassey dorindabassey force-pushed the fixstream branch 2 times, most recently from a760bfd to f049401 Compare April 4, 2024 10:34
epilys
epilys previously approved these changes Apr 5, 2024
The PCM command transition prepare->prepare or set_param->prepare
is allowed by the specification. Pipewire, however, creates multiple
streams which are not destroyed when this type of transition happens.
By using this PR, we can ensure that when the prepare function in the
pipewire backend is called multiple times without the release function,
only one pipewire stream is created.

Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
@stefano-garzarella stefano-garzarella merged commit 6581834 into rust-vmm:main Apr 8, 2024
2 checks passed
@dorindabassey dorindabassey deleted the fixstream branch November 21, 2024 11:03
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.

[sound] creation of multiple streams that are not destroyed
5 participants