Commit graph

13659 commits

Author SHA1 Message Date
Wim Taymans
255541eac3 1.4.11 2026-03-19 09:52:17 +01:00
Wim Taymans
2895bd59fe json: a container start also ends a bare string
This stops the parser from seeing foo{bar as a single string.

This also makes a valid test work, add another small test.
2026-03-19 09:43:31 +01:00
Wim Taymans
b08cfcb883 client-node: avoid using invalid fd or mem in clear_data
Don't close an -1 fd in clear_data.

If we let the client allocate buffer, set our fd and data to invalid
values. If the client decides to renegotiate before we get the buffer
data we might otherwise try to clear the mem_id (default 0) or
close the fd (also default 0).

Fixes #5162
2026-03-19 09:31:10 +01:00
Wim Taymans
dd01005db6 doc: add 1.6 link 2026-03-13 13:26:35 +01:00
Nedko Arnaudov
fd514ed2e0 pipewire-jack: emit foreign port registration callbacks on jack_activate
The jack_activate loop was only queuing NOTIFY_TYPE_PORTREGISTRATION
for the activating client's own ports. Ports belonging to other clients
— including all WirePlumber-managed ports and MIDI ports — were silently
skipped due to the o->port.port->client != c condition.

This caused two observable bugs for clients using libjackserver (e.g.
jackdbus):
- JackPortRegistrationCallback was not fired for any pre-existing
  foreign ports at activate time, leaving the patchbay empty unless
  the session manager happened to start after the client.
- JACK MIDI ports were never announced via callback, even though they
  are correctly returned by jack_get_ports().

The graph_order_callback fallback (used by jackdbus for initial port
enumeration) is also ineffective here because pipewire-jack only fires
it on connection events, not on activate.

Fix by iterating all non-removed foreign ports in the object list and
queuing registration callbacks for those whose node is active, matching
the semantics already implemented in node_info() for ports of nodes
that transition to running state after activate.

The change is libjackserver.so only. libjack.so behaviour is left
unmodifed, as carla is showing ports of each client twice.
2026-03-13 09:22:12 +01:00
Wim Taymans
8a992a6508 Revert "pipewire-jack: emit foreign port registration callbacks on jack_activate"
This reverts commit 257fbf379d.
2026-03-12 15:01:47 +01:00
Nedko Arnaudov
d24e120c18 pipewire-jack: fix jack_port_type_id() to return jack1/jack2 compatible values
pipewire-jack defines TYPE_ID_VIDEO=1 between audio and MIDI, shifting
TYPE_ID_MIDI to 2. This caused jack_port_type_id() to return 2 for MIDI
ports, breaking compatibility with jack1/jack2 which return 1.

The jack_port_type_id() return value is part of the public JACK API and
consumers such as jackdbus rely on the conventional values established
by jack1/jack2: 0 for audio, 1 for MIDI.

Map internal TYPE_ID_* values to their jack1/jack2 compatible equivalents
before returning. All MIDI variants (MIDI, OSC, UMP) map to 1. Video has
no jack1/jack2 equivalent so maps to 3, beyond the conventional range.
2026-03-12 10:08:09 +01:00
Nedko Arnaudov
257fbf379d pipewire-jack: emit foreign port registration callbacks on jack_activate
The jack_activate loop was only queuing NOTIFY_TYPE_PORTREGISTRATION
for the activating client's own ports. Ports belonging to other clients
— including all WirePlumber-managed ports and MIDI ports — were silently
skipped due to the o->port.port->client != c condition.

This caused two observable bugs for clients using libjackserver (e.g.
jackdbus):
- JackPortRegistrationCallback was not fired for any pre-existing
  foreign ports at activate time, leaving the patchbay empty unless
  the session manager happened to start after the client.
- JACK MIDI ports were never announced via callback, even though they
  are correctly returned by jack_get_ports().

The graph_order_callback fallback (used by jackdbus for initial port
enumeration) is also ineffective here because pipewire-jack only fires
it on connection events, not on activate.

Fix by iterating all non-removed foreign ports in the object list and
queuing registration callbacks for those whose node is active, matching
the semantics already implemented in node_info() for ports of nodes
that transition to running state after activate.
2026-03-12 10:08:03 +01:00
Barnabás Pőcze
7154e91095 spa: libcamera: source: SPA_PARAM_Props is write-only
There are no readable `SPA_PARAM_Props` on the node, so mark it write-only.

(cherry picked from commit 810617997b)
2026-03-10 23:52:25 +01:00
Wim Taymans
1a532baa66 jack: never return NULL from jack_port_by_id()
JACK will never return NULL from jack_port_by_id() because the id
and the port_t are the same for JACK.

In PipeWire however we use the serial number as the id and so it can
be removed and become invalid. In this case, return a dummy port
from the client that can be used for some of the basic operations
you can do on a port_t, like get the name etc.

Also make sure that port_name() doesn't return NULL in case we use the
dummy port (which has the client set to NULL).

Fixes #3512
2026-03-03 10:07:31 +01:00
Damien Espitallier
16330d6982 alsa-udev: Allow ACTION_REMOVE on ignored cards
Move the card->ignored check to only apply to ACTION_CHANGE, not ACTION_REMOVE. This ensures that ignored cards can still be properly removed when they are unplugged.
2026-03-03 10:04:43 +01:00
Wim Taymans
50905a2d18 snapcast: support IPv4 link-local addresses 2026-03-03 10:04:26 +01:00
Wim Taymans
8f544782d2 RAOP: also support link-local addresses for IPv4
Patch by Lairton Lelis da Fonseca Junior (@lairton)

Remove the hard skip for IPv4 link-local addresses and add an interface
binding (matching the existing IPv6 link-local behavior).

The host needs a link-local address on the interface (ip addr add
169.254.x.x/16 dev wlan0 or via NetworkManager +ipv4.addresses).

Fixes #4830
2026-03-03 10:04:19 +01:00
Wim Taymans
3dfbc6b61c modules: add PRIORITY_SESSION
For driver nodes, priority.session is needed to be able to change the
default device.

Fixes #5125
2026-03-03 10:03:50 +01:00
Yedaya Katsman
da2dbb9816 pw-mon: Fix help message for --hide-params 2026-03-03 10:03:20 +01:00
Wim Taymans
c9b97f0c38 filter-graph: notify about default numner of in/out
The filter graph has, after parsing, a default number of input and
output ports. This is based on the description or the first/last element
input and output ports. Pass this information in the properties when
we emit the info.

Don't use the number of configured input/output ports as the default
number of channels in filter-chain because this is only determined after
activating the graph. Instead, use the default input/output channels.

The result is that when you load filter-chain without any channel
layout, it will default to the number of input/outputs of the graph
instead of 0. This allows for the node to be visible in the pulseaudio
API.

Fixes #5084
2026-02-17 15:10:44 -08:00
Martin Geier
9c310cf54c filter-graph: clear external field in unsetup_graph
Without this change the playback with different number of channels
fails with `input port %s[%d]:%s already used as input %d, use mixer`
on the first port.

Signed-off-by: Martin Geier <martin.geier@streamunlimited.com>

Fixes #4866
2026-02-17 15:10:44 -08:00
Wim Taymans
37be6f8b7b audioconvert: refactor some code
We sync the filter graph in two places, make a function so that both
places do the same thing.

Make node_reset clear the setup flag so that we don't have to do that
twice.
2026-02-17 15:09:55 -08:00
Torkel Niklasson
2bf5cd9b56 audioconvert: Sync filter graphs in setup_convert
If the the audioconvert.filter-chain.N property is set early, they will
be added to the active_graphs list but with setup = false. When the node
starts, setup_convert is called, but the graphs aren't added to
filter_graphs. Run the do_sync_filter_graph at the end of setup_convert
to add them.
2026-02-17 15:09:55 -08:00
Torkel Niklasson
43ddc2967b audioconvert: Set this->setup to false on flush command
If flush is called, the active graphs are deactivated but this->setup
remains true.
2026-02-17 15:09:55 -08:00
Timon
747816a134 Fix disabling of filter chains 2026-02-17 15:09:55 -08:00
Arun Raghavan
f708c24897 pulse-server: Fix querying after setting of mono mixdown 2026-01-26 14:49:16 -08:00
Wim Taymans
ced36a5315 1.4.10 2026-01-16 12:19:56 +01:00
Wim Taymans
afdb3beff8 spa: make it possible to change SPA_AUDIO_MAX_CHANNELS
Only define the symbol if not already defined.

Avoids a warning becauswe wireplumber now recompiles with a custom
MAX_CHANNELS.
2026-01-16 11:06:58 +01:00
Wim Taymans
fc171c8f35 channelmix: add some more channelmix positions
Implement downmix of some top and rear channels as well.
2026-01-16 11:06:58 +01:00
Wim Taymans
4448302f65 zeroconf: use name+mode to detect duplicates
So that there can be a sink and source tunnel even when the name is the
same.

Based on patch by @kajusnau

Fixes #5079
2026-01-16 11:06:58 +01:00
Wim Taymans
429505e91c resample: limit the amount of phases
If we have in and out rates with a very small GCD, we might end up with
a lot of phases. Limit the number of phases to 1024 and switch to
interpolating mode. 1024 phases is enough to accurately interpolate
from.

Together with the MAX_TAPS limit we will never create a filter
size that overflows 32 bits.

Fixes #5073
2026-01-16 11:06:47 +01:00
Wim Taymans
8eb60b132c spa: use the right AVX2 flags
Our AVX optimizations are really AVX2 so rename the files and functions
and use the right HAVE_AVX2 and cpu flags to compile and select the
right functions.

Fixes #5072
2026-01-16 10:21:58 +01:00
Wim Taymans
5871f88b81 profiler: keep per node last_profile_time
So that multiple drivers can get updated per interval when
profile.interval.ms is used.

Fixes #5061
2026-01-12 09:36:26 +01:00
Wim Taymans
d25b88925a support: return NULL instead of FALSE 2026-01-12 09:35:51 +01:00
Wim Taymans
c99d38443e dbus: handle errors better
Make sure we don't crash when running out of fds and the loop functions
start to return NULL sources.
2026-01-12 09:35:44 +01:00
Dimitris Papaioannou
1d166f8bb2 module-eq: Unload filter-chain on destruction
Make the parametric-equalizer module destroy the underlying filter-chain
module on destruction. This makes the EQ nodes get destroyed on unload.
Fixes #5045
2026-01-12 09:35:17 +01:00
Arun Raghavan
7a853f887c pulse-server: Add a message to enable/disable mono mixdown
WirePlumber recently added a mechanism to force mono mixdown on audio
outputs, which is a useful feature for accessibility. Let's also expose
that setting via libpulse for existing audio settings UIs to be able to
use.
2026-01-05 11:54:37 -08:00
Wim Taymans
8c9c378e9f audioconvert: handle filter-graph setup better
Force filter graph reconfiguration in setup_convert.

When adding/removing filter-graphs, only perform setup when we were
already setup, otherwise we will do this in setup_convert later.

Don't do channelmix_init when we were not setup.

Deactivate the filter-graphs when we suspend.

Fixes #4866
2025-12-16 20:36:05 -08:00
Wim Taymans
cb6e61af49 audioconvert: do params after init of the node
First do the essential properties to set up the node, then set up the
node and then parse the params. The params might do some setup that
relies on a completely configured node, such as emit events.
2025-12-16 20:36:05 -08:00
Wim Taymans
3d4bef6e31 filter-graph: remove a memcpy and some cleanups
We don't need to memcpy if we swap between 2 buffers for overlap.

Remove a duplicate variable.
2025-12-16 20:36:05 -08:00
Wim Taymans
84659234bf filter-graph: remove port check
Remove the port number check, we never call this with an invalid port
number and the check was wrong for the sofa_plugin.

Fixes #4700
2025-12-16 20:36:05 -08:00
Wim Taymans
b308c2a914 filter-graph: fix port find logic
We need both ports to be NULL (failed to find the ports as audio ports)
when we try to link control/notify ports.
2025-12-16 20:36:05 -08:00
Wim Taymans
5f07d7a2a6 filter-graph: ensure we can call setup_graph multiple times
We need to reset the fields used for sorting so that we can run the
setup_graph code multiple times.
2025-12-16 20:36:05 -08:00
Wim Taymans
b90dd20dc5 audioconvert: improve tmp buffer allocation
Use per port allocated memory so that we can easily increase the size
and add more buffers. This is necessary when we add filter-graphs that
require more ports.
2025-12-16 20:36:05 -08:00
Wim Taymans
5af9020ff3 filter-graph: clean control_port array on unload
Because we created it when we loaded the graph.
2025-12-16 20:36:05 -08:00
Wim Taymans
39e0ca2f46 filter-graph: process controls after loading the graph
Do some of the counting of the nodes and controls when we add a node
to make things easier later.

Do the setup of the graph controls after loading the graph because we
know exactly how many controls we will have.

Fixes controls being unavailable until the filter-graph is activated.
2025-12-16 20:36:05 -08:00
Janne Grunau
be1677f569 stream: Fix pw_time.delay calculation for rate.num > 1
Pipewire uses a rate of 256/7680 with the integrated camera of Apple
silicon Macbooks. To calculate pw_time.delay correctly in this case it
has to be divided by time->rate.num. Without this division the delay
contribution of the `((latency->min_ns + latency->max_ns) / 2)` term
ends up as 255 which are 8.5 seconds.
pipewiresrc reports the delay as latency in the gstreamer pipeline which
results in rendering a frame every 8.5 seconds.
I suspect the non-normalized rate of 256/7680 is another bug in
pipewire. The rate for an UVC webcam is reported as 1/30. Both
Video4Linux2 devices report a discrete frame interval of 0.033s (30fps).

Fixes #4957

(cherry picked from commit f03021edd1)
2025-12-15 09:54:16 +01:00
Wim Taymans
43b6a83518 audioconvert: rework the filter-graphs a little
Use a simple free/active linked list for the filter-graphs and insert
the new filters in the right position in the list. Then simply copy the
list to an array for the processing thread.

when reconfiguring, set up all the filters again because the number of
channels might have changed.
2025-12-13 01:25:03 +00:00
Wim Taymans
ce3ff1b54a filter-graph: add support for channel positions
Make it possible to define a channel position in filter-graph.
Use the channel positions to perform the final channelmix.
2025-12-13 01:25:03 +00:00
Wim Taymans
666f6d7d31 filter-graph: make the filter-graph ports dynamic
When parsing the graph, parse the input and output port names into
a separate string array. This was we can keep them around when
setting up the graph.

Instead of setting up the graph right after loading it, do the graph
setup when we activate the graph. This makes it possible to pass the
input channels to the filter-graph and let it create the right amount of
plugins and ouput channels.

When setting up the graphs in the audioconverter, pass the current
number of channels as the input to the graph and keep track of the
channels that each filter produces.

This way we can also load a custom upmix or downmix graph, for example.
2025-12-13 01:25:03 +00:00
Wim Taymans
b46a2b3d95 audioconvert: emit Props changed in all cases
When we apply_props and they changed, mark the Props change event so
that it gets emitted later.

Fixes #4610
2025-11-21 13:23:34 +01:00
Wim Taymans
31d7a88f41 spa: add check for AUX channels 2025-11-21 13:06:09 +01:00
Robert Mader
68a57c58bf gst: Use gst_util_uint64_scale instead of scale_int
GST_SECOND * t.rate.num can turn into a negative gint, resulting in
assertions like:
_gst_util_uint64_scale_int: assertion 'num >= 0' failed

Just use the 64bit version instead.

(cherry picked from commit 77a5100280)
2025-10-30 18:05:48 +01:00
Pauli Virtanen
8c5dd0c9f7 doc: update doxygen-awesome.css
Update doxygen-awesome.css to v2.4.1 (1f3620084ff7573) from upstream.

Link: https://github.com/jothepro/doxygen-awesome-css/
2025-10-16 00:17:26 +03:00