1
Fork 0
Commit Graph

11851 Commits

Author SHA1 Message Date
Wim Taymans a532c2abdb acp: add support for hiding profiles and ports
api.acp.hidden-ports and api.acp.hidden-profiles can be used to pass
a json array of ports and profiles to hide. They will not show and
will not be selectable.
2023-11-30 17:40:48 +01:00
Wim Taymans 85a9e30908 alsa: clamp buffer_frames correctly
Don't try to multiple the max_buffer_size with the frame scale or else
we might try to set a min_buffer_size larger than the max_buffer_size.

Instead, use the frame_scale only to scale the quantum_limit and then
clamp against the max_buffer size.

See #3000
2023-11-30 13:28:16 +01:00
Wim Taymans 4e1b10073a alsa: handle period events
When the period events are enabled, we need to wake up whenver there is
a period elapsed. Otherwise, we only wake up when there is avail_min.

Fixes #3676
2023-11-30 12:05:41 +01:00
Wim Taymans 94f898ddc5 stream: check requested before use
It can be 0 and so we should fill the complete buffer.

Fixes #3683
2023-11-30 11:10:47 +01:00
Wim Taymans 0a7f8128a3 stream: don't confuse frames/samples in docs
See #3683
2023-11-30 11:10:19 +01:00
Wim Taymans 6c772a1843 module-pulse-tunnel: don't block the main thread
Do the pulse context and stream connect async so that we don't have to
block the main thread.

Fixes #3221
2023-11-30 10:42:48 +01:00
Thomas Weißschuh 6ae9698ebc pipewire: mem: try to create non-executable memfds
Executable memfds can be a security issue.

The kernel warns about them like the following:
pipewire: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set

Explicitly create all memfds a non-executable as they are not meant to
be executed, similar to the other possible backing filetypes.
2023-11-29 17:59:14 +00:00
Pauli Virtanen 9fdf221705 doc: internals/access: update documentation vs current state
Update docs to match implementation.
2023-11-29 18:51:35 +02:00
Pauli Virtanen 08a4590070 module-access: recognize "allowed" as legacy alias for "unrestricted"
Previously, it was an alias for "unrestricted" so support that still if
access.legacy=true.
2023-11-29 18:44:49 +02:00
Frédéric Danis 442a208382 Bluez5: backend-native: HSP AG release SCO link on AT+CKPD=200
Bluetooth PTS test HSP/AG/ACR/BV-01-I request AG to release the SCO link
upon reception of AT+CKPD=200 reception
2023-11-29 15:43:22 +00:00
Arun Raghavan c2e4e336ac alsa: Correctly bail if pitch ctls are not available
The `goto error` got misplaced while refactoring this code for
bind-ctls.
2023-11-29 15:41:24 +00:00
Dmitry Sharshakov ac3bdeba4e aes67: bump PTP0 driver priority
As reported in #3217, PTP driver has to have the highest priority for packets to arrive in time

Everything connected to AES67 should be clocked by the Grandmaster clock
2023-11-29 15:40:32 +00:00
Wim Taymans 1a83ce0908 module-loopback: improve channel remapping support
Convert capture and playback streams to any global channel position that
has been set. This can then be used to implement an upmix sink and add
such an example config.
2023-11-29 16:07:54 +01:00
Wim Taymans 088d741cda stream: notify caller of partial set_param success
When we get a Format update during a Format set_param, return > 0 to the
caller so that it knows we modified the param to something else.

This can be used to fixate or deny updates to Format params in the
stream and have the adapter adapt to this.
2023-11-29 15:06:05 +01:00
Wim Taymans b9e5dde4ac client-node: keep target fd up to date
Keep the target and source fd in sync when we get the new fd from the
server in remote-node.

This makes it possible to refactor some things and only schedule nodes
by triggering the target.
2023-11-28 16:23:00 +01:00
Aleksandr Melman be17edbcfd po: Update Russian translation 2023-11-28 11:33:57 +00:00
Pauli Virtanen b12119da28 pw-reserve: require valid name + check rd_reserve_new errors
Empty name in rd_device_new triggers assert inside DBus, so bail out
before that.
2023-11-28 10:26:43 +00:00
Pauli Virtanen 422c270a74 meson.build: fix compile with -Dexamples=disabled 2023-11-28 10:18:25 +00:00
Wim Taymans 9daca346a7 jack: allow OSC messages inside JACK MIDI
Some JACK clients place OSC messages in MIDI buffers. Try to detect the
OSC messages and mark the control as OSC.

Also allow OSC control to be converted to JACK MIDI.

This should make things work better with native PipeWire clients that
handle MIDI and OSC.
2023-11-27 17:00:39 +01:00
Wim Taymans eca1f5685e alsa: place defaults in properties as fallback
We place the currently configured runtime settings in the properties but
clear the values when not negotiated. Don't do that but place the
defaults (when set) instead.
2023-11-27 16:20:21 +01:00
Wim Taymans 4debdcd40b 1.0.0 2023-11-26 09:02:52 +01:00
Pauli Virtanen 53601d44a6 doc: internal/protocol: explain registry generation and protocol footers 2023-11-25 18:39:25 +02:00
Pauli Virtanen ffa52fdbc1 meson.build: separate options for installing man pages or docs 2023-11-25 00:14:18 +02:00
Pauli Virtanen d0ec322434 meson.build: set install tags on doc/man
These are predefined names in meson
2023-11-25 00:13:59 +02:00
Wim Taymans 2af5a90c90 evl: add fds to pollfd from rt thread
When we don't have the thread id yet, don't add the pollfds yet
but wait until we do our first wait operation.

Use flags for eventfd. We can use this to communicate between all kinds
of threads with read/write.

Use evl_init() in the init function, don't attach the main loop, just
the thread that dos the first poll.
2023-11-24 11:58:28 +01:00
Wim Taymans a336aabe43 stream: pass properties to context_new
Whe  using pw_*_new_simple(), pass the properties to the automatically
created context as well so that we can configure it.

This makes it possible to, for example, load the client-rf.conf using the
simple API as well.
2023-11-24 10:12:49 +01:00
Pauli Virtanen f14572648a bluez5: deal with too small Supported_Max_Codec_Frames_Per_SDU
Some devices appear to set Supported_Max_Codec_Frames_Per_SDU == 1 while
claiming they support two channels per stream, which is then not
possible.

In this case, limit the number of channels by the number of frames per
SDU when selecting.

Also adjust PAC sorting.
2023-11-23 17:47:55 +00:00
Pauli Virtanen f327ed845f bluez5: add some debug to bap-codec-lc3
We don't want to dump on all calls to codec_select_config, so use debug
context.
2023-11-23 17:47:55 +00:00
Barnabás Pőcze d88def09bd pipewire: module-roc-{sink,source}: add rudimentary ROC_INTERFACE_AUDIO_CONTROL support 2023-11-23 17:21:39 +01:00
Barnabás Pőcze b19d0ffbc3 pipewire: module-roc-source: use `SPA_NSEC_PER_MSEC` instead of hard-coding 2023-11-23 15:12:50 +01:00
Barnabás Pőcze b5e898ee83 pipewire: module-roc-{sink,source}: do not remove from argument property list
The property list is destroyed and not kept around, not passed
to any other component, so this is unnecessary work.
2023-11-23 15:12:50 +01:00
Barnabás Pőcze 68c0a13694 pipewire: module-roc-{sink,source}: pass 0 to `pw_properties_get_uint32()`
There is no reason to use `data->rate` as the default value
since it will be zero, so just pass 0 explicitly.
2023-11-23 15:12:50 +01:00
Barnabás Pőcze 0a3bd825cd pipewire: module-roc-{sink,source}: remove `props` member
The `props` member was not used at all, so get rid of it.
2023-11-23 15:12:47 +01:00
Barnabás Pőcze 6d8a31a3e4 pipewire: module-roc-{sink,source}: deduplicate protocol selection 2023-11-23 14:12:35 +01:00
Barnabás Pőcze 333fd8d2ae pipewire: module-roc-{sink,source}: port to ROC v0.3.X
ROC 0.3 introduced breaking changes, so adjust the code.
Also set the minimum supported ROC version to 0.3.0.

Fixes #3667
2023-11-23 14:12:35 +01:00
Barnabás Pőcze 5d62bf5c06 pipewire: daemon: do not set `G_LOG_DOMAIN`
GLib has not been used for logging for a long time,
so setting this macro has no effect and is unnecessary,
so remove it.
2023-11-23 11:57:45 +00:00
Wim Taymans c59820493f docs: add some more doc about the threads 2023-11-23 12:32:35 +01:00
Wim Taymans c4cd8fa73d impl-client: don't log warning when updating ignored keys
If a client tries to update an ignored key, don't log a warning. Only
log a warning when one of the security properties changed.

This is what we used to do before commit
0dfa05117b

It fixes a warning when a stream disconnects and reconnects because
the serial.id changed.
2023-11-23 12:29:55 +01:00
Wim Taymans 900f653860 docs: add some more docs 2023-11-23 10:21:08 +01:00
Arun Raghavan 63bb128948 rtp-stream: Set rtp.ptime on senders not receivers
The pw_stream direction is inverted from what we want (input => sender).
2023-11-23 01:28:20 -05:00
Barnabás Pőcze aa681365c3 pipewire: module-filter-chain: fix buffer memory leaks
`impl::{silence_data,discard_data}` were not freed either
in case of an initialization error or graceful shutdown.
2023-11-23 05:50:17 +00:00
Barnabás Pőcze 2738bb4cb7 pipewire: remove `pw_in_valgrind()`
This function is very much orthogonal in function to the usual
features provided by pipewire, and there does not seem to be any
3rd party users based on Debian Code Search and GitHub.
So let's remove it before any 3rd party users start depending on
pipewire for their valgrind detection.
2023-11-22 23:05:03 +01:00
Barnabás Pőcze 3deaa2b0df pipewire: impl-module: respect `PIPEWIRE_DLCLOSE`
Commit b5c21c1fbc ("pipewire: use dlclose unless PIPEWIRE_DLCLOSE is set to false")
introduced the PIPEWIRE_DLCLOSE environmental variable to
force/prevent the dlclose()ing of shared objects. However,
native pipewire modules were not adjusted to respect its value,
and instead have been still using `pw_in_valgrind()` to
determine whether or not they should be unloaded.

Fix that by adding a private `pw_should_dlclose()` function
and using that in impl-module.c:pw_impl_module_destroy().
2023-11-22 22:58:00 +01:00
Pauli Virtanen a3e86f1733 CI: bump fedora to 39
Needed to get new enough Doxygen version.
2023-11-22 20:10:49 +02:00
Pauli Virtanen 0fbcc87314 doc: make all manpages with Doxygen
Use (fixed-up) Doxygen manpage output for all program & module manpages.

This also allows formatting the manual pages properly in the HTML docs.

The Markdown pages work properly only with Doxygen >= 1.9.7, older
versions put them to wrong place in the HTML docs.
2023-11-22 20:10:49 +02:00
Wim Taymans de954655bc modules: fix doc 2023-11-22 17:48:05 +01:00
Arun Raghavan dec1102574 alsa: Move ctl sources to a main loop
It doesn't make sense to hang these on the data loop, so let's have
these on the main loop instead. Also avoids a potential crash while
removing them (since removal happens on the main loop and the data loop
might be polling while we're doing the remove).
2023-11-22 16:00:25 +00:00
Wim Taymans bb82ddb601 Fix a warning
../src/modules/module-rt.c:615:21: warning: suggest parentheses around
assignment used as truth value [-Wparentheses]
2023-11-22 16:17:08 +01:00
Wim Taymans 3376b96f2a jack: handle concurrent jack_port_get_buffer()
Ardour calls jack_port_get_buffer() from multiple threads. For audio
buffers this will result in mixing the input samples into the target
buffer and there is no window for having a corrupt buffer.

For MIDI, there is a problem because we need to convert from and to
PipeWire MIDI and while we do that from multiple threads, the midi
buffer can be incomplete or corrupt.

Fix this by building the intermediate POD to a thread-local scratch area
and then copy it to the target buffer. If this is done from multiple
threads there is no moment where incomplete data can be seen in the
target buffer.

Make the complete midi-scratch buffer thread_local so that we also avoid
a race when converting midi data from a foreign port.

When we write into the scratch buffer when mixing and converting input
midi data, we also avoid a race there.

Fixes #3632
2023-11-22 16:16:30 +01:00
Jonas Holmberg 72323dcaf3 module-rt: Protect setrlimit() with mutex
Make sure threads initializing the module doesn't get/set RLIMIT_RTTIME
simultaneously.
2023-11-22 13:56:15 +00:00