-To select between non-native(via control channel) and native modes(via audio
adapter ). The control port will be opened only in the non-native mode.
-To select different sample and sample step sizes. The Legacy non-native
mode also uses these params now.
-To provide the alsa device.
Use the ISO IO helpers to get synchronized BAP output, and rate match to
the ISO schedule.
The rate matching is necessary, since the driver may be ticking at a
corrected rate, different from the ISO interval rate.
Add factored out helper for ISO socket I/O.
ISO sockets need synchronization of writes and audio position for
different stream fds in the same isochronous group, and it's easier to
separate out the part that coordinates it.
Avoiding unnecessary release + reacquire when nodes restart makes sense
for all transport types. Do timed releases for all transport types, not
only SCO.
This reverts commit 2bfe772bb4.
This does not take into account nodes recursively becomming runnable and
so does not set the runnable state on all nodes correctly, like for
combine-stream.
Revert for now, it probably requires a new algorithm to make this work.
See #3128
If you set node.force-rate=0, the rate will be forced to the node.rate
denominator.
This makes it possible to autiomatically make the graph switch to the
native rate of the stream by setting this as the default property on
streams.
See #3026
There is no point in trying to restore a node to the default rate when
it's not going to run.
This avoids loops when rate switching from one forced rate to another.
Make sure we allocate at least 2 buffers when we are dealing with an
ASYNC node. This ensures that an adapter without a converter will at
least negotiate to 2 buffers when the follower stream is async (such as
is the case with pw-cat).
Ensure that we clear the rate matching when we are not using the
converter. This will make the follower use the quantum instead of the
dummy unused rate matching area.
Exit when we can't make an internal converter because then things really
are not going to work. Remove some of the pointless NULL checks.
We need to be able to fill up one quantum of data when the stream
requests it so suggest a quantum_limit buffer size. Normally, the
converter will further improve the buffer size parameters when
resampling is involved but this is a good default for when working in
passthrough mode.
We don't actually use the stream buffering features so we're happy with
just 1 or 2 buffers.
Set the active state to false right when we start deactivate to make
sure that we don't call any callbacks anymore during shutdown.
One of the callbacks that might be called is the bufsize of samplerate
change callbacks when the node is moved to the dummy driver and this
might deadlock any app that doesn't expect this.
Fixes#2781
For IRQ based scheduling we might otherwise be woken up after we only
added one of the fds to the poll loop and then we get an error when we
try to update it afterwards. Instead, add the fds from the data thread
to get things nicely in sync.
In IRQ mode, disable the ALSA fds while we wait for the graph to produce
data. Otherwise we will wake up very quickly over and over.
When we get more data, we activate the sources again to start the next
cycle.
Provides configuration to disable timer-based scheduling. This can be
useful at low latencies, for example, where period-based interrupts
might be more reliable than timers.
Only make a passive link when one of the peers is passive and the other
one can be suspended or when both are explicitly passive.
This avoid making passive links between a sink/source pair.
It also avoid making passive links between two streams if they are not
explicitly marked as passive.
It does allow making passive links between a passive stream and a
sink/source or between two passive streams.
This reverts commit 6a64b4461e.
Now that sinks and sources are no longer passive by default, we need
just one part of the link to be passive to make things passive.
This breaks the stream recording from a passive stream case but we can
find a different fix for that later.
Nodes with the same link-group should be added to the same driver.
Also the runnable state of the nodes in the same link group is
shared between eachother. This makes it look like the linked nodes are
really just one big node.
With this change we correctly calculate the state of all nodes and we
can then only set the running state on the runnable nodes.
If you have 2 loopback sinks in front of a driver, this change will
only make the used loopback sink running and keep the other one
idle. It also works for grouped nodes, where only the active nodes
will now be running (such as rtp-session nodes).
Make an option to allow link.passive properties and set it to false by
default.
This effectively ignores the link.passive properties from the session
manager, jack clients and pw-link when set. This is a good idea because
the logic for making passive links is better handled in the core.
Don't increment the required activation count every time we change the
node prorties with a TRIGGER property. Only increment/decrement when the
value actually changed.