Commit graph

14680 commits

Author SHA1 Message Date
Ripley Tom
ff04b47942 meson.build: Add -Werror=discarded-qualifiers 2026-02-22 15:59:56 +00:00
Ripley Tom
c847b81629 spa/plugins/alsa/acp/compat.h: Fix missed -Wdiscarded-qualifiers warning 2026-02-22 15:59:56 +00:00
Ripley Tom
367ce4626c
src/modules/module-rtp-source.c: Fix alignment requirement for 32 bit build 2026-02-21 20:55:17 +01:00
Wim Taymans
846096d435 scheduler: prepare link before usage
A link might become unprepared because a node suspended. When we want
to make the nodes runnable, make sure the link is prepared again.
2026-02-21 17:25:54 +01:00
Wim Taymans
476220c18b scheduler: don't take active state into account for grouping
The grouping of the node does not depend on the active state.
2026-02-21 16:33:21 +01:00
Wim Taymans
973f48dde7 scheduler: make always_process nodes runnable
Don't just set the flag but call make_runnable for always_process node
so that the peers also get activated.
2026-02-21 16:32:30 +01:00
Wim Taymans
9e82e49446 scheduler: rework the runnable state calculation
Move the runnable state calculation out of the collect_nodes function.
They are really two different steps that doin't overlap much.

The runnable state of a node is very easy to calculate. A node is
runnable if it is linked to another node without a passive port. When we
find two runnable nodes, make them runnable, which makes all nodes
linked to them runnable, stopping at passive ports.

We don't have to check the active state of the nodes or links to group
them together. This ensures we don't swap nodes around too much when the
node or link state changes.
2026-02-21 16:19:34 +01:00
Wim Taymans
ce18660127 tests: fix test 2026-02-20 10:35:31 +01:00
Wim Taymans
8f3d8d77ab impl-link: prepare a link right after creating it
There is no reason to delay preparing the link (by the scheduler) when
both nodes are active, we can do that right from the start.

This makes things a bit more symetrical because deactivating a node does
not unprepare a link.

This however changes things a bit because you can no longer delay link
prepare until you activate the node. I don't know if this is actually in
use and it would probably be to delay format negotiation. The right way
do delay format negotiation is to wait until an EnumFormat is set but
that is something to improve later.
2026-02-20 10:35:31 +01:00
Arun Raghavan
5bd93b97ad Revert "spa: json: Add a helper method to shrink an object string"
Drop this until we have better API for building/visiting JSON.

This reverts commit c244fbf945.
2026-02-19 20:02:51 +00:00
Barnabás Pőcze
e46bfe67b6 treewide: fix some -Wdiscarded-qualifiers
Newer glibc versions have made certain `str*()` functions into macros
that ensure that the const-ness of the argument is propagated to the
return type.
2026-02-19 21:00:10 +01:00
Barnabás Pőcze
d7c3e8c2bc pipewire: module-roc-{sink,source}: fix log format string issues
Passing an unknown string as the format string is unsafe, so don't do it.

Fixes: b9922d8ed5 ("module-roc: forward roc-toolkit logs to pipewire logs")
2026-02-19 19:37:15 +00:00
Barnabás Pőcze
d8b06f94ee pipewire: module-roc-{sink,source}: remove logging related unused code
!2699 has been merged a bit prematurely and it contained things that are
not used. So remove the unused member variables, functions, fix module
usage strings, and move some functions from headers.
2026-02-19 19:37:15 +00:00
Arun Raghavan
d4329600d1 audioconvert: Report loaded filter graphs in props
Makes it easier to know what filters have been loaded.
2026-02-19 19:29:40 +00:00
Arun Raghavan
c244fbf945 spa: json: Add a helper method to shrink an object string 2026-02-19 19:29:40 +00:00
Arun Raghavan
f5107f3e83 ci: Fix doccheck error message 2026-02-19 11:04:23 -08:00
Arun Raghavan
569c2dce55 doc: Add module scheduler subpage 2026-02-19 11:04:23 -08:00
Arun Raghavan
987579b7b7 tests: Update context events test
New field and version, update the test.
2026-02-19 10:45:45 -08:00
Wim Taymans
2fb38af3e0 modules: move the scheduler to a module
Mostly because we can but also because there are more ways of doing
the scheduling and this opens the door for some experimentation.
2026-02-19 17:44:27 +01:00
Wim Taymans
7887c365d1 filter-graph: Make a new control_sync function
This function is run for all the nodes with the data loop locked. It can
be used to atomically update multiple node controls.

We can't use the control_changed function because this one runs without
the lock and might do slow things, like what the sofa plugin currently
does.

See #5019
2026-02-19 13:15:40 +01:00
Wim Taymans
e7ca02c4d8 filter-graph: sync control updates with data thread.
don't read the control ports from the processing thread and check for
updates. Use the control_changed signal to check and update the
parameters of the biquad atimically.

See #5019
2026-02-19 13:15:39 +01:00
Wim Taymans
be0e037809 pulse-server: avoid doing allocations and string copies
We can just concatenate the stream and client dict on the stack, reusing
all the strings without having to do allocations or copies.

Also filter out the object.id and object.serial from the client, we want
to keep the ones from the streams.
2026-02-19 13:03:50 +01:00
Wim Taymans
6eb4483069 pulse-server: add client props to sink_input/source_output
Instead of adding the client props to the stream props when we create
it, add them when we enumerate the streams.

This makes it possible to also have the client props in the stream props
for streams that are not created with the pulse API.

Fixes #5090
2026-02-19 12:08:23 +01:00
Wim Taymans
b8b2c58cda Development continues as 1.7.0 2026-02-19 11:09:50 +01:00
Wim Taymans
700cea78db 1.6.0 2026-02-19 09:59:34 +01:00
Misha Baranov
b9922d8ed5 module-roc: forward roc-toolkit logs to pipewire logs
Roc-toolkit log records are captured via a callback and
written to PipeWire log with corresponding verbosity level.
The log.level config parameter limits record verbosity at
the roc-toolkit level.
2026-02-19 08:42:29 +00:00
Damien Espitallier
88cbe24201 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-02-17 19:19:52 +01:00
Wim Taymans
7956d7ceaf snapcast: support IPv4 link-local addresses 2026-02-17 13:08:56 +01:00
Wim Taymans
0e80287625 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-02-17 13:02:03 +01:00
Wim Taymans
ab70dae0a8 modules: add PRIORITY_SESSION
For driver nodes, priority.session is needed to be able to change the
default device.

Fixes #5125
2026-02-16 10:38:05 +01:00
filmsi
de778e6235 Replace sl.po 2026-02-16 09:01:57 +00:00
Yedaya Katsman
fc723d7b15 pw-mon: Fix help message for --hide-params 2026-02-15 10:18:34 +00:00
Pauli Virtanen
7dd2c60b12 bluez5: synchronize transport state after acquire of an acquired transport
With keepalive enabled, we need to emit state change event on acquire
similarly as we do if refcount was already positive.

Co-authored-by: Martin Geier <martin.geier@streamunlimited.com>
2026-02-14 12:03:07 +02:00
Alexander Sarmanow
63129dd3dc fixup 2026-02-13 17:16:18 +00:00
Alexander Sarmanow
5c9b3ee05a bluez5: bap: use BD address for per-adapter BIG config
HCI indexed names are not stable. The adapters BD address is here a
better approach to map the configuration.
2026-02-13 17:16:18 +00:00
Alexander Sarmanow
5f12dd99a3 bluez5: add adapter reference to remote_endpoint
This should make adapter members easier accessible via remote endpoints.
2026-02-13 17:16:18 +00:00
lumingzh
b0b6f6ca37 update Chinese translation 2026-02-13 09:40:40 +08:00
Jonas Holmberg
ca4fa88598 context: set time in position for drivers
Set time in position for drivers to make sure an old time isn't copied
by followers before the driver is started.
2026-02-12 17:15:33 +01:00
Wim Taymans
7f08c0d404 doc: fix a typo 2026-02-12 13:46:04 +01:00
Wim Taymans
11d5e071ec stream: return -EIO when doing get_time in != STREAMING
The stream should be streaming before the get_time call is meaningful.

Various places in the code already check this an fall back to a default
value, we just need to return an error here.
2026-02-12 12:26:33 +01:00
Pauli Virtanen
12fb9ab831 bluez5: use correct A2DP profile in codec switch
We can only switch within currently connected A2DP profiles, as
generally remote endpoints are available only for the connected ones.
2026-02-11 18:53:32 +02:00
Wim Taymans
47de1e15a4 channelmix: handle more than 64 channels
When setting up the mix matrix, don't just iterate over the first 64
(CHANNEL_BITS) positions because then we will never be able to configure
more than 64 channels in the matrix.

Instead iterate until we have filled all src and dst entries in the
matrix. For the first 64 positions we might need to check the channel
mask to get the right positions in our source matrix.

Fixes the channel mixer for >64 channels where the positions above 64
where 0 in the matrix and muted.

Fixes #5118
2026-02-10 13:34:44 +01:00
Wim Taymans
494d727108 channelmix: improve debug
Instead of printing lines and lines of numbers, format everything as
a matrix. Only do the work when debug is enabled.
2026-02-10 13:18:01 +01:00
Wim Taymans
a2df282086 pw-cat: add a container option and some --list options
Add a container option to override the extension check and force a
container when saving.

Add some more formats that are supported by libsndfile.

Add some options to list all supported formats, extensions/containers,
layouts and channel names.

Fixes #5117
2026-02-09 13:55:52 +01:00
Frédéric Danis
0470f96887 bluez: bap: Select correct settings for select_config()
Depending on the codec kind, select appropriate settings to pass
to select_config().

This allows to pass the bluez5.bap.force-target-latency property,
and so to select the same configuration.
2026-02-09 09:27:10 +00:00
Frédéric Danis
c499255098 bluez5: bap: Add device property to force target latency
Some PTS tests (e.g. BAP/UCL/SCC/BV-046-C or BAP/UCL/SCC/BV-077-C)
requests to select QoS from low-latency or high-reliabilty.

The bluez5.bap.force-target-latency device property allows to force it.
For other values than low-latency or high-reliabilty the QoS selection
will use both tables to find the more appropriate configuration.
2026-02-09 09:27:10 +00:00
Barnabás Pőcze
2770143f50 gst: pool: fix buffer release race condition
A call to `release_buffer()` may happen in a gstreamer thread concurrently
with the pipewire stream emitting the `remove_buffer` event in the thread
loop, which, in pipewiresink calls `gst_pipewire_pool_remove_buffer()`, which
in turn modifies the `GstPipeWirePoolData` object. Thus a data race occurs
when accessing its members, which can lead to `pw_stream_return_buffer()`
being called with a null pointer.

Fix that by locking the thread loop before checking the conditions.

Fixes: c0a6a7ea32 ("gst: handle flush event in pipewiresink")
2026-02-09 09:25:36 +00:00
Stanislav Ruzani
64e0a9cbd9 alsa-pcm: set rate_match rate to 1.0 when not matching
Only set rate_match rate to DLL correction when matching is active.
When ALSA is driver and not matching, set rate to 1.0 to indicate no rate adjustment needed.
DLL still runs for buffer level management but rate_match should not expose correction
when matching is inactive to avoid confusion during debugging.

Signed-off-by: Stanislav Ruzani <stanislav.ruzani@streamunlimited.com>
2026-02-05 10:45:11 +01:00
Carlos Rafael Giani
bac776f8b4 doc: spa: Explain the nsec and next_nsec values in the driver docs better 2026-02-05 10:34:32 +01:00
Pauli Virtanen
84bfbd92a1 bluez5: bap: prefer high-reliability qos for 44.1/48 kHz
On some device combinations (MT7925 / Sony LinkBuds S) the low-latency
48 kHz QoS crackle.

It's probably better to default to high-reliability for those, until we
have proper quality vs. latency configuration in place.
2026-02-03 19:10:25 +02:00