Split the spa_alsa_start() in a prepare and start function. Prepare
will then also reset state and prefill the playback buffer with silence.
This makes it possible to reuse the prepare function in recover().
The threshold depends on the samplerate and even when the graph rate or
quantum didn't change, the driver could be opened in a different
samplerate, which would cause the timeouts to be wrong and cause xruns.
Change the shellcheck job so that we configure the build and check the
preprocessed versions of the scripts, not the bare ones, which might not
be syntactically valid yet.
Version 1 does not seem to be packaged in many distros and so they would
need to revert the patch or disable AEC. Enabling both allows for things
to move forwards gracefully.
Make supported codec checks to use profiles, not "is-a-sink" flag, to
determine which codecs can be used.
Fixes bluez5-device checking only source profiles, even when the local
device is only a sink.
The buffer io area is used to enable/disable a port and should be
synchronized with the processing loop. Use invoke to safely update the
mixer io area.
Keep track of the number of mixers on a port and clear the global mixer
buffer io when there are none. Check and use the global mixer io when
processing output to avoid using an inactive output without buffers and
crashing.
Fixes#3506
When we activate, emit the port registration events of our own port,
even when they were suppressed (and marked registered) when we created
them. This is what JACK2 does as well.
port_set_io with SPA_IO_Buffer can be used to enable/disable a port
when the node is running and so the node should make sure the io update
is synchronized with the processing loop.
Use spa_loop_invoke to make sure the mixers handle the port_io updates
correctly.
Setting buffers or a format also needs the port to be disabled so add
some checks for this in the mixers.
Don't just forward the tag and latency events to the follower but let
the audioconvert aggregate and emit the updated tag/latency event
that is then configured on the follower.
When using the DSP mode of the audioconvert, this results in an
accumulated latency/tag from all the DSP ports instead of just
the last DSP port param update.
Put properties with media. prefix in tags in pw-cat.
Always first clear the params before we start enumerating new ones.
Otherwise we only clear them when we see the first result and there
might not be a result.