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.
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.
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.
Rework the quantum and max_quantum handling. Work directly with the
latency fractions and calculate the final quantum size until we know
the samplerate.
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.
libfreeaptx is a fork of libopenaptx prior to the dubious licensing
situation was introduced to the library.
As it's fully API compatible, let's use that instead for those who
want to use aptX support.
The library source is available at https://github.com/iamthehorker/libfreeaptx
Hard rate changes (the default now) makes the graph suspend so that the
driver reopens the device with the new sample rate if possible. This
causes a glitch.
Soft rate changes works as before and just changes the clock rate of
the position area, which makes everything resample things to the new
rate without a glitch.
Sample rate changes can currently still only be triggered by
configuring the settings metadata clock.force-rate
We don't need to follow nodes that we already visited or that are
inactive so skip them early.
Always try to prepare the link otherwise, not only for passive links
because non-passive links might also be paused because of a suspended
driver.
We only ever want to prepare a link between active nodes so add the
check in the _prepare() functions instead. This also makes it skip
the prepare step for inactive nodes when recalculating the graph.
This adds a new top-level documentation entry for pipewire-media-session
with a list of modules (currently only one). Similar setup to the
pipewire modules, it allows us to document all modules in-place.
This is a good first (top) page to have in the docs, let's move it out
from the pipewire heading.
This doesn't change any of the links and the renaming isn't required
(subpage controls whether it's a top-level item and the meson.build
order decides its spot in he list). Still, better to have the filenames
represent the layout.
Add a DONT_FIXATE flag to spa_pod_props. The flag avoids fixation
of the property by spa_pod_fixate().
When filtering properties, 'and' the flags together in the filtered
property. This mostly preserves the merged property flags. It also
merges the DONT_FIXATE flags so that when both sides can handle
the non-fixated result, it will be returned.
This can be used to let PipeWire filter out the common property
fields and leave the final selection of fields to the producer. This can
only work when the final selected field can be transported in some
other way than the format param, like on the buffer fields or in
metadata. One use case is negotiation of the DMABUF modifiers.
See #1084
Because we only remove the client from the list after doing the lookup,
we will always find the removed node and the unregister event is
never called.
Fix this by marking the object as removing so that the lookup function
can skip the nodes being removed.
Leaving sockets in the home directories is bad form, so let's not do
this.
This effectively requires XDG_RUNTIME_DIR to be set for pipewire to
work - it is set correctly on most setups anyway and on custom setups
this needs to be addressed with a custom environment.
Fixes#1443
The target signal is called when the peer nodes are ready and this
node needs to be scheduled. It is the in-process version of the
signal.
Remove our custom version that, just like the default version, schedules
the node implementation but doesn't do any accounting.
Makes pw-top report driver stats for bluetooth devices.
Fixes#1450
The ringbuffer can't be written to from multiple threads.
When both the main loop and data thread do _invoke, they both write to
the ringbuffer and cause it to be corrupted because the ringbuffer is
not multi-writer safe.
Doing invoke from the thread itself is usually done to flush things out
so we really only need to flush the ringbuffer and call the callback.
See #1451
Make a new PW_KEY_NODE_WANT_DRIVER to assign the node to a running
driver. (does not work yet)
Use a new variable to hold the ALWAYS_PROCESS setting and also
update want_driver.
This makes things it a bit more future proof.