errno should be set to the positive errno value.
This does not cause problems except for the pulse-server where the
errno value is negated and returned as an error result.
Make info parsing a bit easier to read by assigning the key and
value to temporary variables.
Improve the parsing of channelmap using json parser to make it
support more cases.
Add a unit test for channelmap parsing options.
Typically a source stops the connection when it has nothing to play
and this causes the transport to become "idle" and our A2DP source
also stops. However, the node is still present and "running" (if linked),
which causes the graph to underrun as it receives no data from this node.
This patch dynamically creates and destroys the a2dp source node depending
on the transport state. So, when the transport is idle, there is no node
in the graph at all.
A sink can be set as a default source, which means that the default
source is the monitor ports of the sink.
Move the direction check for later so that we can first check if we
are dealing with a potential default sink/source for the given
direction. If we found a default sink/source, we don't need to do
the direction check anymore.
This makes it possible to set a sink as a configured default source
and have policy-node take this into account when defining the
default.source metadata.
See #715, #908
Add new context config clock.power-of-two-quantum to make it possible to
not round quantum to closest lower power of two. This makes it possible
to match the quantum of a source node with the quantum of a client
node.
Allows monitors (eg. bluez5) free any sm_objects they hold in
session_destroy. In session_shutdown, destroy such objects before the
event, and free them only afterward.
Fixes double-free in bluez monitor.
WE can only delay the start for drivers that are driving. Remote
nodes are driving themselves but are not drivers so they need to
start early.
See #879
A node starts out as passive but becomes non-passive when there
is a non-passive link to an active node. If there is a link to
an inactive node, the node remains passive.
This fixes suspend of drivers in all cases.
Fixes#898
Start with an extra period of silence.
Reconfigure a new timeout if we are too far off from the desired
buffer fill level. Reduce this level to the maximum error we
tollerate.
With this we use the extra period of silence to reconfigure the
timeout until we are close enough and we can start the dll with a
small error.
See #892
Don't always try to restore the saved profile when it's available
but only do this the first time. From then on, try to follow the
best profile when it changes.
If a driver node is linked with a non-passive link to itself, it
should also become running.
One example of this is the Midi bridge, that needs to start when you
link one device to another. The devices are all on the same node
so linking devices would result in loopback connections.
libcamera + bluez5 devices should be freed/unloaded via the sm_object
free callback, similarly as in alsa and v4l2 monitors. This ensures
they are run at session_shutdown.