Commit graph

7061 commits

Author SHA1 Message Date
Nils Tonnätt
761fa6f59d meson: fix meson test without building pipewire before
This adds project internal dependencies to some tests to let all
tests succeed. It is not adding all dependencies those tests actually
need.
2021-08-04 20:38:30 +02:00
Wim Taymans
4841156b74 doc: clarify JSON usage
Mention that the config format can be pure JSON or with some
simplifications and additions.
2021-08-04 11:47:31 +02:00
Torkel Niklasson
02b4ccd782 src/pipewire/impl-node.c: Change client err/warn logs to infos
xrun, client too slow and that the client missed wakeups is not a
critical issue for us, so we patch them to be infos instead of
warnings and errors.
2021-08-04 09:37:29 +00:00
Peter Hutterer
f0baffbc84 doc: ignore SPA_EXPORT and SPA_PRINTF_FUNC
This caused doxygen to include a rather random assortment of variables
and link to them from various pages (e.g. "arg", "res", "buffer", NAME,
etc.)
2021-08-04 07:49:53 +00:00
Peter Hutterer
3ced15ad22 doc: some extra docs for the core objects 2021-08-04 07:49:53 +00:00
Peter Hutterer
5561531751 doc: document the core/implementation API split a bit better
Still missing a proper review of the linked objects, but at least this
now explains why those two are split.
2021-08-04 07:49:53 +00:00
Peter Hutterer
3370a56e3e doc: move the error reporting blurb to the library page
Let's keep the daemon page higher-level and leave API behaviors
elsewhere.
2021-08-04 07:49:53 +00:00
Peter Hutterer
710caf9d75 doc: fix a subsection name 2021-08-04 07:49:53 +00:00
Peter Hutterer
4c760e473d doc: add a nice graph to illustrate how the daemon a bit 2021-08-04 07:49:53 +00:00
Peter Hutterer
13ffc549c9 doc: add basic docs for the session manager 2021-08-04 07:49:53 +00:00
Peter Hutterer
d0060fbddd test: move the client and utils tests over here 2021-08-04 07:45:06 +00:00
Peter Hutterer
99a10c1606 protocol: assert if the loop initialization fails on the connection test
This test needs an environment set up to load everything correctly,
running it directly results in a segfault. Let's make sure we assert on
a NULL loop to make this look slightly more planned.
2021-08-04 15:43:10 +10:00
Wim Taymans
c6dc7e98fd dbus: protect against NULL data
Make sure we don't accidentally unref a NULL data.
2021-08-03 19:11:15 +02:00
Daniel Stone
bf112940d0 spa: Only test __cplusplus value when it's defined
In higher warning levels, clang complains about testing the value of
__cplusplus when it's not defined.
2021-08-03 15:43:59 +00:00
Wim Taymans
99359c3998 jack: use port_set_mix_info
Use the port_set_mix_info event to get the id of the peer port for the
mixer input.

When asked for the buffer of one of those peer ports, we can get it from
the mixer input buffers.

Fixes #1471
2021-08-03 17:39:14 +02:00
Wim Taymans
bba8c5daa3 client-node: add port_set_mix_info
Add a new client-node port_set_mix_info event. bump the interface
version to 4 and the event version to 1.

The event is used to send information about the peer object to the
port mixer. This can be used to track what buffers belong to what
peer.
2021-08-03 17:36:11 +02:00
Wim Taymans
62f8ffcfb2 impl-link: put the peer_id in the mix
Place the global id of the peer port in the mix so that we can track
the peer object that way.
2021-08-03 17:33:49 +02:00
Wim Taymans
f4048ae663 protocol-native: fix marshal of add_port
We need to terminate the arguments with NULL.
2021-08-03 17:30:08 +02:00
Wim Taymans
edfa210656 protocol: also return marshal with higher version
The marshaller needs to be of the requested version or newer.
2021-08-03 17:28:01 +02:00
Wim Taymans
d25bb0e20f impl-link: reset state in INIT
When the link state goes back to init, clear any pending operations and
reset our state.
2021-08-02 18:03:26 +02:00
Wim Taymans
da8f835de3 context: after suspend, reevaluate the graph
Reevaluate the graph again after we potentially suspend because of a
rate change because links might become unprepared and need to be
prepared again before the node becomes active.
2021-08-02 17:31:01 +02:00
Wim Taymans
48f7218d03 context: improve debug 2021-08-02 17:30:40 +02:00
Wim Taymans
57cbd2e963 impl-link: handle port states going backwards
When the port state goes backwards (like when suspended) update
the link state accordingly.
2021-08-02 17:28:16 +02:00
Wim Taymans
7d9dde0a1d loopback: pass all latency to the other stream
Latency configured on one streams needs to be passed directly to the
other stream.
2021-08-02 11:46:53 +02:00
Wim Taymans
f71529cbaf context: add missing link prepare
It got removed accidentally in a previous commit, breaking some of the
loopback devices.

Fixes #1472
2021-08-02 10:48:42 +02:00
Peter Hutterer
fc85b33e80 doc: drop the header priority in media-session.dox
This way the two subheaders won't show up in the sidebar
2021-08-02 08:27:51 +00:00
Peter Hutterer
c9506a8597 doc: basic documentation for the logind media-session module 2021-08-02 08:27:51 +00:00
Peter Hutterer
310b4611c8 media-session: add stub docs for all media-session modules
Same basic approach as for the pipewire modules
2021-08-02 08:27:51 +00:00
Peter Hutterer
6d7e90fca2 meson: add the media-session logind sources to the media-session sources
This way the media_session_sources variable contains all source files we
build (required by the documentation build).
2021-08-02 08:27:51 +00:00
Peter Hutterer
602bed7a98 doc: add minimal documentation for the alsa endpoint SM module 2021-08-02 08:27:51 +00:00
Peter Hutterer
c2fef6caa2 doc: format the objects design page
Mostly replacing the lists so they actually render as lists
2021-08-02 08:27:51 +00:00
Peter Hutterer
25d15765b7 doc: better output formatting for the midi page 2021-08-02 08:27:51 +00:00
Peter Hutterer
8d39940350 doc: some more polishing of the access docs 2021-08-02 08:27:51 +00:00
Peter Hutterer
436eefc625 alsa-endpoint: add a FIXME for some missing code
We call setup_alsa_ucm_endpoint() before the
setup_alsa_fallback_endpoint(), but this function always returns
-ENOTSUP. Add a FIXME comment to make this more obvious.
2021-08-02 08:27:51 +00:00
Peter Hutterer
51a177eb6d tree-wide: replace strstr(a, b) == a with spa_strstartswith()
spa_strstartswith() is more immediately understandable.

Coccinelle spatch file:
	@@
	expression E1, E2;
	@@
	- strstr(E1, E2) != E1
	+ !spa_strstartswith(E1, E2)

	@@
	expression E1, E2;
	@@
	- strstr(E1, E2) == E1
	+ spa_strstartswith(E1, E2)

Applied to the tree except for alsa/acp/compat.h because it looks like
that header is still mostly as-is from PA.
2021-08-02 08:24:21 +00:00
Rafael Fontenelle
60c510d766 Update Brazilian Portuguese translation 2021-08-01 20:07:57 +00:00
Wim Taymans
1ff208875c context: implement dynamic rate
Add a default.clock.allowed-rates property that lists the possible
rates for the graph.

Add node.rate and node.lock-rate properties to suggest a graph rate
and lock the rate.

Collect the largest clock rate from the nodes and if it is allowed,
try to configure it as the graph rate. Only switch rates when the
driver is IDLE or suspended or when we force a rate.

No alternative samplerates are specified because we first need to
work around a common driver bug (cards with 1 cristal need the same
rate for capture as playback) for this to work.
2021-07-30 16:15:34 +02:00
Wim Taymans
8375d7b2d7 impl-node: remove unused function 2021-07-30 11:57:52 +02:00
Wim Taymans
6acf72dc30 impl-node: rework quantum and max_quantum handling
Rework the quantum and max_quantum handling. Work directly with the
latency fractions and calculate the final quantum size until we know
the samplerate.
2021-07-30 11:42:15 +02:00
Wim Taymans
7bec96640c node: add node.lock-quantum property
The graph will not switch quantums when there is an active node
with the node.lock-quantum property set to true.

It can be used to stop certain jack clients from crashing when the
quantum changes.
2021-07-30 11:42:15 +02:00
Huang-Huang Bao
9f2d6d6d28 bluez5: fix rounding error on hardware volume conversion
Ensure the conversions between spa_bt_volume_linear_to_hw and spa_bt_volume_hw_to_linear are reversible when
operating on hardware volume.
2021-07-30 08:46:14 +00:00
Simon Ser
73217818cc spa: document enum spa_video_format
References: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1470
2021-07-30 07:29:44 +00:00
Peter Hutterer
6989b24148 pulse-server: fix json comma handling
First was never set to false, so we kept skipping the commas.

Fixes 393f3e6d05
2021-07-30 07:29:11 +00:00
Peter Hutterer
b6a8f67764 module-portal: use spa_atoi32 for safer PID parsing 2021-07-30 07:24:24 +00:00
Peter Hutterer
82e427745d doc: structure the portal documentation a bit better 2021-07-30 07:24:24 +00:00
Peter Hutterer
0261b78870 doc: expand the module doc a bit
Makes it feel slightly more complete, even if the example modules are
currently undocumented.
2021-07-30 07:24:24 +00:00
Peter Hutterer
c753f45598 doc: remove the PipeWire prefix from the nested pages
They're structured below PipeWire in the doxygen output, so we don't
need this as part of the header.
2021-07-30 07:24:24 +00:00
columbarius
06b03aef57 example: check which endian sdl is using
enum spa_video_format uses explicit big endian, while sdl can be either.
We need to adapt the convertion table accordingly.
2021-07-30 07:23:55 +00:00
Simon Ser
6773ea7e5e doc: add DMA-BUF docs 2021-07-29 19:18:49 +00:00
Wim Taymans
393f3e6d05 pulse-server: align format to pulseaudio json message format
PulseAudio uses json now as the message format. Reformat our output
and parse our input accordingly.
2021-07-29 20:55:44 +02:00