For the stream group, we break into the three components we write out
and print those.
For the IPv6 address printing inside [], we can make this a condition on
the printf statement.
In one we can duplicate the spa_asprintf call without real drawbacks.
The second one can be split up without losing details. Note that there
is another one in backend-native.c where splitting it up will make the
code harder to understand. The warning for that one remains.
Change codec factory names to api.codec.bluez5.*, so that they won't
conflict with old config file lib name rules for api.bluez5.*
Specify the fallback library name when loading the codecs, so that it
works without the rules in config files.
Check if we actually managed to add the param to the builder before we
try to deref it.
Use a safer deref that checks the sizes of the pod and builder.
Each dictionary needs to fully match but out of the dicts we have, only
one needs to match to apply. Reword that for clarity.
Also document regex vs normal string comparison vs the magic null
string.
This is a multi-step process involving 4 processes and two modules.
Let's add some graphs to make this slightly easier to comprehend for
those not familiar with how portals work.
Make easier to package A2DP codecs separately, by splitting each to a
separate SPA plugin. Adjust the code to not use a global variable for
the codec list.
The A2DP SPA interface API is in the bluez5 private headers, and not
exposed in installed SPA headers, as it's too close to the
implementation.
Instruct the policy to not configure audio adapter nodes in DSP mode. Instead,
Device nodes will always be configured in passthrough mode, and client nodes
will be configured in convert or passthrough mode depending on whether the
client format matches the device format or not.
Keep the original type of the object around in the free list so that we
can still look it up.
Make most methods only find the still active object by checking if the
client matches.
Make some methods (jack_port_by_id() for example) also find the removed
objects for as long as they are in the cache and not overwritten.
This make carla and catia work better because they expect to access the
old object after it has been destroyed.
See #1531
xmltoman looks dead and uses XML as well as pulls in a long list of
Perl dependencies. This replaces it with rst2man that has almost no
dependencies beyond Python, which is already required for the Meson
build system.
Naturally rst2man uses reStructuredText and the pages were rewritten
via regex and manual editing to be as close to original XML format
as possible. A few fixes and updates were done too. Most notably a
note was added to indicate that production deployments should not be
starting the session manager via pipewire.conf file.
There's three slight formatting issues/differences:
1. rst2man produces simpler footer.
2. "-f | --foo=value" confuses the parser and it fails to correctly
add argument specific syntax highlighting to assignment value.
3. XML version had inconsistent use of <arg> and <opt> which has
been partially addressed. But different manual pages still have
their differences to what and how is highlighted.
The current _info_update() methods will always reset the change_mask in
the new info structure.
This causes problems if multiple updates are applied to the info before
the rescan in the session manager of pulse-server is excuted. The first
update is cleared and this causes the session manager to sometimes miss
the state changes of nodes and fail to suspend them.
Add a new method to merge with optional reset of the various
introspection info structures. We can use this instead and simply
accumulate all changes until the rescan code has processed all changes.
A list of reasons why DMA-BUFs have to be treated specially. This
should make it clearer why mmaping DMA-BUFs should be avoided and hint
clients on how treat them correctly
Co-authored-by: columbarius <co1umbarius@protonmail.com>
Describing different behaviour for modifier-less and modifier-aware case
and how a EnumFormat with modifier should be fixated. Also adding a Note
about `SPA_PARAM_BUFFERS_blocks`, which is important for multiplane
DMA-BUFS.
When we destroy a node that still has another driver, recalculate the
graph so that the driver has a chance to idle.
This can happen when we add an inactive node to the driver and then
destroy the node, like for jack clients.
The calculation of the elapsed time is actually not a good idea because
it becomes larger and larger and a tiny change in the rate could result
in a large difference that would make things fail quickly.
Until that is fixed, this patch will need to do..
Make sure we always suspend before reconfiguring a device.
Put the node and the device in passthrough mode when requested. Move
back to DSP mode after the node is unlinked.
Parse the exclusive flag of a stream once when the node info changes.
Use a new variable 'passthrough' to remember the current state of
a node and the peer.
Parse non-raw formats as well.
Check if two nodes can passthrough by intersecting the EnumFormat
params. If it is possible, configure the node for passthrough.
Don't try to reconnect nodes in passthrough.
Fail if we can't find a node compatible with passthrough.
See #629
Get the ucm prefix only once, when we open the UCM card and then
use it for all devices using the card.
Construct the device name right before we open it with the ucm prefix
and possibly the AES flags instead of messing with the property.
Just like the latency, move the codecs to the device Route param.
This way, it is easier for the session manager to save and restore
the codecs as part of the Route settings.
If a program using pipewire-alsa calls snd_pcm_close() immediately after
snd_pcm_prepare() without reading or writing any data the client node
may be removed before the session manager can link it, which would
result in the following log warnings:
can't link 35:40 -> 43:48: link-factory: unknown input port 48
error id:25 seq:11467 res:-22 (Invalid argument): link-factory: unknown input port 48
can't link 35:41 -> 43:46: link-factory: unknown input port 46
error id:16 seq:11468 res:-22 (Invalid argument): link-factory: unknown input port 46