Repository navigation
pipewire: each output without a buffer writes into its own scratch - #961
Merged
Merged
Conversation
PipeWire hands no buffer to an output port that nothing is linked to. Every such port was pointed at the same discard buffer, so whatever the tick wrote to one of them landed in all the others. The audio could not be heard, since nothing reads those ports, but the hardware output meters read the tick's outputs after the mix: a signal sent to /out/1 showed on every unlinked channel, and a stereo source on a third one. The scratch now holds one block per output, and a missing output gets its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lc7tYGHRn6TmaxMEfBTswW
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 05:59 — with
GitHub Actions
Error
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lc7tYGHRn6TmaxMEfBTswW
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Failure
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
edumeneses
had a problem deploying
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Failure
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
edumeneses
temporarily deployed
to
Apple Certificate
October 13, 2026 06:00 — with
GitHub Actions
Inactive
jcelerier
marked this pull request as ready for review
October 28, 2026 01:58
Member
|
lgtm, thanks! |
This branch was previously deployed
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.
PipeWire gives no buffer to an output port that nothing is linked to.
fetch_cycle_buffersleaves those outputs null, andassign_chunk_pointerspointed every one of them at the samem_scratch. So whatever the tick wrote to one unlinked output landed in all the others.Nothing reads those ports, so nobody hears it. But the hardware output meters read the tick's outputs after the mix, and they show it. Edu hit this testing the mixer (ossia/score#2302) with score's outputs left unlinked:
/out/1showed on every channel's meter;With 64 outputs and a stereo default sink, channels 3 to 64 all share one buffer in the same way. The per-channel
/out/Ngains of #950 also scaled that shared buffer once per alias.The fix:
m_scratchholds one block per output.assign_chunk_pointerstakes a stride, so the i-th missing output writes atscratch + i * stride.m_silence: the stride defaults to 0.Tests, in score (they live there with the other PipeWire tests). They are in ossia/score#2336, which bumps this:
test_unit_pipewire_quantum: two missing channels get distinct scratch.test_unit_pipewire_protocol_quantum: a private daemon with no sink and three unlinked outputs. Each output must still hold what the tick wrote to it. Without the fix it fails: 18 times, an output held another channel's signal at the end of the tick.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lc7tYGHRn6TmaxMEfBTswW