Commit graph

15514 commits

Author SHA1 Message Date
Wim Taymans
1272f77eb5 alsa: fix warning
warning: the address of ‘dev_id’ will always evaluate as ‘true’ [-Waddress]
2026-06-06 21:24:47 +02:00
Arun Raghavan
cb327e5762 spa: alsa: Detect ports for HDMI AC3 profiles
Because the a52 plugin (being an ioplug) does not proxy snd_pcm_info for
its slave PCM, we need a different way to figure out the card associated
with the device. It turns out we do have access to the card index
already in the caller, so let's pass that index down as a fallback.

This is done as a fallback rather than replacing the existing lookup in
case there are situations where they might be mismatched. We could
possibly just replace the existing lookup, but the cost seems low enough
to not merit the risk of changing this.
2026-06-05 19:05:47 -07:00
Arun Raghavan
bb634fb0f9 spa: alsa: Use some #defines instead of raw strings
Makes it easier to find instances where these keys are used.
2026-06-05 12:10:08 -07:00
hackerman-kl
a6ad8b3b62 milan-avb: keep the last-known gPTP grandmaster across transient ptp4l management-query timeouts so the ADP does not flap to advertising self-as-GM 2026-06-05 07:31:43 +00:00
hackerman-kl
024f7201cb milan-avb: revert own-LeaveAll registrar aging — it tears down active SRP reservations on a spec-compliant bridge (802.1Q-2018 8.8.7 Dynamic Reservation Entry); talker disconnect-reset to be redone via the listener explicit MSRP Leave on UNBIND 2026-06-05 07:31:43 +00:00
hackerman-kl
95f796f08c milan-avb: age MRP registrations on the node own LeaveAll so a talker resets its STREAM_OUTPUT on ACMP disconnect — fire the shared MSRP/MVRP/MMRP LeaveAll timer periodically (prime + re-arm, RX_LVA no longer resets it) and transition the registrar IN->LV on TX_LVA, so a departed Listener ages LV->MT -> NOTIFY_LEAVE -> listener_observed=false (802.1Q-2018 10.7.5.20) 2026-06-05 07:31:43 +00:00
hackerman-kl
2bcec2f3f0 milan-avb: bit-perfect AAF audio path — avb.sink/avb.source self-driven drivers (drive_timer + trigger_process), 4-quanta ring (no per-quantum overwrite), rate_diff=1.0 coherent talker drive (no pw-cat resample), monotonic PHC-anchored AVTP timestamps, listener sample-lock driven at recovered mc.rate 2026-06-05 07:31:43 +00:00
hackerman-kl
5b8fa0a9b6 milan-avb: UNSUPPORTED_FORMAT per-PDU vs current format from descriptor 2026-06-05 07:31:43 +00:00
hackerman-kl
5fe0a7e575 milan-avb: pace the talker flush timer on the RT data loop 2026-06-05 07:31:43 +00:00
hackerman-kl
895e3a4fa1 milan-avb: ACMP listener self-heal, CBS-exclusive egress, per-iface MVRP, Milan MaxFrameSize + channel-strict RX 2026-06-05 07:31:43 +00:00
hackerman-kl
90114c9839 milan-avb: AAF media-clock recovery estimator + play-loop actuator + io_changed, SET_CLOCK_SOURCE switch, skip CRF audio data plane 2026-06-05 07:31:43 +00:00
hackerman-kl
66959ca678 milan-avb: read gPTP PHC time for talker/listener via NIC PHC mapped onto CLOCK_MONOTONIC_RAW, decoupled from system clock 2026-06-05 07:31:43 +00:00
hackerman-kl
afc7724070 milan-avb: stabilization extras - MRP registrar-before-notify, scoped-fd cleanup, VLAN sub-iface RX, SET_NAME validation, entity/firmware/8ch, MEDIA_UNLOCK 100ms + seq-settle, MRP Leave on teardown, reset STREAM_INPUT counters on bind 2026-06-05 07:31:43 +00:00
hackerman-kl
93e4957959 milan-avb: msrp: scope Domain re-adjust to matching sr_class_id 2026-06-05 07:31:43 +00:00
hackerman-kl
f3071aa549 milan-avb: msrp: set Listener AskingFailed on RX TalkerFailed 2026-06-05 07:31:43 +00:00
hackerman-kl
7c4fc7027b milan-avb: mrp: do not apply RX_LVA to own attributes when transmitting LeaveAll 2026-06-05 07:31:43 +00:00
hackerman-kl
1f969b51a8 milan-avb: stream: stop bumping STREAM_INTERRUPTED on ringbuffer overrun 2026-06-05 07:31:43 +00:00
hackerman-kl
e9e5bb72a6 milan-avb: acmp: preserve talker entity_id across BIND_RX -> CONNECT_TX round-trip 2026-06-05 07:31:43 +00:00
Barnabás Pőcze
ed951081b1 treewide: avoid unitialized spa_dict::flags
In multiple cases the `flags` member of `spa_dict` is left unitialized,
so try to avoid that. For example in `fill_node_info_proplist()` it is
accessed in `spa_dict_lookup_item()`.

This also modifies `collect_props()` to not depend on a partially initialized
`dict` parameter.
2026-06-04 21:35:47 +02:00
Barnabás Pőcze
bb073d8250 pipewire: introspect: copy SPA_DICT_FLAG_SORTED
When making a copy of the dictionary, copy the sorted flag
as well since the order is preserved.
2026-06-04 21:35:45 +02:00
Barnabás Pőcze
797dbd3d40 spa: param: spa_{param_dict,tag}_info_parse(): update size as well
In both functions the loop can break early, meaning that the true number
of valid items is `n`, and that should be reflected in the updated `*dict`.
2026-06-04 21:35:44 +02:00
Wim Taymans
707e5e2643 pulse-server: avoid division by 0 in delay calculation
When we are not yet negotiated and the rate is not yet stored in the
stream sample spec, use a 0 delay instead of dividing by 0.
2026-06-04 21:13:09 +02:00
Wim Taymans
d05905f871 alsa: avoid rounding down period_size
Only try to round down the period_size to the lowest power of 2 when we
are resampling and scaling the period_size to match.

In all other cases, we should honour the requested quantum duration.

Fixes #5302
2026-06-04 16:54:37 +02:00
Arun Raghavan
cecdbc034f spa: aec: Fix a spurious warning while parsing args 2026-06-03 09:39:32 -07:00
Wim Taymans
a5c7dd3127 avb: fix compilation
This thing was broken.. mismatched brackets and const missing.
2026-06-03 12:43:15 +02:00
Wang Yu
8c8bd150ad sendspin: reject unsupported receive codecs
Commit b1b565339 ("sendspin: negotiate the first raw format") says that
FLAC and Opus are not supported yet. The receiver also only advertises
PCM formats in its player support.

Reject non-PCM stream/start codecs in the receiver. Otherwise
parse_player() accepts FLAC or Opus without setting client->stride,
while the receive path later uses client->stride as a raw frame size.

Signed-off-by: Wang Yu <wangyu@uniontech.com>
2026-06-03 10:38:50 +00:00
sirmbcode
1a1cd8d743 added zero padding and utf8-validation to entity parser for first test 2026-06-03 10:37:53 +00:00
sirmbcode
925cea5822 fixed spacing issues 2026-06-03 10:37:53 +00:00
sirmbcode
4cacdfcdf9 added calls to entity-parser.h for entity struct 2026-06-03 10:37:53 +00:00
sirmbcode
55172b92f9 added entity fields to avb conf 2026-06-03 10:37:53 +00:00
sirmbcode
8efbdcc022 added entity-parser.h 2026-06-03 10:37:53 +00:00
Wim Taymans
350eb9a041 midi: don't write trailing continuation 0xf0 for SysEx
Because our midi messages already have a size, we don't need the 0xf0
continuation terminator. Also having the terminator optionally requires
you to check and strip it if it's there.

The easiest algorithm is to check the first byte for start (0xf0) or
continuation (0xf7) and the last byte for end (0xf7) and that should be
enough to process the messages without having to ever stip the last
byte.
2026-06-01 13:08:11 +02:00
Wim Taymans
b41d117609 impl-port: make suspend go from INIT -> CONFIGURE
Bring the port to INIT before going to CONFIGURE when we do the suspend
logic.

This is to ensure that there always is a state change to emit the state
change notification. This was, the link can detect the suspend case and
cancel any pending results.

One of the problem with suspend is that the state changes on the ports
are done from different places; the port and link. This causes issues
like:

1. do_negotiate calls pw_port_set_param(Format,..) with the negotiated
   format. This returns async and the link queues a complete_ready
   callback.
2. The node is suspended, pw_impl_port_set_param(Format, NULL) is called
   to clear the port format. This bypasses the link.
3. The reply from step 2 arrives and triggers complete_ready, this
   brings the port state to READY and the link state to ALLOCATING.
4. The link continues allocating and sets buffers on the port. This then
   fails because the last format set was NULL.

Ideally all port states should be managed in one place and the async
port state changes should be kept in the port itself as well but this
will need some more work.

Fixes #3547
2026-06-01 10:34:40 +02:00
Wim Taymans
f22932580f impl-port: add port_suspend()
Move the logic to suspend a port to the port implementation. No
functional change with this.
2026-06-01 10:21:42 +02:00
Wim Taymans
54199d77c6 conf: disable portal.rt for pipewire and pipewire-pulse
Thse should not be portal clients and can go directly to rtkit.

The reason is that there is a locking problem in the portal rt
implementation that cause timeouts for some reason.
2026-06-01 10:00:47 +02:00
hackerman-kl
98ab3d73d4 milan-avb: es-builder: create and flag CRF input streams (fix NULL-server crash on activate) 2026-05-31 18:54:05 +02:00
hackerman-kl
9d08cb87c6 milan-avb: stream: do not wire CRF streams into the PipeWire audio graph 2026-05-31 18:54:05 +02:00
hackerman-kl
fc6245dca3 milan-avb: stream: flag CRF streams and ignore CRF packets by subtype in RX 2026-05-31 18:54:05 +02:00
Arun Raghavan
aef3d02173 module-rt: Use a sane timeout for DBus messages
The default of 30s (* 3 for the 3 lookups), makes the mainloop block for
a very long time if anything is wrong with RTKit.
2026-05-31 15:42:41 +02:00
Wim Taymans
7303a55b50 treewide: replace EBADFD with posix EBADF
EBADF was used in some places already, some other places used EBADFD
(with and without an #ifdef). EBADFD is linux specific.
2026-05-27 13:36:39 +02:00
Siva Mahadevan
db8bb8d489 pipewire: use EBADF in pw_load_spa_handle
This is defined in POSIX and is more portable
than the linux-specific EBADFD.
2026-05-26 12:07:33 -04:00
Wim Taymans
c6bcbab483 test: add tests for pw_conf_match_rules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-26 17:44:16 +02:00
Wim Taymans
f195140702 conf: recurse into arrays before matching
When the value looks like an array, recurse into it and do the matching
on the array items instead of the whole value.
2026-05-26 17:08:35 +02:00
Wim Taymans
784a9dd00f pulse: do all delay calculations when we need it
Just store the values for calculating the delay in the hot path. Then
compute the delay only when we need it.
2026-05-26 14:50:47 +02:00
Wim Taymans
3a9dbc6d99 pulse: add some SPA_LIKELY 2026-05-26 14:50:15 +02:00
Wim Taymans
753ed37ec5 pulse: inline the message check
Inline the resize check and then call the resize function when
necessary.
2026-05-26 14:48:47 +02:00
lumingzh
7ce0b0f339 update zh_CN.po 2026-05-26 09:36:49 +08:00
Torkel Niklasson
1066ec98a8 protocol-native: expose client supplementary GIDs
Retrieve the connecting client's supplementary group list via
SO_PEERGROUPS and store it as the "pipewire.sec.gids" property.
This allows access-control policies in wireplumber to match on
all groups and not just the primary.
2026-05-25 17:08:34 +00:00
Wim Taymans
4bde2415f9 scheduler: make active nodes go to IDLE
When a node is configured and supposed to be IDLE, set it to the IDLE
state, it does not matter if it is active or not.
2026-05-25 18:40:52 +02:00
Wim Taymans
63d824d35e scheduler: don't use & when && is wanted 2026-05-25 18:35:11 +02:00