When we try to play data but the ringbuffer is full, we need to start
the device or else we will stay in this situation forever and stay
silent.
Fixes#2830
After the ports are reconfigured, we need to perform the setup again so
that buffers and processing can happen with the right settings.
This fixes an issue when autoswitching between A2DP and HFP with
bluetooth headsets when there is also a stereo capture device available.
The input stream of the browser is quickly reconfigured between stereo
and mono with only a Pause command in between, clearing the setup state
is enough to redo the setup when going back to Playing.
Fixes#2764
Find a free id from the available ids instead of just taking the current
number of devices, which would give assign the same id to multiple
cameras when: added 0, added 1, removed 0, added 1.
This reverts commit 6c963ed933.
This code was meant to set a filter on the format for the follower
but is not implemented yet.
Problem is that the unit tests and wireplumber call this code and would
need to be patched.
port_enum_params should use right param id for SPA_PARAM_Format.
Fix typoed , instead of ; at end of line. Pop frame before putting
state.offset, in case there would be padding added (apparently usually
no).
The monitor mode does not create a echo-cancel-playback node, and makes the
echo-cancel-sink node to be a monitor node with media class Stream/Input/Audio
(instead of Audio/Sink).
Some applications get confused when their output stream node is not linked
directly to the actual device node. Having echo-cancel-sink as a monitor node
avoids this problem, allowing those applications to work properly even if echo
cancel is enabled.
This mode is disabled by default. You can enable it by passing the specific
option (monitor.mode = true) in the args when loading the module in the
pipewire context.modules configuration section.
If a node suggests a graph rate that is not in the list of allowed
rates, find the closest matching rate in the allowed rate instead of
just using the default.
When playing a file with a rate of 352800 and allowed rates of 44100,
48000, 96000 (default rate 48000) this will switch the graph to 96000
instead of the default 48000, which requires less resampling.
The free buffer check must happen before writing to check for leftover data in buffers. In case data is left over from previous submission, bitpool mustn't be increased.
Also improved logging by adding bitpool to the log message.