1
Fork 0
Commit Graph

11658 Commits

Author SHA1 Message Date
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
Wim Taymans f324f0e8e1 jack: optimize one buffer case
The normal case is using 1 buffer port port so we can avoid a
queue/dequeue pair of operations.
2023-11-22 13:20:52 +01:00
tytan652 33a3990c3c doc: fix xdg-desktop-portal documentation links 2023-11-21 21:25:13 +01:00
Pauli Virtanen c29d4d4ab7 meson.build: make pandoc optional
Skip only pandoc-requiring parts if it is not available.
2023-11-21 17:00:45 +00:00
Dorinda Bassey f4a56ad45d Fix some warnings
added cleanup of unused variables and fix warning about missing initializers
to resolve build warnings in pipewire-rs

Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
2023-11-21 16:32:51 +00:00
Wim Taymans e8c6c78982 jack: fix crash with fastpath debug
Don't deref p in the trace log because it can be NULL.
Don't try to dequeue a buffer when there are none. Improve some debug.

See #3632
2023-11-21 17:09:08 +01:00
Wim Taymans b3ee9942f6 jack: enunerate Latency only for DSP ports
We don't really include the other ports in the API.
2023-11-20 18:17:31 +01:00
Wim Taymans e4cee8eec2 libcamera: add latency param query
JACK queries this unconditionally but it's a good idea to implement this
like v4l2-source.
2023-11-20 17:51:27 +01:00
Wim Taymans 0fe7bd2780 jack: improve transport and times handling
Avoid reading from the activation directly to get cycle times but copy
the relevant fields of the clock when the cycle starts. Use the unique id
to get a consistent copy of the data.

This avoids some stay frames and values in jack_showtime.
2023-11-20 17:20:39 +01:00
Wim Taymans 49cdb468c2 alsa: also use interpolated time as nsec in IRQ mode
Don't use the current time as the nsec field in the graph clock because
it can jitter a lot. Instead, use the smoothed next_time, like we do
for timer based scheduling.

Since we track the current time against the rate converted ideal time,
lock on to the first timestamp when we reset the dll.

See #3657
2023-11-20 13:14:54 +01:00
Wim Taymans 0c857f5455 pulse-server: add stream/device state in dev_info
Also include and update the state of the device/stream in
collect_device_info so that we can compare it against the previous value
and emit a change event.

Fixes #3660
2023-11-20 11:39:31 +01:00
Pauli Virtanen 90bd9adb6b pulse-server: rename combine sinks option
Let's call it "sinks" in the docs, but keep the Pulseaudio name for
backward compat.
2023-11-20 08:41:13 +00:00
Pauli Virtanen 6d71fc637c man: add pipewire-pulse.conf.5
It mainly points to libpipewire-module-protocol-pulse(7) where the
documentation actually is.
2023-11-20 08:41:13 +00:00
Pauli Virtanen b60ef222c1 doc: man: add see also in pipewire-pulse 2023-11-20 08:41:13 +00:00
Pauli Virtanen fdcb02ed75 modules: add Module Name section to the module reference docs 2023-11-20 08:41:13 +00:00
Pauli Virtanen 843e733479 doc: add documentation for pipewire-pulse modules
Add (minimal) reference documentation for each pipewire-pulse module.

Add some preprocessing to substitute @pulse_module_options@ in docs from
PW_KEY_MODULE_USAGE so the module options don't need to be repeated.

Produce Doxygen docs + generate manpages pipewire-pulse-modules.7,
pipewire-pulse-module-*.7
2023-11-20 08:41:13 +00:00
Wim Taymans 0ae797ea28 client-node: handle port_buffers errors better
First check if all of the new buffers are ok before attemping to replace
our exising ones with the new ones. Else we might end up copying some
of the new buffers and cleaning them up twice later.
2023-11-20 09:36:02 +01:00
Pauli Virtanen 7cd242bffb CI: install pandoc for module manpage generation 2023-11-19 16:39:15 +00:00
Pauli Virtanen 21854f24a5 doc: generate man-pages also for pipewire modules
Use pandoc + some processing to convert Doxygen html output to man
pages.

Requires pandoc & python for building.

Generates manpages: libpipewire-modules.7, libpipewire-module-*.7
2023-11-19 16:39:15 +00:00
Pauli Virtanen 62f69581bf man: add pw-loopback.1 2023-11-19 16:39:15 +00:00
Pauli Virtanen 2ee4065c11 man: add pw-dump.1 2023-11-19 16:39:15 +00:00
Pauli Virtanen 77fad4ee13 doc: reorganize files
Separate various autogen files from the documentation .dox files.
Rename .dox files to match the intended tree structure.
2023-11-19 16:39:15 +00:00
Pauli Virtanen eca773fc12 modules: strip "PipeWire Module:" from Doxygen page name
Make them appear nicer in the output.
2023-11-19 16:39:15 +00:00
Pauli Virtanen 7f5f88c04a client-node: store mix in pw_map so that they are not copied
struct mix contain pointers to themselves (see do_port_use_buffers) and
cannot be copied by value, so they should not be stored in pw_array.

Store them in pw_map instead.
2023-11-19 18:03:36 +02:00
Wim Taymans 44bfeaac6e client-node: close fds in port_buffers() error case
When port_buffers are configured on a destroyed or invalid port, close
the fds or else we leak them.
2023-11-17 15:22:56 +01:00
Wim Taymans 7db1e7f643 0.3.85 2023-11-16 10:38:12 +01:00
Wim Taymans ca069974fc bluez5: avoid compiler warning 2023-11-16 10:35:33 +01:00
Wim Taymans aef99f840f Revert "gstpipewiresrc: break out of wait_started() also on STATE_UNCONNECTED"
This reverts commit 7465175ad0.

wait_started() is called before the stream is connecting and so
exits with an error immediately, which then makes the stream start
too early and block.
2023-11-16 09:51:11 +01:00
Jonas Holmberg 0ecc7ca5f5 module-rt: Remove RLIMIT_RTTIME while trying rt policy
Trying rt scheduling policy while RLIMIT_RTTIME is set could result in
SIGXCPU if the limit is exceeded. Set an infinite limit temporarily
while checking if rt policy is allowed.
2023-11-15 17:11:19 +01:00
Wim Taymans 92330b9de3 alsa: the default poll_descriptors is good now
Remove our custom poll_descriptors function because the default is
enough now that we update from revents.
2023-11-15 16:35:17 +01:00
Wim Taymans 266ef3b986 alsa: update pollfd from poll_revents() as well
Some clients don't call _poll_descriptors() before entering the poll and
so don't get updated fds. This would result in a whole bunch of wakeups
when the eventfd was set but the new state is no longer active.

Part of the problem is also that check_active() returns the desired new
state and update_active() does check_active() + update. We could be
getting into a new desired inactive state without updating the eventfd.
Improve this by merging them together into update_active() which only
writes/reads the eventfd when something changes.

This also makes things less heavy because the eventfd is only
read/written when needed.

Fixes #3648
2023-11-15 15:40:02 +01:00
Wim Taymans 0278695e7d modules: add tunnel.may-pause option for pipe-tunnel
To override the default may-pause behaviour of streams.
2023-11-15 13:02:08 +01:00
Wim Taymans 63385cedd0 modules: add pause support for pipe-tunnel
Streams are allowed to pause/resume when the pipe xruns.
Wait for IO_IN or IO_OUT when the ringbuffer xruns to resume playback or
capture.

Fixes #3197
2023-11-15 12:52:10 +01:00
Wim Taymans 179fbb51fc alsa: return 0 from successful resume
Don't return the value of the last snd_pcm_resume() call because that
might be -ENOSYS when resume is not implemented for the card and then
the non-error (because we used drop/prepare later) propagates and
logs an error.
2023-11-15 10:10:56 +01:00
Wim Taymans 0da4ea3b30 alsa: handle poll error
Recover after a poll error. This fixes resume after suspend.

Fixes #3646
2023-11-15 09:56:24 +01:00
Wim Taymans 443751bf16 alsa: remove err argument in alsa_recover()
We don't actually use it.
2023-11-15 09:55:58 +01:00
Wim Taymans 7b756c9090 alsa: improve debug 2023-11-15 09:55:36 +01:00
Wim Taymans 935093e4a2 jack: fix compilation with -UFASTPATH 2023-11-15 09:28:08 +01:00
Pauli Virtanen 43af0645b7 bluez5: set BAP QoS RTN correctly
Set QoS RTN according to values supported by server values.
2023-11-14 22:08:23 +02:00
Wim Taymans 142b660e7b modules: make better media.name for RAOP sink
Use the destination in the media.name so that it becomes unique and the
volumes can be restored per destination.

Fixes #3801
2023-11-14 15:06:42 +01:00
Pauli Virtanen de9086481f bluez5: media-sink: set node.group for ISO group nodes
It's better to schedule nodes in the same ISO group together, since they
are supposed to produce synchronized output.
2023-11-12 18:48:25 +02:00
Pauli Virtanen 17c583bbe7 bluez5: iso-io: get proper group id for broadcast 2023-11-12 18:48:25 +02:00
Pauli Virtanen b2e58198cc bluez5: make iso_io ISO groups transport-specific
Different BT adapters have separate ISO groups, so we should schedule
them separately.
2023-11-12 18:22:15 +02:00
WalkerGriggs 03b1d9589b
modules: Check for opus custom functions in addition to headers 2023-11-10 09:57:53 -08:00