Commit graph

14688 commits

Author SHA1 Message Date
Wim Taymans
7dd924797b audioconver: reformat the graph description for properties 2026-02-26 10:59:57 +01:00
Wim Taymans
ed361a856f tools: port various tools to the new json-builder
Remove custom json serialization code and use the new json-builder
from various tools.

spa-json-dump now has color and raw mode and can probably be simplified
a bit more.

The properties can now serialize arbitrarily large keys, which makes
a unit test work. It also has a new 'simple' option for SPA output,
which is added and used in pw-config.
2026-02-26 10:51:17 +01:00
Wim Taymans
6753c51ab8 spa: add a new json-builder helper
It keeps track of the json bits like commas and indentation, supports
colors and recursive reformatting. It also supports a simple mode that
implements the SPA syntax.
2026-02-26 10:48:53 +01:00
Wim Taymans
692590b30a 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-02-26 10:42:14 +01:00
Barnabás Pőcze
848ac24490 spa: libcamera: source: fix stop sequence
Currently it is possible for the request completion handler (`impl::requestComplete`)
to observe `impl::source.fd` while it is being modified in `impl::stop()`.

Fix that by closing the eventfd after the camera has been stopped.

Fixes: 3e28f3e859 ("spa: libcamera: source: rework startup sequence")
2026-02-24 18:29:51 +01:00
Wim Taymans
6961bfeaa1 examples: adapt samplerate in audio-dsp-src
Follow the graph rate to generate the sine wav instead of using a
hardcoded value.

See #5135
2026-02-24 15:12:43 +01:00
Wim Taymans
5a285602e2 scheduler: sync-groups don't define the node runnable state
The sync-groups are only to group nodes with the same driver but don't
make them runnable.

This avoid making v4l2 runnable (without a link) when running ardour
because ardour uses the transport, which activates the sync group.
2026-02-23 11:32:40 +01:00
Anders Jonsson
426a5be235 po: Update Swedish translation 2026-02-22 21:50:02 +01:00
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