Commit graph

12202 commits

Author SHA1 Message Date
Wim Taymans
858d4e9e1c buffer: add MAPPABLE data flag
Add a MAPPABLE data flag that hints that the fd in the data is mappable
with a simple mmap/munmap. Normally, DmaBuf is not mappable like that
unless explicitly indicated with this flag.

Set the MAPPABLE flag on the DmaBuf from v4l2 and libcamera fd.

When asked, mmap the buffer memory in all cases when the MAPPABLE
flag is set.

This solves the case where v4l2 has exported DmaBuf and is streaming to
node A and then node B links but doesn't get automatically mmaped
memory.

Fixes #3840
2024-02-08 18:09:08 +01:00
Jonas Holmberg
4715fa1775 module-rtp: Add source/destination.ip to props
Make it possible to change source.ip in module-rtp-source and
destination.ip in module-rtp-sink.
2024-02-08 09:30:58 +00:00
Dimitrios Katsaros
e84184f28f Jack: Added missing lock to jack API call 2024-02-08 10:20:12 +01:00
Wim Taymans
0ea736e144 protocol-native: use props in server and data
Add props to the protocol_data and server. Instead of storing the
server_info, just add the relevant properties for the server to the
props.

When we get a new client, we can simply copy the server props to the
client props. This makes it possible to create specific servers later
that create clients with specific properties.

Use a subset of the context properties to create servers. We only need
the CORE_NAME for now.
2024-02-08 09:53:13 +01:00
Wim Taymans
92f6239597 protocol-native: set error when add_event fails 2024-02-08 09:48:33 +01:00
Wim Taymans
0594b3ac82 metadata: fix indentation 2024-02-08 09:42:13 +01:00
Dimitrios Katsaros
44b8a03c40 Jack: Fix jack_remove_property(ies) to use proxy id
These functions were using the object serial as the object id
2024-02-07 14:46:48 +01:00
Wim Taymans
1de71d96c6 v4l2: include config.h to check for udev 2024-02-06 22:41:54 +01:00
Wim Taymans
1b6370ace1 meson: fix compilation when spa-plugins is disabled
Fixes #3811
2024-02-06 11:50:54 +01:00
Wim Taymans
b4c7973d49 meson: fix build with missing libudev-devel 2024-02-06 11:49:40 +01:00
Wim Taymans
cb2b7af8fd tutorial: fix s16 scale and add some docs
The float -> s16 scale value is 32767 or 32768 with clamping. Fix this
and add some docs.

Fixes #3838
2024-02-06 11:38:29 +01:00
Wim Taymans
8657caa0ac pw-cli: set quit flag on -EPIPE
When the server closes the connection in non-interactive mode, we need
to set the quit flag to avoid going into second mainloop_run() that will
just block forever.

See #3837
2024-02-06 11:10:27 +01:00
Wim Taymans
eb33145691 loop: fix clang compilation 2024-02-05 23:16:36 +01:00
Barnabás Pőcze
0b87144d26 spa: bluez: fix whitespaces 2024-02-05 20:01:21 +01:00
Barnabás Pőcze
5bb2224da3 pipewire: module-rt: add missing static 2024-02-05 20:01:21 +01:00
Barnabás Pőcze
a834da988c spa: support: add missing static 2024-02-05 20:01:21 +01:00
Wim Taymans
e7e6742200 loop: sleep and retry when the invoke queue is full
When the invoke ringbuffer is full, sleep a little and try again.
Add an option to set the retty timeout, setting this to 0 restores
the old behaviour of returning -EPIPE.

Most callers don't check the return values and might assume the invoke
call is queued or executed, which could cause crashes or leaks.

When the queue overruns, it's better to log a warning and hope that the
problem is resolved soon. We might abort or return the error to the
caller later if we want to break the retry loop.

See !1887
2024-02-05 19:44:02 +01:00
Pauli Virtanen
83050e647b bluez5: aptx-ll: produce 7.5ms packets
Put a bit more samples to packets to make it more robust.  The 7.5ms
interval may also fit better with other BT devices.
2024-02-05 19:34:47 +02:00
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