Commit graph

15433 commits

Author SHA1 Message Date
Arun Raghavan
3e5f072e11 spa: aec: webrtc: Actually enable adaptive analog control in AGC2
Without this, we only get a fixed 0dB gain + compressor.
2026-05-20 17:57:19 +00:00
Wim Taymans
e36d724d04 alsa-seq: increase MAX_EVENT_SIZE to 1024
This is also what a2jmidid has, so let's do the same.

See #5254
2026-05-20 13:25:20 +02:00
Wim Taymans
6e6fb1207d filter-graph: sync_volume initializes the control ports
Setting the volume control ports with a volume param also initializes
the controls. This ensures the controls are not restored to their
default value when the graph is activated.

Fixes #5192
2026-05-20 11:32:39 +02:00
Wim Taymans
753ce79c18 rtp: fix compilation 2026-05-20 09:09:38 +02:00
Wim Taymans
d56d5fa87a raop: implement retransmission
Keep the last relation between the sequence number and the timestamp
(ringbuffer position).

When a retransmission is requested for a given sequence number use the
relation to calculate the corresponding timestamp and retransmit the
packet from the ringbuffer again.

See #5276
2026-05-19 17:40:07 +02:00
Wim Taymans
a6fe6196d5 modules: remove redundant close
The close in the error path will never be called because the fd has been
stolen and will be -1.

Also make sure that when we free the source that we set it to NULL or
else the destroy function will try to free it again.
2026-05-18 16:58:20 +02:00
Wim Taymans
250260e18e modules: avoid double close when loop_add_io fails 2026-05-15 13:38:32 +02:00
Wim Taymans
894e97aaa5 modules: avoid double fd close
Now that loop_add_io, avoid double free on failures. Try to use
spa_autoclose and spa_steal_fd to make the error paths easier.
2026-05-15 13:34:48 +02:00
Wim Taymans
a9f62579ba support: make sure loop_add_io is closes the fd when asked
When the close argument is true, loop_add_io is supposed to close the fd
even when an error occurs.

This makes it possible to have spa_steal_fd() work even in the case
of errors.
2026-05-15 13:21:55 +02:00
Wim Taymans
398f74571b module: check packet size for CK messages
Check that the CK packet is large enough before we start reading its
contents.
2026-05-15 10:45:14 +02:00
Wim Taymans
f3fc645496 connection: return error if too many fds in message
Check that the number of fds in the message doesn't exceed our max or
else we might overflow the fd buffer a little later.
2026-05-14 16:32:58 +02:00
Wim Taymans
79b4aba6cc pulse: also handle potential overflow in ROUND_UP 2026-05-14 16:27:20 +02:00
Wim Taymans
af151b088d pw-dump: also dump client permissions 2026-05-14 15:05:08 +02:00
Wim Taymans
98fdedf348 filter-graph: relax LADSPA plugin loading
Make a new library.filter-path for the filter-graph that will filter and
restrict the dlopen filenames (used for the LADSPA plugin only).

By default this is false and so filter-chain can load from absolute
paths without extra checks.

Enable the extra checks for the pulse LADSPA modules and the
audioconvert filter graphs because these allow loading LADSPA plugins
into other processes.

Fixes #5222
2026-05-14 13:23:19 +02:00
Wim Taymans
61431dcbc0 audioconvert: add dither noise even on empty input
When we are asked to add noise bits, don't call the clear function.

Make the passthrough and clear-on-empty flags available with a new flag
field to make it more extensible.

Fixes #5260
2026-05-14 11:19:02 +02:00
Wim Taymans
4f975d0071 treewide: add error checking to spa_json_builder_close
There could have been a write error or allocation error while building
the json file that we can detect in spa_json_builder_close().

Error out instead of silently using a truncated JSON.

Use spa_autofree for the memory to make cleanup easier.
2026-05-13 18:14:44 +02:00
Wim Taymans
6d1c242433 pulse-server: implement more valid_args on modules
If the valid_args is NULL, reject all arguments.
2026-05-13 16:53:40 +02:00
Wim Taymans
5fa87d67a1 protocol-native: unref resource after logging the error 2026-05-13 11:12:17 +02:00
Wim Taymans
b53ec3bceb impl-metadata: check PW_PERM_M permission on subject
To set a metadata on a subject, the subject must be visible (R) and we
must have the M permission on the subject.
2026-05-13 11:08:37 +02:00
Wim Taymans
a74109eef3 settings: clamp the clock rate to avoid 0 division
Setting the rate to 0 could in some cases result in a division by zero,
avoid that by clamping to a min value.
2026-05-13 10:47:52 +02:00
Wim Taymans
e5ff44910e pulse-server: improve module argument checking
Make the module valid_args a structure that includes the argument key,
description and some flags. Use this to enforce mandatory properties
in a more central place.

We should be able to generate the module usage from this as wel later to
have things a bit more structured.
2026-05-13 10:23:47 +02:00
Pauli Virtanen
a5a3eaf2cb ci: bump bluez version to fix failing bluez_tests
Bump bluez to current master to fix bluez_tests failures.
Also bump pytest-bluezenv version to current.
2026-05-12 23:56:27 +03:00
Jonas Holmberg
a7994882b9 channelmix: Convert matrices to float arrays
Convert matrix_orig and matrix to float arrays and use variable size 2d
arrays to access the elements of the matrices. This removes the need for
storing pointers to matrix rows.
2026-05-12 14:47:57 +02:00
Wim Taymans
7cfcb46fbf tests: do channelmix_free after channelmix_init 2026-05-12 13:10:21 +02:00
Wim Taymans
b54bac1862 modules: make and use pw_net_is_multicast 2026-05-12 13:02:21 +02:00
Wim Taymans
6d998a9193 modules: use pw_net_get_ip
Make pw_net_get_ip also accept NULL ip to just get the port and ip
version. Make rtsp-client use pw_net_get_ip.

Make sure we initialize the iovec before logging in all cases.
2026-05-12 12:52:03 +02:00
Wim Taymans
8860dc809d pulse-server: use pw_net_get_ip instead of inet_ntop 2026-05-12 12:14:52 +02:00
Wim Taymans
62846acb3f modules: use pw_net_get_ip 2026-05-12 09:29:19 +02:00
Niklas Carlsson
d02ebb01e1 filter-graph: expand built-in plugins min/max
No need to limit certain parameters to e.g. [-10, 10]. Some use
cases might want to use values outside of the current, somewhat,
restrictive limits.
2026-05-12 07:20:23 +00:00
Wim Taymans
0c193b2b82 modules: invert memcmp logic
memcmp returns 0 when the memory is equal. This function is not used
currently.
2026-05-12 09:18:56 +02:00
Wim Taymans
9843ee858f modules: use sockaddr_storage for socket address
sockaddr_in only works for ipv4, for ipv6, the address will be truncated
and then cause a stack overread in inet_ntop.
2026-05-12 09:15:46 +02:00
Wim Taymans
4366621b78 filter-graph: fix max plugin
It was reading src[1] twice for no good reason. Fixed it like the min
plugin works.
2026-05-11 17:44:59 +02:00
Niklas Carlsson
a9d7023ec3 filter-graph: add min plugin
Output the lowest sample value of a number of inputs.
2026-05-11 15:39:40 +00:00
Niklas Carlsson
ecc85f2959 filter-graph: warn on clamped control values
Print a warning if a control value is clamped instead of silently
failing as the user might want to know if the intended
configuration was not applied successfully, such as filter
parameters.
2026-05-11 15:31:09 +00:00
Wim Taymans
f1b1f2d97b audioconvert: allocate memory dynamically
Instead of working with fixed buffer size, allocate everything
dynamically. This preserves a lot of memory in the normal case.
2026-05-11 17:23:33 +02:00
Wim Taymans
cd654efa6a audioconvert: support Midi control messages as well 2026-05-11 14:02:29 +02:00
Wim Taymans
2e86383aba examples: set diffent Clock and Position on source
Set a different Clock id and Position clock id on the testsrc so that it
knows that it needs to be a follower.
2026-05-11 14:02:29 +02:00
Barnabás Pőcze
5bc76c7d07 ci: disable more jobs if $COVERITY
If the pipeline is running for coverity scan, then only two jobs are needed:

   * container_coverity
   * build_with_coverity

but currently 4 container, 1 build, and 1 deploy jobs are running unnecessarily.

Disable the container jobs by simply extending `.not_coverity`.

The `build_on_fedora_html_docs` and `pages` jobs already extend `not_coverity`,
however, they override the `rules` section, hence it is replaced, so the "not coverity"
condition is lost. Fix that by adding the condition separately. (`build_on_fedora_html_docs`
referencesc the rules of `pages`, so modifying the latter is sufficient.)
2026-05-11 10:05:16 +00:00
Wim Taymans
e286061df4 fix some compilation problems 2026-05-11 11:59:54 +02:00
Wim Taymans
3813f64a27 midifile: fix meta event read 2026-05-11 11:53:36 +02:00
Vladimir Sadovnikov
bb91cfeb9e Add explicit cast to struct spa_event * result of spa_pod_builder_pop 2026-05-11 09:53:18 +00:00
Vladimir Sadovnikov
139767b4b5 Change return type of spa_pod_builder_pop to struct spa_pod * 2026-05-11 09:53:18 +00:00
Barnabás Pőcze
05a1a08a04 ci: build_on_debian: use variable expansion in needs:parallel:matrix
Since gitlab 18.6, a job can refer to a subset of parallel jobs[0],
so make use of it so that build jobs only depend on the container
job for the specific architecture.

[0]: https://docs.gitlab.com/ci/yaml/matrix_expressions/#matrix-expressions-in-needsparallelmatrix
2026-05-11 08:16:15 +00:00
Pauli Virtanen
db5cb6515a ci: use ASan/UBsan in bluetooth tests
Compile with sanitizers for the bluetooth tests, for better backtraces
on failures. Also produce backtraces via gdb.
2026-05-11 08:15:29 +00:00
Pauli Virtanen
ef35aa161b test: improve bluezenv test debug 2026-05-11 08:15:29 +00:00
Pauli Virtanen
1fc7ec2e3f ci: run bluetooth VM tests
The bluetooth VM tests require building BlueZ (specific version is
better than relying on FDO image version) and building pytest-bluezenv.

Build them and cache the results.
2026-05-11 08:15:29 +00:00
Pauli Virtanen
d12367e10e test: add VM-based full-stack bluetooth tests
Add tests that check PipeWire <-> PipeWire bluetooth audio streaming for
A2DP, BAP, HFP.  The tests use Qemu VMs and don't require Bluetooth
support from HW / kernel.

Full VM images are not required; similarly to BlueZ kernel tester these
use (read-only) mount of host filesystem.  A monolithic kernel image
with suitable config is required.  The bluetoothd binary installed on
host is used if found; otherwise tests are skipped.

These test depend on https://github.com/pv/pytest-bluezenv which manages
the VM setup.

To launch:

    python3 -m pip install pytest-bluezenv
    meson devenv -C builddir -w . python3 -m pytest test --kernel-build -v

which also builds a kernel image with required options.
2026-05-11 08:15:29 +00:00
Frédéric Danis
708cb6e2e8 bluez5: bap: Add bluez5.bap-server.ascs-announcement property
BAP/USR/ADV/BV-04-C test requires to advertise Audio Stream Control
Service properties with Targeted Announcement type.
2026-05-11 08:14:14 +00:00
Frédéric Danis
27cdac3cd6 bluez5: bap: Advertise ASCS properties
BAP/USR/ADV/BV-01-C test requires to advertise Audio Stream Control
Service properties with General Announcement type and supported
contexts values for sink and source which should be in sync with
the PACS values.
2026-05-11 08:14:14 +00:00
Vladimir Sadovnikov
5e9ecc3ce5 Fix compilation warning for Clang C++ 2026-05-11 08:13:29 +00:00