Commit graph

14321 commits

Author SHA1 Message Date
Pauli Virtanen
c65e70fce0 doc: document missing api.acp.* properties 2025-10-10 18:30:26 +03:00
Wim Taymans
4da25df986 filter-graph: accept String param values
We parse the string as a float and if that works, set the value.
2025-10-10 15:03:04 +02:00
Jonas Holmberg
16ce5a2ccf filter-graph: Accept params of type Long
Integer numbers in lua are sent over protocol-native as Longs so make
sure to handle them.
2025-10-10 10:53:03 +00:00
George Kiagiadakis
2aa725e4fe audioconvert: accept prop params that are encoded as Long in the pod 2025-10-10 13:48:10 +03:00
Arun Raghavan
154ab33607 spa: alsa: Add option to use ELD-detected channels 2025-10-10 09:34:43 +00:00
Arun Raghavan
91e2f184e2 spa: alsa: Read and expose channel count and position from ELD
The next step will be to propagate this to the correct node.
2025-10-10 09:34:43 +00:00
Wim Taymans
d268b6e104 examples: add some options to enable features 2025-10-10 10:41:53 +02:00
Wim Taymans
bd6081018f tests: fix warning 2025-10-09 09:29:32 +02:00
Wim Taymans
b7b9e7dc6e tests: fix compilation 2025-10-09 09:22:07 +02:00
Arun Raghavan
a4ec02f9d7 spa: tests: Add an offline AEC benchmark 2025-10-09 00:16:51 +00:00
Barnabás Pőcze
dcdb88d7b7 spa: libcamera: device: adapt to libcamera change
The interface of string typed controls has recently been changed in
libcamera[0], which affects `properties::Model`, so adapt to that change
in such a way that is compatible with both the new and old versions.

[0]: f84522d7cd
2025-10-08 13:23:11 +02:00
Wim Taymans
4fb0a0aeea example: add sync timeline example
Add an example producer and consumer using the SyncTimeline metadata.
The syncobj are just eventfd for the purpose of the example.

Also demonstrate the RELEASE feature when negotiated.

Add some switches to tweak the SyncTimeline and features support.

See #4885
2025-10-08 12:53:30 +02:00
Wim Taymans
7d781e696f profiler: avoid null dereference
Avoid shadowing some variables from the parent block.

The node of a target can be NULL when the target is running in another
instance. We already do some checks for this but make sure we never
deref the NULL pointer.

Fixes #4922
2025-10-06 14:38:38 +02:00
Barnabás Pőcze
e4480cf804 ci: enable ffmpeg in build_on_debian
The dependencies are already installed, but since the ffmpeg related
meson options are set to `disabled`, they were not used.
2025-10-06 12:10:23 +00:00
Barnabás Pőcze
e72962fb42 pw-cat: do not use deprecated FF_PROFILE_*
These macros were deprecated in 2023[0], and are absent in the latest
ffmpeg 8.0[1]. So use the new names.

[0]: 8238bc0b5e
[1]: 8224327698
2025-10-06 12:10:23 +00:00
Wim Taymans
e9aef9196f examples: add example MemFd sink
Add an example of a filter sink that requires MemFd memory on the
input port. Show that it gets automatically mapped and that it contains
MemFd memory.

Fixes #4918
2025-10-06 13:37:59 +02:00
Wim Taymans
5ccaf29793 stream: only mmap buffers when not already mapped
Don't just blindly mmap the buffer but only when the data pointer
is NULL. If it was mapped already by the peer or the adapter or the
buffer allocation, we don't want to mmap it again and override the buffer
data pointer.

Also mmap with the permissions on the data. There is not much point in
limiting the permissions for an input port (to read only). We could do
this but then we would not be allowed to modify the existing data
pointer. The problem is that when the stream mmaps the data as READ only
and set the data pointer, if it is then handed to the mixer, it would
assume it is mapped with the permissions and then segfault when it
tries to write to the memory. It's just better to only mmap when the
data is NULL.
2025-10-06 13:17:00 +02:00
Wim Taymans
e7bc261830 filter: don't lock the Buffers param
It should be possible to override the Buffers params in the filter.
2025-10-06 13:16:32 +02:00
Wim Taymans
984b2d296e context: only make active nodes runnable
Only try to make active nodes runnable. This can happen when the node is
destroyed.

Avoids a -EIO error when destroying nodes from pavucontrol.
2025-10-06 11:48:40 +02:00
Wim Taymans
b66d49702f examples: avoid mmap in the example
We don't need to do this ourselves, the MAP_BUFFERS port flag already
makes sure this is done for use.

We used to have to do this here to ensure the mixer could find the data
pointer and not error out. Now that the mixer can MMAP, this can go.

See #4918
2025-10-06 11:17:08 +02:00
Wim Taymans
af3ad7bf9f buffers: improve allocation
There are really 2 options for the buffer allocation:

1. allocate the buffers skeleton and meta/chunk/data in malloc memory.
   This is when the PW_BUFFERS_FLAG_SHARED is unset.
2. allocate buffers skeleton in alloc memory and the meta/chunk/data
   in shared memory when the PW_BUFFERS_FLAG_SHARED is set.

Optionally the data can be left unallocated in both cases when the
PW_BUFFERS_FLAG_NO_MEM is set. In this case we also need to pass the
SPA_BUFFER_ALLOC_FLAG_NO_DATA flag to allocator or else it will set the
data pointers to 0 sized memory in the skeleton.

If we use SHARED and we allocated memory, we can also set the MemFd and
mapoffset into our shared mem. We can do this even if the data_type is
MemPtr.

We can decide on the datatype to use earlier, based on the negotiated
flags. In the MemFd case, make sure the buffer data is page aligned in
that case to make things easier. Also force everything in SHARED mem
when the data is in SHARED mem. We also don't need to
PW_BUFFERS_FLAG_SHARED_MEM because we work with the negotiated flags
now to decide if SHARED mem is needed or not.

With this change, a node port could provide a MemFd data_type mask in
the Buffers param and this would negotiate shared mem with the mixer.
Previously, it would only ever allocate malloc memory.

See #4918
2025-10-06 10:58:19 +02:00
Wim Taymans
1a54b9e66f impl-port: handle errors from the mixer use_buffers
Also handle errors when we fail to set mixer buffers on the output port
of the mixer.
2025-10-06 10:38:08 +02:00
Wim Taymans
aede3d049c buffer: update comment, we have flags now 2025-10-06 10:31:52 +02:00
Gabriel Golfetti
df2f36ad8f Add support for mappable buffers in mixer-dsp 2025-10-04 10:04:50 +00:00
Wim Taymans
fe78e80614 tools: fix compilation after removal of field 2025-10-02 16:39:18 +02:00
Wim Taymans
0b0226322f examples: add DSP sink example
Add example of ALLOC_BUFFERS on the input port.

See #4918
2025-10-02 16:26:27 +02:00
Wim Taymans
4161fa3071 impl-port: also honour CAN_ALLOC flag between mixer/node
When we have a mixer node and we need to negotiate buffers between the
mixer and the node, take the CAN_ALLOC flag into account.

This is for input ports, which can have a mixer. If you make a filter
with a CAN_ALLOC input port, it will now not already contain buffer
data.

See #4918
2025-10-02 16:26:27 +02:00
Wim Taymans
1fdde582c0 buffers: add some more comments to the flags 2025-10-02 16:26:27 +02:00
Carlos Rafael Giani
83ee3021e9 spa: Remove channel field from spa_audio_info_mpegh structure
A fixed channel count makes no sense with an entity based 3D audio format
like MPEG-H, because MPEG-H decoders do not simply decode; they
"spatialize" the entities, meaning that said entities are decoded and
rendered accordingto the needs of the target playback system and its
channel count.
2025-10-02 12:12:53 +02:00
Carlos Rafael Giani
52041e888c meson.build: Make libswscale a requirement only if videoconvert is enabled 2025-10-02 12:05:07 +02:00
zay-yar-lwin
0de80603e1 update Burmese Translation 2025-10-02 09:11:14 +00:00
Pauli Virtanen
6755f24a3d bluez5: reduce log level for unhandled RFCOMM commands
Don't log warnings about not passing on RFCOMM commands to modem if
there is no modem configured, as this is normal occurrence.
2025-10-02 01:33:23 +03:00
Pauli Virtanen
8277bf6b36 bluez5: improve error messages when connection drops
Log something less confusing when connection to remote device drops
unexpectedly.

Silence logging transport Release() error in cases where the transport
was simultaneously deleted.
2025-10-02 01:25:56 +03:00
Wim Taymans
4625f7ee3a mixer-dsp: only use passthrough when DYNAMIC_DATA
We can only change the data pointers on the output buffer when the data
had the DYNAMIC_DATA flag.
2025-10-01 11:13:42 +02:00
Wim Taymans
91ae1c13b7 impl-port: only use DYNAMIC_DATA when allowed
Allocate buffers with the DYNAMIC_DATA flag set only when the port
actually allows it.

See #4918
2025-10-01 11:11:36 +02:00
Wim Taymans
0915ed8be0 adapter: enhance converter flags with follower flags
We don't want to override the converter flags with the follower flags,
just enhance them with specific follower flags. Otherwise we lose the
DYNAMIC_DATA and other port flags from the converter.

See #4918
2025-10-01 11:03:53 +02:00
Wim Taymans
c91f75ae2e audio: bump max channels to 128 2025-10-01 09:21:36 +02:00
Wim Taymans
532140ca90 bluez5: Don't assume channels fit in uint8_t
There is no reason to believe the number of channels can fit in a
uint8_t. Limit the number of channels in some places where it can not
be avoided.
2025-10-01 09:13:42 +02:00
filmsi
74e6e6c29d Update Slovenian translation 2025-09-29 18:05:19 +02:00
Pauli Virtanen
2248807835 bluez5: sco-io: send keepalive TX data if sink is not feeding it
When using LC3-24kHz, remote device drops connection after a few seconds
if there is no sink playback.  Avoid this by sending silence, one TX
packet for each RX packet, if sink hasn't been feeding data within a
timeout.
2025-09-29 14:15:46 +00:00
Niklas Carlsson
3f9ae1ee10 filter-graph: allow 8 channels in max plugin
Mimic the same channel behavior as for other plugins that allows
for 8 channels, such as Mixer and Mult.
2025-09-29 14:11:27 +00:00
Wim Taymans
3cf182255f context: handle leaf nodes better
Find leaf nodes by looking at the number of max in/out ports and the
link group. This should give us nodes that only consume/produce data.

If a leaf node is linked to a driver with only passive links, it will
never be able to be scheduled unless we also make it runnable when the
driver is made runnable from another node.

This can happen when you do:

pw-record -P '{ node.passive=true }' test.wav

and then

pw-record test2.wav

Without this, the first pw-record would never be scheduled. With the
patch it will be scheduled when the second pw-record is started.

Fixes #4915
2025-09-29 14:38:19 +02:00
Wim Taymans
468a9ac954 pulse-server: add the peer ip to client properties
When clients connect with IP, add the peer IP address to properties. We
might use this later to make a better stream node.name than a copy of the
client application name.
2025-09-29 09:39:57 +02:00
Wim Taymans
fdc74df383 modules: use timer-queue in avahi-poll
Pass the pw_context to get to the shared queue and loop.
Patch up the users of avahi-poll.

Fixes #4913
2025-09-26 13:39:49 +02:00
Wim Taymans
678e571d80 timer-queue: delete next timer event when it got fired
When we fire the timer event, mark the next timeout as NULL because
nothing else is going to timeout anymore until we rearm the timer.

This has the effect that if we cancel and add the same timer from the
callback that we will reprogram the timer with the new timeout instead
of thinking the item as already programmed.
2025-09-26 13:02:53 +02:00
Wim Taymans
9be06c46b7 pulse-server: fix case statement 2025-09-26 11:43:52 +02:00
Wim Taymans
17cad8e7ef pulse-server: add a help message
Shows all available messages on /core because I keep forgetting.
2025-09-26 10:57:04 +02:00
Wim Taymans
5a894270e6 pulse-server: add a pipewire-pulse:list-modules message
It list all available module names, which you can then describe further.
Make a little module_info iterator function for this.
2025-09-26 10:55:10 +02:00
Wim Taymans
ecac86b0ca avahi: handle fd allocation errors
When we fail to allocate an io source or a timerfd, return NULL instead
of crashing later on.

See #4913
2025-09-26 10:52:40 +02:00
Wim Taymans
06214b6087 pulse-server: map some more errno to errors
Mostly EADDRINUSE to ERR_BUSY, which happens when loading TCP when
it's already loaded on the address.
2025-09-26 10:50:52 +02:00