Commit graph

12184 commits

Author SHA1 Message Date
Wim Taymans
4ab3ab6081 impl-device: set quantum-limit correctly
Pass the quantum limit also to the main node.
2024-02-13 15:55:07 +01:00
Wim Taymans
5a37c97f3d alsa: allow setting profile by name 2024-02-13 15:37:10 +01:00
Wim Taymans
1dc822c999 impl-device: add support for adapter
Make it possible to wrap nodes created by a device in a wrapper such
as adapter.

Update the minimal.conf to use udev to detect and configure devices and
nodes. Add a config switch to switch back to hardcoded config.
2024-02-13 12:03:53 +01:00
Wim Taymans
c08c335264 impl-device: add device.object.properties
Instead of copying all the device properties to the child object,
only copy the ones in device.object.properties and add the
ones from the object info.

Clean up the object handles when something goes wrong.
2024-02-13 11:37:21 +01:00
Wim Taymans
ee5e1a92be impl-device: add device.id to objects
Add the device.id to the objects created from this device.
2024-02-13 10:01:02 +01:00
Wim Taymans
490d540177 modules: avoid invalid properties access
pw_spa_node_load() takes ownership of the properties so we must not
access it it afterwards, so make a copy of it.
2024-02-12 17:53:44 +01:00
Wim Taymans
513e8fa56f adapter: move adapter.auto-port-config to adapter
Move the handling of the default adapter port config to the adapter
itself.
2024-02-12 17:24:22 +01:00
Wim Taymans
efd22efff8 pw-link: improve port and node names
don't leave the port and node names blank but fill in some defaults that
include the node/port id.
2024-02-12 17:14:33 +01:00
Wim Taymans
532bc878f4 spa: use errno values in warnings
Propagate the errno values from syscalls and use them in the warning
messages to give info about what is going on.
2024-02-12 10:01:22 +01:00
Dimitrios Katsaros
8f59508ecb metadata: Added context monitor for removed globals
impl-metadata would not monitor for globals being removed.
This would cause stale metadata to remain in the
store, causing future objects on the same ids to have invalid data.
2024-02-12 08:40:49 +00:00
Dimitrios Katsaros
17e6a0709b metadata: handle removed globals in impl 2024-02-12 08:40:49 +00:00
Dmitry Sharshakov
bb2f793598 node-driver: suggest user to check clock device permissions 2024-02-12 08:14:10 +00:00
Gleb Popov
0ff7b1464d Use portable shebang in input-filter-h.sh 2024-02-10 20:52:35 +03:00
Gleb Popov
571fa73455 Fix uninitialized variable usage 2024-02-10 20:52:31 +03:00
Gleb Popov
d2750420c6 Fix build of vulkan/dmabuf_fallback.c 2024-02-10 20:52:25 +03:00
Gleb Popov
6b73cc15da FreeBSD compatibility for module-rtp-sap 2024-02-10 20:52:20 +03:00
Gleb Popov
4ea02f5c80 Fix building module-netjack2 on FreeBSD 2024-02-10 20:52:15 +03:00
Barnabás Pőcze
84699032be spa: alsa: react to "new" udev action as well
Previously, only "change" and "remove" were considered.
2024-02-09 18:32:53 +01:00
Barnabás Pőcze
ad975c93ee spa: alsa,v4l2: avoid double access check on inotify events
Previously both `impl_on_notify_events()` and `process_{device,card}()`
called `check_access()`. Avoid that by merging `ACTION_ADD` and
`ACTION_DISABLE` into a single `ACTION_CHANGE` and let `process_{device,card}()`
call `check_access()` and decide what to do.
2024-02-09 18:32:53 +01:00
Barnabás Pőcze
0158b5dcb6 spa: v4l2: handle IN_IGNORED events from inotify 2024-02-09 18:32:53 +01:00
Barnabás Pőcze
69f9e75458 spa: alsa,v4l2: avoid double lookup on inotify events
Split up `process_{device,card}()` to have a separate function that does
the lookup based on the udev device, and only use that when there is
no available reference to the actual device/card object.
2024-02-09 18:32:53 +01:00
Barnabás Pőcze
57a5417703 spa: v4l2: use proper log topic in udev monitor 2024-02-09 18:32:53 +01:00
Barnabás Pőcze
5fa34988fa spa: alsa,v4l2: use proper enum for action
An enum provides better debugging experience
and makes the source code easier to grasp.
2024-02-09 18:32:53 +01:00
Barnabás Pőcze
04b8a0c215 spa: alsa: handle IN_IGNORED instead of IN_DELETE_SELF
`IN_IGNORED` event is sent whenever the watch is removed,
which includes when the entity is deleted among other things,
so watch that instead of the more specific `IN_DELETE_SELF`.
2024-02-09 18:32:53 +01:00
Barnabás Pőcze
18cfb808bd spa: alsa,v4l2: simplify inotify read loop exit condition
The removed condition is strictly a subset of the condition
that is checked one line below, so remove it.
2024-02-09 18:32:53 +01:00
Barnabás Pőcze
66c7966b75 spa: v4l2: remove ignored flag
Nothing sets it.
2024-02-09 18:32:53 +01:00
Julian Bouzas
64eaaf27ab pw-dot: fix modules not being linked correctly
This fixes a regression caused by commit 0b5cdf3f
2024-02-09 10:54:21 -05:00
Julian Bouzas
02050ae812 pw-dot: support properties with quotes
If a pipewire property has quotes, the DOT graph fails to be generated because
they are not escaped. This patch fixes this by escaping the quotes from a
pipewire property value before adding it to the graph
2024-02-09 14:46:40 +00:00
Julian Bouzas
0b5cdf3fd8 pw-dot: improve allocation of the DOT data string
This changes avoids constantly reallocating the DOT data string every time
someting is added. We now always allocate a DOT data string of size 2048, and
we only reallocate by size * 2 if we need more data.
2024-02-09 14:46:40 +00:00
Demi Marie Obenour
30419c37df Ensure all globals have PW_KEY_OBJECT_SERIAL prop
This avoids the caller having to set this property.
2024-02-09 14:45:05 +00:00
Wim Taymans
ac28abbadf metadata: handle removed globals as well
When we remove a global, we set NULL,NULL,NULL as its metadata. This
then results in the implementor of the metadata to emit the property
change event for the subject.

When we decide to propagate this event to the listeners we not only
need to check if the client can see the global but also if the global
was removed and this is a remove metadata event.

Fixes metadata remove events when a global is removed.
2024-02-09 12:50:46 +01:00
Wim Taymans
27dbbd40c9 tools: improve indentation 2024-02-09 10:24:34 +01:00
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