Commit graph

12958 commits

Author SHA1 Message Date
Arun Raghavan
c3e5371053 meson: Use correct git head for wireplumber subprojects
Without this, `meson subprojects update` does not work.
2024-10-23 08:37:51 -04:00
Arun Raghavan
f0b81a4628 spa: audiotestsrc: Validate loop and system before using them
Makes sure we don't crash if those are not available (like with
DataSystem under spa-inspect).

Fixes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4365
2024-10-23 08:25:30 -04:00
Wim Taymans
2c132be626 audioconvert: align some buffers
so that we can use aligned read and writes in SSE.
2024-10-23 12:54:23 +02:00
Wim Taymans
662bf68122 audioconvert: handle odd writes in delay
Add some padding to the delay buffer. If we wrap around, copy the
spilled samples to the front of the buffer. This makes it possible to
use the more optimized sse delay function in more cases.
2024-10-23 12:34:04 +02:00
Wim Taymans
3309e0b244 audioconvert: don't unroll when unaligned write pointer
We require the write pointer to be a multiple of 4 for our unrolled SSE
loop to work, so enforce this to avoid segfaults.
2024-10-23 11:40:34 +02:00
Wim Taymans
da86026b7a latency: handle negative latency correctly
In our current world, it is possible to have a negative delay. This
means that the stream should be delayed to sync with other streams.

The pulse-server sets negative delay and the Latency message can hold
those negative values so make sure we handle them in the helper
functions as well.

Do the delay calculations in pw_stream and JACK with signed values to
correctly handle negative values. Clamp JACK latency range to 0 because
negative latency is not supported in JACK.

We should also probably make sure we never end up with negative
latency, mostly in ALSA when we set a Latency offset, but that is
another detail.
2024-10-23 10:47:58 +02:00
Wim Taymans
9243ed0cbd pulse-server: add condition support in pulse.cmd
So that a config override can disable the execution of the command by
setting the property to false in the pulse.properties config override.

Expose some conf.c method for this purpose.
2024-10-23 09:08:50 +02:00
Ola Fornander
12c8cdf69b gst: deviceprovider: fix memory leak in do_add_nodes
Use `g_autoptr()` to free the new_devices GList that is allocated in
do_add_nodes.
2024-10-22 21:53:57 +00:00
Wim Taymans
ec972d4fdf modules: support overriding default module arguments
Add support for some modules to use a module.$NAME.args config section
to override the arguments of the module. Update the docs.

Add more conditions to the module loading, use !false to also load the
module when the condition is not set and so that we don't have to
explicitly set each condition to true.

Improve module-profiler example config.
2024-10-22 18:04:42 +02:00
Wim Taymans
4cf4bd210f client-node: don't send mix_info to destroyed ports 2024-10-22 15:55:47 +02:00
Wim Taymans
82b9f76b0d impl-node: lower the xrun debug level
Make the xrun reporting as info. This can generate a lot of logging if
the error is persistent and the errors are also reported in pw-top etc.

Fixes #4361
2024-10-22 09:59:15 +02:00
Wim Taymans
0dfd6d997f protocol-pulse: implement readiness notification
Write a newline to the fd in the PIPEWIRE_PULSE_NOTIFICATION_FD env
variable when set.

This is to implement readiness notification as suggested in
https://skarnet.org/software/s6/notifywhenup.html

Fixes #4347
2024-10-22 09:50:27 +02:00
Wim Taymans
7af43d87b3 protocol-native: write socket address after adding
Only write the socket address after we managed to add the fd to the main
loop.

Only log a warning when this fails.
2024-10-22 09:33:40 +02:00
Pauli Virtanen
ced57514f4 filter-chain: fix array size for avx
dsp-ops-avx.c:205:18: warning: array subscript 1 is above array bounds of '__m256[1]'
dsp-ops-avx.c:185:37: note: while referencing 't'
2024-10-21 21:11:38 +03:00
Wim Taymans
22c45af7e0 loop: refcount the queues
The loop in the TSS gets an extra refcount and is unreffed when the TSS
destroy is called.

We can then also ref the queue during the function callback. When the
queue (thread) was destroyed during the callback, ignore the result and
continue with the next queues.

See #4356
2024-10-21 17:47:31 +02:00
Wim Taymans
bb53aa08ad loop: warn when some queues are still in TSS
When we clear we need to have all our queues removed from the TSS when
we delete the tss key or else they are leaked, check an warn about this
using a refcount of queued in the TSS.

See #4356
2024-10-21 17:08:10 +02:00
Wim Taymans
c4fece74a5 loop: fix race in shutdown
Make it possible to call loop_queue_destroy() from both the TSS destroy
and impl_clear() without races. We make sure that only one can remove
the queue from the queue list and cleanup. We also store the IN_TSS flag
in the flags so that we can see them before the queue is added to the
queue list. Only free the IN_TSS queue when the TSS destroy is called.

See #4356
2024-10-21 16:45:17 +02:00
Wim Taymans
6549e313ef alsa: clean up followers and our driver link in _clear
When we are going to be freed, make sure we remove ourself from the
driver list and also remove all the followers that we might still have.

Fixes #4355
2024-10-21 15:47:21 +02:00
Wim Taymans
6a6f455330 filter-chain: include pffft.h when needed 2024-10-21 09:50:57 +02:00
Wim Taymans
dcbdddc07a filter-chain: fix array size 2024-10-19 18:05:50 +02:00
Wim Taymans
7f8ce35709 filter-chain: add support for fftw in the convolver
It's faster than pffft.
2024-10-18 16:26:39 +02:00
Wim Taymans
f810c7c15f filter-chain: add avx mix function 2024-10-18 16:25:14 +02:00
Wim Taymans
8e8b661340 filter-chain: handle more errors in convolver init 2024-10-18 16:23:43 +02:00
Wim Taymans
633e643bfd filter-chain: align the buffer memory to max cpu alignment
So that optimizations can work on aligned memory.
2024-10-18 16:22:40 +02:00
Wim Taymans
fcc2d2f388 filter-chain: avoid a warning for unhandled enum 2024-10-18 09:15:56 +02:00
Wim Taymans
d83bf90a3a filter-chain: support NULL data for the delay filter 2024-10-18 09:15:56 +02:00
Pauli Virtanen
cd82c7259b bluez5: don't exit if system DBus goes down
Similarly as in spa_dbus, don't exit if bus goes down.  Neither the
audio or midi Bluetooth backend reconnects to DBus, but they shouldn't
exit the process.
2024-10-16 23:55:17 +03:00
Wim Taymans
24d76e73ab filter-chain: add support for time delay in convolver
The convolver will parse integers as a sample delay (as before) but will
now also fall back to parsing it as a float in the time domain.

Specifying the delay in time is better because it does not depend on the
samplerate of the graph or the IR.
2024-10-16 17:14:32 +02:00
Wim Taymans
5e87f1d4f4 filter-chain: optimize delay function 2024-10-16 16:16:03 +02:00
Wim Taymans
d8bd84183d filter-chain: optimize the identity biquad
Store the biquad type in the biquad, remove some unused fields.

Init all the biquads with the identify before loading the channel
specific biquads. We will process the max of all the channel biquads.
Make sure we skip processing for the indentity ones.
2024-10-16 12:33:35 +02:00
Wim Taymans
3c221f49a0 filter-chain: bypass convolver when NULL input/output 2024-10-16 12:32:53 +02:00
Wim Taymans
e281628847 filter-chain: initialize NULL data for each node 2024-10-16 12:31:36 +02:00
Wim Taymans
2c0ce6afc2 audioconvert: SSE optimize delay and convolver 2024-10-15 16:10:25 +02:00
Wim Taymans
33fb2f04c7 audioconvert: use MAX_TAPS constant 2024-10-15 12:49:16 +02:00
Wim Taymans
ad84c45c0c audioconvert: optimize lr4 handling
Make an SSE optimized LR4 function and one that handles 2 LR4s in
parallel.
2024-10-15 12:20:04 +02:00
Wim Taymans
fec3730489 audioconvert: avoid a memcpy when we can 2024-10-15 12:19:17 +02:00
Wim Taymans
a57f2f25b6 delay: improve delay performance
Use a wrap around delay ringbuffer. We can then avoid some modulo
arithmetic and read more efficiently.

Also handle the delay convolver case better by reversing the taps and
reading the taps and delay buffer without extra overhead.
2024-10-15 12:14:57 +02:00
Wim Taymans
668055e612 filter-chain: optimize biquads some more
Add 4 channel SSE function.
2024-10-14 18:08:38 +02:00
Wim Taymans
b30ff4eca3 filter-chain: improve output data
When we allocate data on an output port, always set it immediately on
the plugin. We let output nodes allocate data and input ports consume
it.

When we have no data on an output port, use discard data or NULL.

This ensure that the ports only have data when they are used by an input
port and otherwise use discards or NULL data.
2024-10-14 16:41:14 +02:00
Wim Taymans
a589bfc277 ifilter-chain: improve biquad debug 2024-10-14 16:28:41 +02:00
Wim Taymans
4c43ec7cef filter-chain: add multichannel support to param_eq
Add 8 input and output ports and make it possible to configure filters
per channel. We can optimize the SSE code to run 2 filters at the same
time.
2024-10-14 16:00:18 +02:00
Wim Taymans
b3d9b4bb9e filter-chain: fix max biquad check 2024-10-14 09:44:54 +02:00
Pauli Virtanen
34bca4a007 bluez5: add quirk for Phonak hearing aids 2024-10-13 11:50:04 +03:00
Pauli Virtanen
f89d42b8bc bluez5: fix crash with broadcast sinks 2024-10-12 11:03:21 +00:00
Pauli Virtanen
440b9fa36f po: update Finnish translation 2024-10-12 11:02:40 +00:00
Pauli Virtanen
1899e60d1f doc: remove duplicated entries, link to wireplumber docs 2024-10-12 11:29:18 +03:00
Wim Taymans
46e58ee2a8 modules: include limits.h to define PATH_MAX
hopefully fixes the build
2024-10-11 17:53:06 +02:00
Wim Taymans
ac21541741 filter-chain: optimize biquads a little
Add sse optimized biquads.

Make a new dsp function to run multiple biquads on multiple channels.
This makes it possible to unroll some operations and run the channels
in parallel later.
2024-10-11 17:49:34 +02:00
Wim Taymans
673352893a modules: port parametric-equalizer to filter-chain
Simply load a filter-chain with the new param_eq node and the
given filename in the config.

This fixes a number of issues such as not copying global properties to the
streams, setting a unique node.name etc...
2024-10-11 11:26:27 +02:00
Wim Taymans
ab20cc5f28 filter-chain: add parametric EQ builtin plugin
add param_eq which can take an EQ file or a config list of biquad
filters. It is potentially more efficient to run this than a chain
of biquads.
2024-10-10 18:58:32 +02:00