When we are starting a node and need to cancel it, only set the node
to the paused state when pause_on_idle is set. Use the pause_node
function to make sure everything is in the paused state.
Otherwise we would send a Pause command to the node but because it was
still added to the graph we would continue to call the process function
on it.
Fixes#2701
Reducing the latency is just papering over the issue in #2702. The
real fix is to limit the blocksize to the fragsize like what is done
in 00a234daf2
Reducing the latency then also causes regressions like #2715 so don't
do that anymore.
Fixes#2715
Instantiate the graph nodes when the samplerate is known instead of
using a fixed samplerate of 48KHz.
Warn when the convolver samplerate does not match the graph rate. We
might want to resample the IR later.
Suspend all nodes of the driver, even if the driver is already
suspended.
The suspend command makes sure that all nodes renegotiate to the new
graph rate.
This fixes the following sequence of events:
1. Play 44.1KHz file to loopback sink
2. Sink switches to 44.1, negotiates to 44.1
3. Loopback input and output streams negotiate to 44.1. All is good.
4. Stop playback, wait 5 seconds
5. Sink suspends, loopback input suspends (output stream doesn't suspend)
6. Play 48KHz file
7. Sink switches to 48, negotiates to 48. Sink (and followers) don't
suspend because sink was already suspended.
8. loopback input negotiates to 48, output stays at 44.1 -> failure
This patch fixes step 7. where it now tries to suspend all followers
even when the driver was already suspended. This then ensures that all
followers will try to negotiate to the new driver rate.
Use a reference to the location in the node where the handle of the
plugin can be found. That way we can change the handle only in the
node and have it changed everywhere else.
Add a process_playback function and use _trigger in the process_capture
to start processing. This ensure that the requested size is updated
before calling the process function.
We always need to update the latest requested size for output streams
before calling process. If there are no buffers or no suggestion, let
the audioconvert make one before we try again.
This way we always get the most recent requested size.
In monitor mode, we only need one sync to get the prompt and then we
just wait until we need to stop. There is no need to keep on syncing
because it consumes a lot of CPU.
Patch by Hiero32
Fixes#2709
Add methods activate() that is called before first call to run() when
stream starts and deactivate() that is called after last call to run()
when stream stops. This makes it possible for aec-plugins to reset their
state between streams.
When a port name contains a ':' we will try to split it and use the part
before the colon as the node name, which will then fail.
If we can't find a node name after splitting, try again by assuming the
colon is part of the port name.
Fixes control port names such as "Ratio (1:n)" in #2685
Make the receiving state machine more pronounced by explicitly storing
the state in the client. Furthermore, always consume the message content
if there is one and not only if the content type is "application/octet-stream",
but do not try to do it at once - like previously, instead only as the
socket becomes readable. The body is currently dropped, but it could
easily be collected in e.g. a `pw_array` should the need ever arise.
See #2673
Previously, the state used to receive messages from the remote
end was not reset when the client connected, which could
lead to issues if the same client is reused for multiple
connections.
Previously, the content had to be a null-terminated byte
sequence because the sending function used `strlen()` to
determine its length. However, `rtsp_do_auth_setup()` needs
to send a non-textual byte sequence, and it only worked so
far because it did not happen to have any zero bytes in it.
Add a "content_length" parameter and change the type of
"content" to facilitate sending arbitrary byte sequences.
The commit cited below mistakenly removed the set_rlimit call from under
`if (impl->use_rtkit)`, saying it doesn't have an rtkit implementation.
However, this function does call rtkit, so it has to be called in the
rtkit flow, otherwise pipewire fails to set the realtime priority,
printing the following error message:
mod.rt: RTKit error: org.freedesktop.DBus.Error.AccessDenied
mod.rt: could not make thread #### realtime using RTKit: Permission denied
Fixes: 5ae1c03d77 ("module-rt: small fixes")
Only activate the input links to a node after the node has been added to
the graph.
This ensure that we don't accidentaly schedule the node before the Start
command has completed and the node is actually ready to process data.
The Start command might be async and we should not schedule the node
until the reply has arrived and we have actually added the node to
the graph.
Otherwise it is possible that the node is scheduled before it could
complete the start command. This could be a problem for adapter because
it does negotiation and so on in the Start call.
See #2677
When a client writes more then requested, let the requested field go
negative so that it is taken into account the next time we ask for more
data.
Also the requested field follows the difference in the write pointer
caused by seeks.
See #2626Fixes#2674
A client can sometimes send more data than we requested. PulseAudio
keeps the extra data around, it just asks for more data when it consumed
some of it.
PipeWire however always tries to keep tlength worth of data, as
specified in the PulseAudio docs... Keep track of how much extra data
has been sent and keep this around as well. Make sure we flush this
extra data as well.
Fixes#2626
The stream only has one format/enumformat list for the one port it has
so also expose this on the node. We can then remove the adapter for
video.
We can also now show midi (control) streams as the format in pw-top.
Add a column with negotiated formats.
It requires an adapter that will enumerate the port formats so it does
not work for video streams yet.
Fixes#2566