Commit graph

12184 commits

Author SHA1 Message Date
Stefan Ursella
8f2a239504 module-protocol-simple: do not cleanup client when send returns EAGAIN or EWOULDBLOCK 2024-02-05 13:26:25 +00:00
Barnabás Pőcze
db3d7b88dd pipewire: module-rt: make dbus reply checking stricter
org.freedesktop.DBus.Properties.Get is supposed to return
a single variant, so check if it does.
2024-02-05 13:03:20 +00:00
Barnabás Pőcze
4da82d5475 pipewire: module-rt: do not retrieve dbus message serial numbers
They are not used, so don't query them from libdbus.
2024-02-05 13:03:20 +00:00
Barnabás Pőcze
494e6ce70e pipewire: module-jackdbus-detect: do not autostart jackdbus
There is no need to start jackdbus via dbus service activation,
because this module is only interested in reacting to the jack server
starting/shutting down, it does not actually want to make use of jack
itself.
2024-02-05 13:03:20 +00:00
Barnabás Pőcze
542e6c652c pipewire: module-portal: watch only relevant NameOwnerChanged signals 2024-02-05 13:03:20 +00:00
Barnabás Pőcze
6e609c93e5 pipewire: module-portal: do not repeat portal service name 2024-02-05 13:03:20 +00:00
Barnabás Pőcze
dcb5430ff2 pipewire: module-jackdbus-detect: watch only relevant NameOwnerChanged signals 2024-02-05 13:03:20 +00:00
Barnabás Pőcze
3a20bcadba pipewire: module-rt: use dbus helpers 2024-02-05 13:03:20 +00:00
Barnabás Pőcze
91a9f816a7 pipewire: module-rt: get rid of unused DBusError
Nothing sets it, so it can be removed.
2024-02-05 13:03:20 +00:00
Barnabás Pőcze
e0ea0574f1 pipewire: module-jackdbus-detect: cancel pending dbus call on module destroy 2024-02-05 13:03:20 +00:00
Barnabás Pőcze
67375965b6 pipewire: module-jackdbus-detect: use dbus helpers 2024-02-05 13:03:20 +00:00
Barnabás Pőcze
499468c19f pipewire: module-portal: cancel pending dbus call on module destroy 2024-02-05 13:03:20 +00:00
Barnabás Pőcze
e7c9b26001 pipewire: module-portal: use dbus helpers 2024-02-05 13:03:20 +00:00
Barnabás Pőcze
4aa2e44796 spa: move dbus helpers out of bluez plugin
The file is moved into a new "include-private" directory. This is done
because otherwise adjustments would have to be made to the list of installed
headers, the way include tests currently work and which files are
used for generating documentation.
2024-02-05 13:03:20 +00:00
Pauli Virtanen
ddf3be0a39 bluez5: lc3: clean up some sanity checks
Fix some sanity checks and add mtu check.  Don't use
spa_return_val_if_fail here as it can spam stderr.

The buffer size check in codec_encode can't be hit.
2024-02-05 08:59:18 +00:00
Pauli Virtanen
61c585c8e6 bluez5: support Google's Opus A2DP vendor codec 2024-02-04 12:58:40 +02:00
Pauli Virtanen
ff0305dada bluez5: disambiguate the two Opus codecs 2024-02-04 12:57:31 +02:00
Pauli Virtanen
0c434e4821 bluez5: reset A2DP codec shared endpoint status on disconnect 2024-02-04 12:57:31 +02:00
Pauli Virtanen
45385b2b66 bluez5: SBC-XQ does not need its own endpoint
The endpoint caps are identical for SBC and SBC-XQ, so they can share
the same endpoint.

This reduces the number of registered endpoints by one.
2024-02-04 12:57:31 +02:00
Pauli Virtanen
c387506f63 client-node: clear buffers always when freeing mix
Avoid leaking buffers when freeing mix, in case the port was not cleared
properly.

These leaks don't seem to be occurring currently, but better be sure.
2024-02-04 12:40:34 +02:00
Pauli Virtanen
1196429c09 client-node: handle releasing mix for destroyed port
The remote end may destroy the port via client_node_port_update(),
before corresponding pw_impl_port_mix are released.

clear_port() removes all struct mix, but this prevents the
pw_impl_port_mix from being removed from io_map, which causes stale mix
ids be left in io_map, so we end up continuously allocating new io
areas.

Make lifecycle of io_map entries match port_init_mix/release_mix
exactly, separately from the lifecycle of the port and struct mix.

When freeing struct mix in port_release_mix(), make sure it corresponds
to the mix being released.
2024-02-04 12:40:34 +02:00
Pauli Virtanen
e90b2cb338 doc: add 'Configuration' page
Add pointer for readers to Wiki and WirePlumber docs, where the
documentation actually is at, so the configuration docs can found
starting from docs.pipewire.org
2024-02-04 10:29:39 +00:00
Wim Taymans
841c0189df stream: fix param emission for Props
Props set on the node directly should also result in emission of changed
notify when required, just like we do for params set on the port.

This accidentally used to be done because stream_update_params()
unconditionally used to emit this for us. But commit
94cde3090e changed that.

Fixes #3833
2024-02-04 11:04:23 +01:00
columbarius
bcf3cdc159 vulkan: Update logging in compute plugins
Use SPA_LOG_TOPIC_DEFAULT to name the log messages
2024-02-04 09:27:56 +00:00
columbarius
a1615fe6a3 vulkan: Add vulkan-blit-dsp-filter 2024-02-04 09:27:56 +00:00
columbarius
3e3a13c567 vulkan: Add vulkan-blit-filter 2024-02-04 09:27:56 +00:00
columbarius
c845338d81 vulkan: Add blit utils 2024-02-04 09:27:56 +00:00
columbarius
2b2e53ad90 vulkan: Return early in use_buffers
This fixes accesing a buffer in [1] when none is provided.

[1] 3f80bc2e70
2024-02-04 09:27:56 +00:00
columbarius
324ec9df15 stream: conditionally wrap video streams with adapter node
If the property video.adapt.videoconverter is set the video stream
will be wrapped with the videoadapter from the videoconvert spa plugin.

This allows testing the videoadapter and videoconverters while
preserving the current behaviour. Later the chack for this property can
be dropped.
2024-02-03 22:13:03 +01:00
Pauli Virtanen
805e5cf9c1 bluez5: show only codec profiles also for HFP/HSP
Don't show a "codecless" profile for HFP, similarly as we do for A2DP.

Simplify codec handling: for HFP/A2DP there's at most one transport for
each profile, so no need to check it has right codec.  There's also no
need for "fallback profile", we always just emit nodes for the transport
we find.
2024-02-03 16:10:12 +00:00
Pauli Virtanen
597116bb23 bluez5: backend-native: ensure we no transports are leaked
Make sure we don't leak transport even if remote sends invalid command
sequences.
2024-02-03 16:10:12 +00:00
Pauli Virtanen
f142c0a5b0 bluez5: ensure transport->codec is set also for HSP 2024-02-03 16:10:12 +00:00
Pauli Virtanen
823fb91756 mem: track fd invalidation of imported memblocks
When a memblock closes its fd, have it emit signal to other memblocks
possibly sharing the fd, so they know it is now invalid.

When a memblock has an invalidated fd, it'll not allow mapping more
memory, nor match against fd searches.

This avoids bugs where kernel fd reuse causes already invalid memblocks
to be used.  Generally, higher level code should make sure memblocks get
freed in right order so that this situation does not occur, but try to
keep mempool in consistent state regardless.
2024-02-03 15:58:22 +00:00
Sergio Costas Rodriguez
4d3658b271 snap-policy: fix memory leak
This patch fixes a memory leak when there is a snap with an
invalid ID.
2024-02-03 13:08:38 +00:00
Sergio Costas
fed1432172 snap-policy: ensure audio works with .deb snapd 2024-02-03 13:07:56 +00:00
Wim Taymans
16479acc60 alsa: fix version check
See #3711
2024-02-01 21:42:07 +01:00
Wim Taymans
d7e48f3042 module-pipe: resync when ringbuffer too full
When the ringbuffer has too much data, do a resync or else we would just
have a huge delay and would try to resample to get back to the target
fill level.
2024-02-01 16:00:25 +01:00
Wim Taymans
0bc7f3f48c module-pipe: warn underrun only once 2024-02-01 16:00:25 +01:00
Théo Lebrun
28df14859a pw-link: handle link proxy removal 2024-02-01 13:35:30 +01:00
Théo Lebrun
ecffe3cbd6 pw-link: handle link proxy destruction
If for some reason the proxy gets destroyed, we make sure to remove
listeners and forget the proxy pointer. We do not however delete the
target_link; we consider the proxy destruction as an error.

If another definitive state occured on the link (got to paused state,
got an error), then that event will be ignored. Else we consider it an
error.
2024-02-01 12:08:15 +01:00
Théo Lebrun
7ebc1b05d2 pw-link: --wait: allow linking with nodes
Previously, on new node event, we registered a core sync. Linking was
attempted at core sync done  but the node did not yet have time to
register its ports.

Only listen to new ports. This delays the linking attempt to when nodes
have had time to create their ports.
2024-02-01 10:47:49 +00:00
Théo Lebrun
6a7d83f051 pw-link: listen to link info events to detect link creation
Stop using sync for link creation detection. Instead, listen to link
events.

We still listen to errors, link info events are not enough. For example,
if a link already exists, we only get a proxy error and no link info
event.
2024-02-01 10:47:49 +00:00
Théo Lebrun
5169941908 pw-link: add --wait option
Now that we have a create_link_proxies() that looks for our matching
nodes/ports and creates proxies if they exist, implementing --wait is
easy.

We move the call to create_link_proxies() the core done event. If it
finds no potential nodes/ports, we keep running our loop, monitoring
new objects.
2024-02-01 10:47:49 +00:00
Théo Lebrun
54662ad209 pw-link: refactor do_link_ports() to not run the event-loop
Make do_link_ports() only create proxies. Previously it ran the event
loop once per attempted link to detect link creation errors. Rename it
to create_link_proxies() to make things clear.

Created proxies are stored into a list (data->link_targets).
create_link_proxies() returns the number of link proxies created. This
can be zero when the two matching nodes have zero ports.

Refactor main() to use create_link_proxies(), ask for a sync then run
the event loop. It will stop on sync done, and we will have received
all potential link proxy errors.

Cleanup all proxies and listeners at the end of main().
2024-02-01 10:47:49 +00:00
Théo Lebrun
e8d104f7bc pw-link: move output/input option checking before main event loop run 2024-02-01 10:47:49 +00:00
Wim Taymans
0b67c10a9c alsa: always reevaluate matching when driver changed
Always reevaluate the rate matching even when we did not change the
follower state.

It is possible that we were a follower from some node with the same
clock and now become a follower of a node with a different clock. The
follower state doesn't change but we need to activate the rate matching
logic in that case.

Fixes rate matching in pro audio (playback) when capture and playback
are moved to another driver.
2024-02-01 11:07:18 +01:00
Pauli Virtanen
db7b764bf2 bluez5: deprioritize AAC-ELD since it's untested
The AAC-ELD support was not properly tested on devices.  In theory it
should be OK, but it's untested.

Bump it down in priority so it won't be selected by default.
Also log info on FDK-AAC AAC-ELD support status.
2024-02-01 08:06:06 +00:00
Michael Tretter
c224010773 conf: escape @DEFAULT_SINK@
Variables enclosed with @ are replaced with the value of the variable.
The sink.name should remain @DEFAULT_SINK@.

Escape the enclosing @ to prevent substitution of DEFAULT_SINK with an
empty string while generating pipewire.conf.
2024-01-31 14:12:30 +01:00
Wim Taymans
07f7bda1fe jack: fix version check 2024-01-31 10:36:05 +01:00
Arun Raghavan
0c37adb665 module-rtp: Add some sender latency validation
Just a sanity check on config.
2024-01-30 21:26:14 +00:00