Commit graph

2818 commits

Author SHA1 Message Date
Barnabás Pőcze
c57afbccc1 pipewire: module-avb: add some missing declarations 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
5b05c1c430 pipewire: module-avb: include "avb.h" in "avb.c"
So that definitions are checked against declarations.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
db510e769a pipewire: module-avb: add missing "stddef.h" include in "avb.h"
Including "stddef.h" is needed for `size_t`.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
12be42ed6b pipewire: module-netjack2-manager: remove unused module_schedule_destroy() 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
34809d3081 pipewire: module-netjack2-driver: remove unused module_schedule_destroy() 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
0a00d9c4d7 pipewire: module-ffado-driver: remove unused module_schedule_destroy() 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
0f70256230 pulse-server: include "reply.h" in "reply.h"
So that definitions are checked against declarations.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
3b4a255dec pulse-server: format_info_from_spec(): remove redundant decl 2023-07-03 19:40:31 +02:00
Barnabás Pőcze
1bb714b95e pipewire: utils: make_random(): do not use errno
The function already returns `ssize_t`, so do not use `errno`
to communicate the reason for failure, instead, return the
negative errno.

`pw_getrandom()` was inconsistent in this regard because
sometimes it simply returned a negative errno without
setting `errno`. This change fixes that as well.
2023-07-03 19:40:31 +02:00
Barnabás Pőcze
f82f215bf7 pipewire: modules: add missing "config.h" include in "flatpak-utils.h" 2023-07-03 19:40:25 +02:00
Wim Taymans
c34a987076 pulse-server: add option to disable fix_ flags
Document the pulse.fix properties.
Add an option to disable handling of the FIX flags when the pulse.fix.
property is set to an invalid value/0.

See #3317
2023-07-03 16:39:32 +02:00
Wim Taymans
4bb85ef6c9 module-rtp: don't use sap port as src port
We bind to the src addr (the interface addr) and so we need a new unused port.
2023-07-03 12:35:36 +02:00
Wim Taymans
eaaa0cd99e modules: improve some docs 2023-06-30 21:44:49 +02:00
Wim Taymans
c13696aca1 filter-chain: simplify biquads 2023-06-30 17:49:29 +02:00
Wim Taymans
f612ffe8e4 pulse-server: use the fixed rate for graph rate
We need to use the format rate for calculating the buffer size and
latency but the fixated rate for the graph rate.

See #3317
2023-06-30 12:34:25 +02:00
Wim Taymans
91ac3acf3d pulse-server: debug the fixed format/rate/channel 2023-06-30 12:34:25 +02:00
Barnabás Pőcze
2abd3432b8 pulse-server: module-combine-sink: remove redundant member
`module_combine_sink_data::info` member has not been used
since 782e0dfb1f, so remove it.
2023-06-29 23:57:48 +02:00
Wim Taymans
98f138dbe0 filter-chain: move sofa and lv2 to external modules
dlopen lv2 and sofa plugin modules instead of hardcoding them into the+
filter-chain. This also makes it possible to add more plugin module
types externally.
2023-06-29 14:04:40 +02:00
Wim Taymans
5d177acc53 meson: clean up echo-cancel sources 2023-06-29 12:12:10 +02:00
Wim Taymans
ab8e67e885 filter-chain: improve error reporting 2023-06-28 17:07:14 +02:00
Wim Taymans
b065899859 filter-chain: only reset rate when suspended
Otherwire we can continue with the graph configuration if the rates
still match.
2023-06-28 16:52:11 +02:00
Wim Taymans
f9efc63a04 pulse-server: make sure we have a card_name
Clients crash if the card name is NULL so make sure we generate
a backup name.
2023-06-28 16:18:44 +02:00
Wim Taymans
bddfc8c46e filter-chain: support notify to control links as well
If we can't find data ports to link, try to find notify/control ports
when making a link.

When applying the link, place the output of the notify as the control
data.
2023-06-28 15:15:07 +02:00
Wim Taymans
c671c46b87 module-loopback: recalc delay when starting
So that we can use the graph rate in case we are configured to follow
the graph rate.
2023-06-28 12:36:42 +02:00
Wim Taymans
e3a41b2c49 filter-chain: instantiate graph when starting
Don't instantiate the graph when negotiated but when starting. This
allows us to get to the target graph rate in case the format rate is
supposed to follow the graph rate.

See #2969
2023-06-28 12:36:19 +02:00
Wim Taymans
e03c3311eb filtet-chain: instatiate only once 2023-06-28 11:53:26 +02:00
Wim Taymans
4b32b1fef0 modules: add example filter 2023-06-27 14:02:38 +02:00
Wim Taymans
39165a8471 modules: add ASYNC flag
Add ASYNC flags for the streams that don't dequeue/queue in the realtime
process function so that an extra buffer is allocated.
2023-06-27 13:11:13 +02:00
Niklāvs Koļesņikovs
e4cc63a6dc src/modules/meson: ensure Opus libs were actually found, too
The old way fails, if a distro has the header but not the library,
which can happen on at least Gentoo with multilib deployments,
where the shared header is present but non-native libraries might not.

This could still fail, if a distro had some but not all libraries for
some architectures but hopefully no one did that. In that case, a compile
test would likely be required via cc.check_header() instead but let's try
the faster fix first.

Reported-by: Sam James <sam@gentoo.org>
Thanks-to: Barnabás Pőcze <pobrn@protonmail.com>
Thanks-to: Xavier Claessens <xavier.claessens@collabora.com>
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
2023-06-26 15:21:49 +00:00
Wim Taymans
0156d63109 audioconvert: don't negottiate rate when resample is disabled
This will leave the negotiated rate 0 when parsed and instructs the
stream to follow the graph rate.
2023-06-26 11:23:29 +02:00
Wim Taymans
b464d2145d pulse-server: don't override initial volume/mute
When we are asked to apply the initial volume/mute, don't overwrite it
with the default volume.

Fixes #3306
2023-06-23 09:51:09 +02:00
Wim Taymans
20434e8669 module-jack: init latency correctly 2023-06-22 17:57:49 +02:00
Wim Taymans
1ce94628ee client-node: rework mix_info
Use the port_set_mix_info to add and remove mix info information to the
client.

Previously it was impossible to clean up mix_info.

With this change we can also simplify the jack peer port detection.
Because the mix info is always sent before the link appears we can
simply look up the info when the link appears.
2023-06-22 11:59:39 +02:00
Wim Taymans
ad5ac964af module: disable resample when following graph rate
When we don't set a rate, assume both input and output streams are
following the graph rate and so disable the resampler.

This mostly works around an issue where the input and output could
negotiate to different rates in some cases. With the resampler disabled
this would still result in the same amount of samples going in as
comming out instead of a stuttering mismatch.

See #2969
2023-06-22 11:18:04 +02:00
Wim Taymans
3db3e6dacf Revert "module-loopback: request renegotiation when suspended"
This reverts commit 2c5a3e9593.

Causes problems when switching devices because it doesn't renegotiate
properly.
2023-06-22 10:09:16 +02:00
Wim Taymans
74b6ab4288 remote-node: remove IO_Buffers before releasing the mix
This is usually done by the link but because we are a remote node, we
manage the links ourselves.
2023-06-21 18:38:21 +02:00
Wim Taymans
2c5a3e9593 module-loopback: request renegotiation when suspended
When one side of the loopback suspends, do a EnumFormat params to force
renegotiation on the other side as well.

Suppose this:

1. sink/filter/pw-play plays at 48000Hz
2. pw-play goes away, sink and filter-sink suspend, filter-playback
   idles
3. pw-play starts with 44100Hz
4. sink/filter-sink renegotiate to 44100Hz, filter-playback is still
   at 48000Hz and pitch shifted.

We might want to manually suspend the IDLE nodes instead but for now
this is a good workaround.

Fixes #2969
2023-06-21 16:29:45 +02:00
Wim Taymans
c4c6a3fd1b Revert "module-loopback: request renegotiation when suspended"
This reverts commit bbf8f1a0c8.

This causes all kinds of things to go wrong, mostly failure to
renegotiate buffers. Needs more testing.
2023-06-21 15:58:49 +02:00
Wim Taymans
265e6ca352 client-node: rename confusing id to mix_id
There is already an id in the port_mix structure that can be used to
index the mix structures in map if needed, the mix_id is the port_id of
the mixer and should not be confused.
2023-06-21 10:23:07 +02:00
Wim Taymans
001f0656d4 remote-node: refactor init/create/ensure mix
Make a create_mix function that also takes the peer_id.
2023-06-20 19:24:38 +02:00
Wim Taymans
9fa46af488 filter-chain: add link to biquad help page
Fixes #3257
2023-06-20 09:48:38 +02:00
Dmitry Sharshakov
0fc1112c6d module-rtp-sap: get source.ip from network interface if not supplied 2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
6581d4ee2a module-rtp-source: fix crash on stream deletion 2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
991e3928d4 rtp-stream: do not set false ptime values 2023-06-20 06:51:30 +00:00
Dmitry Sharshakov
024dc74e53 module-rtp-sap: bind transmission socket
Makes packets fly to correct interface
2023-06-20 06:51:30 +00:00
Wim Taymans
882df500b6 module-ffado: don't read/write twice
The process callbacks are called twice, once on graph start and once
on graph complete, make sure we only read in the right phase.
2023-06-19 16:43:56 +02:00
Wim Taymans
7805a454df module-jack: fix jack scheduling
Our sink and source callbacks are called twice, once when the graph
starts and once when it completes, make sure we don't signal the jack
graph twice or we get corrupted output.

Fixes #3255
2023-06-19 16:37:03 +02:00
Wim Taymans
3dbb865d6d module-node-factory: add option to export object
Add an option to export the node from the factory.

That way you can locally create a node from a factory and then export it
to the server. This is handy to make object in the server from a config
file using the node-factory.

See !1643
2023-06-19 12:41:30 +02:00
Wim Taymans
7c7e814b02 modules: build virtual sink/source 2023-06-16 16:24:49 +02:00
Wim Taymans
989c61e8a1 pulse-server: add virtual-sink and virtual-source
Although those are example elements, they actually work and we can
implement them as well.
2023-06-16 12:18:36 +02:00