Commit graph

12941 commits

Author SHA1 Message Date
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
Wim Taymans
ddbe135a3b module-eq: format floats as JSON floats
Don't use %f to serialize floats to JSON but use the json formatter
because in some locales, the decimal point becomes a , which does not
parse as a float anymore.

Also reformat some lines.
2024-10-10 11:27:25 +02:00
Arun Raghavan
050ae8cc56 meson: Prepend some environment variables
We should prepend rather than override these, so we can stack
environments if we want.
2024-10-09 19:39:15 +00:00
Lương Việt Hoàng
f65bd482bd parametric-equalizer: wrap EQ file in a code block
In the docs, it looks like a paragraph without line breaks.
2024-10-09 21:38:24 +07:00
Lương Việt Hoàng
c3660d853c parametric-equalizer: add capture.props and playback.props
They first get merged with default values, but are otherwise similar to
those in filter-chain.
2024-10-09 21:38:24 +07:00
dpayne
d6a99db203 Only sending feedback timer with CRYPTO_AUTH_SETUP for airplay 2024-10-09 13:09:55 +00:00
Wim Taymans
fa1ec61cf0 profiler: add followerClock block
Add a new followerClock block in the profiler info. This is only set
when the follower could be a driver and it contains the clock info used
for following the driver, mostly the rate difference and delay.

Dump this info in pw-profiler -J

Make sure we always set the info in the clock, especially also when we
are following.
2024-10-09 11:31:54 +02:00
lumingzh
d605a820d2 update Chinese translation 2024-10-08 08:34:00 +00:00
Wim Taymans
1bb099e8bc filter-chain: fix typo
Spotted by ludolpif ludolpif

Fixes #4340
2024-10-08 10:31:29 +02:00
Wim Taymans
1a8a3044fc remove deprecate Props settings, use node.param.Props 2024-10-08 10:27:36 +02:00
Wim Taymans
fcf366ccc2 conf: update some example node configs
Use node.param.Props for the patternType on videotestsr.

Make the audiotestsrc non-live. Otherwise it will be live but not a
driver and fail to schedule things.

See #4341
2024-10-08 10:19:55 +02:00
Wim Taymans
d47f8bf136 spa-node: remove broken setup_props
It's broken because it only iterates one Props property and most nodes
have an adapter, and so two sets of Props.

The node.param.Props = { } property is a better way of doing things
these days.
2024-10-08 10:13:35 +02:00
Julian van der Horst
d2df250e61 apply force-s16 quirk also to teams-for-linux 2024-10-07 15:54:30 +00:00
Wim Taymans
ffbcf853e6 stream: improve the flush handling and docs
Flush with drain calls the drained callback for each cycle until paused
or resumed. Setting the stream to active again, clears the drained state
and makes things resume.

Flush without drain does not set the state to PAUSED but simply clears
the queued data. This is mostly useful when pausing or stopping.

At no point should the flush operation result in a PAUSED state change.
2024-10-07 17:15:18 +02:00
Wim Taymans
8cd3fc6922 adapter: increase max-retry to 64
When the follower doesn't produce enough data for this many attempts,
bail and cause an xrun to avoid an infinite loop.

The limit of 8 cause real-life problems and should be larger. It should
probably depend on the expected size per cycle (node.latency) and the
current quantum but we don't always have this information.

See #4334
2024-10-07 09:28:39 +02:00
Wim Taymans
27961630a6 jack: actually clear the mix io
When we are asked to clear the mix io areas, actually do it, otherwise
the process thread might still be accessing the old memory and crash.

Also check that we have set io on the port before we decrement the
counter with active io or else we have a negative value and cause
problems later. This can happen when we susupend and set io to NULL but
there was never any io set on the port.

Fixes #4337
2024-10-06 12:36:18 +02:00
Wim Taymans
0db2171cd9 alsa: dynamically adjust the DLL bandwidth
Keep a running average and variance of the error. Use this to
periodically update the DLL bandwidth. When the variance gets smaller,
we update the DLL more slowly to stay closer to the ideal rate.

This seems to improve the rate stability.
2024-10-04 10:47:47 +02:00
Wim Taymans
d1efc9c2c6 tools: improve profiler -J output
Put the newline and comma right after printing the line so that it gets
flushed immediately. Otherwise we only see the last line in the next
cycle. We then need to end the JSON output with an empty object.

Pretty print the node status instead of the value.
2024-10-04 10:42:38 +02:00