Commit graph

7405 commits

Author SHA1 Message Date
Barnabás Pőcze
010920eb2a Merge branch 'pulse_server_sd_socket_log' into 'master'
Draft: pulse-server: add more logging related to systemd socket activation

See merge request pipewire/pipewire!2103
2026-02-01 17:12:25 +01:00
Wim Taymans
69d8822303 filter-chain: tweak spatializer gain
We're adding two signals together so half the gain to keep it at
the same volume.
2026-01-29 16:52:02 +01:00
Wim Taymans
2aecb49f50 pulse-server: use null to clear the value
The message makes it seem that you can pass 'clear' to clear the setting
but in fact you should pass 'null'.
2026-01-27 10:17:34 +01:00
Arun Raghavan
ed59342d28 pipewire-pulse: Expose bluetooth headset autoswitch config as a message
Makes it easier for libpulse-based clients to modify this setting if
they want.
2026-01-26 14:44:30 -08:00
Arun Raghavan
703380d62d pulse-server: Fix querying after setting of mono mixdown 2026-01-26 14:37:08 -08:00
Wim Taymans
35817c0d85 pw-cat: support some more formats
So that you can give an .oga extension and --format=opus to get an
opus ogg file.
2026-01-22 17:14:41 +01:00
Jonas Ådahl
f2c4452e8d stream: Make capability device IDs an JSON object
Also change the encoding of the byte array to use hexadecimal encoding,
i.e. the byte array [100, 200] in becomes "64c8".
2026-01-22 16:08:19 +00:00
Jonas Ådahl
8600721de0 stream: Change PW_CAPABILITY_DEVICE_ID_NEGOTIATION to a version number
This allows easier evolvement of the negotiation protocol.
2026-01-22 16:08:19 +00:00
Wim Taymans
f978b702b1 pw-cat: also look at simple formats for extension
The simple formats contain some common mappings for other extensions such
as mp3.

Makes pw-record test.mp3 actually write an mp3 instead of a wav file.
2026-01-22 13:08:06 +01:00
Sven Ulland
c634ef9610 pipewiresrc: Fix video crop metadata not being set
Since commit a1f33a99df changed buffer handling to create new GstBuffers
instead of reusing pool buffers, the video crop metadata was silently
lost. The code used gst_buffer_get_video_crop_meta() which returns NULL
on a fresh buffer, so the crop values from PipeWire were never applied.

Change to gst_buffer_add_video_crop_meta() to actually attach the
metadata to the buffer.

Also remove the now-obsolete call in gst_pipewire_pool_wrap_buffer.

This was discovered when using the XDG Desktop Portal's RemoteDesktop
interface: the full desktop was being delivered instead of just the
selected window, because the crop region metadata was not being
propagated to the GStreamer buffer.

Fixes: a1f33a99df ("gst: dequeue a shared buffer instead of original
pool buffer"), from merge request !1258

CC: @jameshilliard
2026-01-21 15:26:57 +00:00
Wim Taymans
56a4ab5234 filter-chain: support no input or output streams
When the graph has no inputs and the channels is set to 0, don't create
a capture stream. Likewise, don't create a playback stream when there
are no graph outputs and the output channels is 0.

You can use this to make a sine source or a null sink.
2026-01-21 16:26:16 +01:00
Wim Taymans
7f2cce1021 filter-graph: add a null plugin
It discards all input.
2026-01-21 16:26:16 +01:00
Wim Taymans
a97c4d10af filter-graph: allow 0 input and output ports
There is no reason to fail when there is no input or output port.
We can simply run the graph with what there is. Even if there is no
input or output at all, running one instance of the plugins is
possible.

Add a busy builtin plugin that has no ports and keeps the CPU IDLE or
busy for the give percent.
2026-01-21 16:26:16 +01:00
Wim Taymans
ba3e564e34 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-01-21 16:26:16 +01:00
Jonas Holmberg
39dd760c60 impl-port: Free capabilities
Free capabilities when destroying port.
2026-01-20 15:21:56 +01:00
Alexander Stephens
c74acf6c25 module-rtp: Fix timestamp integer overflow 2026-01-16 11:06:21 +00:00
Alexander Stephens
dcdc19238b module-rtp: Remove device_delay from timestamp math 2026-01-16 11:06:21 +00:00
Wim Taymans
c28a85ab34 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-15 13:08:24 +01:00
Jonas Ådahl
f055cf398d examples: Make fixate examples support device ID negotation
Things are structured in a way allowing testing falling back to
implicitly assumed device by defining/not defining macros.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
5481a235ed examples: Make fixate examples optionally stream DMA buffers
The video-play-fixate example will downgrade the stream to MemFd one
modifier at a time. Sometimes it's useful to test with not downgrading;
to avoid having to depend on actual DRM devices (real or virtual), fake
them by using memfd and mapping them in the sink.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
fc5b43a0b0 examples: Make fixate examples start inactive
The actual formats are sent just before activating. This is done in
preparation for supporting device ID negotiation.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
58b958860e stream: Add DRM device negotiation
A DMA buffer from a DRM device are typically accessed using API related
to a DRM device, e.g. Vulkan or EGL. To create such a context for using
with a PipeWire stream that passed DRM device DMA buffers applications
have so far usually guessed or made use of the same context as the
stream content will be presented. This has mostly been the Wayland
EGL/Vulkan context, and while this has most of the time worked, it's
somewhat by accident, and for reliable operation, PipeWire must be aware
of what DRM device a DMA buffer should be accessed using.

To address this, introduce device ID negotation, allowing sources and
sinks to negotiate what DRM device is supported, and what formats and
modifiers are supported by them.

This will allow applications to stop relying on luck or the windowing
system to figure out how to access the DMA buffers. It also paves the
way for being able to use multiple GPUs for different video streams,
depending on what the sources and sinks support.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
e615f17573 examples/video-src-fixate: Fake DmaBuf fd with memfd
Otherwise the stream will fail due to not being able to import fd.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
21217a1fad examples/video-play-fixate: Switch to RGBA
The video-src-fixate was previously changed from RGB to RGBA, so to be
able to resolve a format, switch here too.
2026-01-14 08:15:43 +00:00
Jonas Ådahl
97976e4daf examples/video-play-fixate: Split out format param handler 2026-01-14 08:15:43 +00:00
Jonas Ådahl
01627e0367 examples/video-src-fixate: Split out format param handler 2026-01-14 08:15:43 +00:00
Wim Taymans
0869be11f8 avb: fix compilation 2026-01-11 11:27:15 +01:00
hackerman-kl
3597e09600 milan-avb: introducing SET/GET CONTROL, first IDENTIFY 2026-01-11 10:26:10 +00:00
hackerman-kl
8912090c4d milan-avb: add default AVB AECP MTU 2026-01-11 10:26:10 +00:00
hackerman-kl
1da30b545a milan-avb: now get/set may or not have a payload 2026-01-11 10:26:10 +00:00
hackerman-kl
2f3c0bc596 milan-avb: introducing aem control value units header 2026-01-11 10:26:10 +00:00
hackerman-kl
1d485d8bbc milan-avb: get entity-id rom the server, and not from a define 2026-01-11 09:00:36 +01:00
hackerman-kl
2fe254821c module-avb: milan: aecp-aem: introducing GET/SET_SAMPLING_RATE commands 2026-01-09 13:04:19 +00:00
hackerman-kl
f70fc7ea28 milan-avb: using pull and frequency as a union 2026-01-09 13:04:19 +00:00
hackerman-kl
e7f1a8f55d milan-avb: get-set name: removing unused var 2026-01-09 13:03:02 +00:00
hackerman-kl
d3a5b352b2 milan-avb: Make sure to get payload size not the packet size 2026-01-09 09:38:06 +01:00
Timon
aec99d2b6f format: Add support for sample rate of 1.536 Mhz 2026-01-09 01:16:30 +01:00
Wim Taymans
6ed9645465 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-06 17:24:55 +01:00
Torkel Niklasson
bb0efd777f impl-node: Don't suspend when links are busy
When suspend_on_idle is set and we got to idle, there is a chance that
there is work in the work queue that is dependent on formats being set.
In suspend_node, check whether the links have a non-zero busy count before suspending and
return -EBUSY if they do.
2026-01-05 15:36:41 +00:00
Dimitris Papaioannou
1f2a5d99b1 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
2025-12-26 18:53:48 +00:00
Barnabás Pőcze
29bbd79830 gst: deviceprovider: unregister pw_core event hooks
A `pw_core` may be shared between multiple streams, device provider
instances, thus when the reference of the given component to the core
is dropped, the event handlers must be unregistered so as to avoid
use-after-free and similar issues.

Fixes #5030
Fixes: 2bc3e0ca10 ("gst: deviceprodiver: Use GstPipeWireCore and some cleanups")
2025-12-25 14:57:21 +01:00
Wim Taymans
3738c3fc38 tools: only print latency when we print the port
Move the latency print code after where we print the port. That way
we only get the latency when we first print the port.

Avoid -lt from printing latencies for ports without a link.
2025-12-20 18:02:36 +01:00
Robert Rosengren
165bd7b219 pipewiresrc: fix race when node suspended moving from PAUSED to PLAYING
If in PAUSED state, the node can move from idle to suspended resulting
in format cleared and state is no longer negotiated. To avoid returning
not-negotiated error upon basesrc calling create callback, wait for new
format to be provided and negotiated state is back.
2025-12-19 07:15:08 +00:00
Arun Raghavan
385161b12a 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.
2025-12-18 16:35:35 -08:00
Wim Taymans
bb564d5eb6 avb: fix compilation 2025-12-15 09:27:10 +01:00
Janne Grunau
f03021edd1 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
2025-12-15 08:22:07 +00:00
hackerman-kl
6f1938d501 milan-avb: milan: adding set/get clock-source for a clock-domain 2025-12-15 08:18:30 +00:00
hackerman-kl
bb1ef8ea5e module-avb: milan: introducing full entity model for mlian v1.2 2025-12-15 08:17:50 +00:00
hackerman-kl
b22e442b10 module-avb: milan: adding get/set for configuration 2025-12-15 08:17:50 +00:00
Tyler
43bf1b8f7c module-rt: warn if setting niceness fails with rtlimit 2025-12-11 16:38:00 -08:00