Add sse optimized biquads.
Make a new dsp function to run multiple biquads on multiple channels.
This makes it possible to unroll some operations and run the channels
in parallel later.
Simply load a filter-chain with the new param_eq node and the
given filename in the config.
This fixes a number of issues such as not copying global properties to the
streams, setting a unique node.name etc...
Don't use %f to serialize floats to JSON but use the json formatter
because in some locales, the decimal point becomes a , which does not
parse as a float anymore.
Also reformat some lines.
Add a new followerClock block in the profiler info. This is only set
when the follower could be a driver and it contains the clock info used
for following the driver, mostly the rate difference and delay.
Dump this info in pw-profiler -J
Make sure we always set the info in the clock, especially also when we
are following.
Use node.param.Props for the patternType on videotestsr.
Make the audiotestsrc non-live. Otherwise it will be live but not a
driver and fail to schedule things.
See #4341
It's broken because it only iterates one Props property and most nodes
have an adapter, and so two sets of Props.
The node.param.Props = { } property is a better way of doing things
these days.
Flush with drain calls the drained callback for each cycle until paused
or resumed. Setting the stream to active again, clears the drained state
and makes things resume.
Flush without drain does not set the state to PAUSED but simply clears
the queued data. This is mostly useful when pausing or stopping.
At no point should the flush operation result in a PAUSED state change.
When the follower doesn't produce enough data for this many attempts,
bail and cause an xrun to avoid an infinite loop.
The limit of 8 cause real-life problems and should be larger. It should
probably depend on the expected size per cycle (node.latency) and the
current quantum but we don't always have this information.
See #4334
When we are asked to clear the mix io areas, actually do it, otherwise
the process thread might still be accessing the old memory and crash.
Also check that we have set io on the port before we decrement the
counter with active io or else we have a negative value and cause
problems later. This can happen when we susupend and set io to NULL but
there was never any io set on the port.
Fixes#4337
Keep a running average and variance of the error. Use this to
periodically update the DLL bandwidth. When the variance gets smaller,
we update the DLL more slowly to stay closer to the ideal rate.
This seems to improve the rate stability.
Put the newline and comma right after printing the line so that it gets
flushed immediately. Otherwise we only see the last line in the next
cycle. We then need to end the JSON output with an empty object.
Pretty print the node status instead of the value.
Convert the RequestProcess event to a command and send this to the
driver node. This ensures that any future properties on the Event will be
passed to the Command as well, such as timestamps etc.
Save the complete RequestProcess command when we need to send it later
when the node is RUNNING so that we preserver the properties.
Make a function to emit an event from a stream. Use this function
internally to emit the RequestProcess.
Make the RequestProcess event construction a little more efficient.
We don't actually need the extra allocation for the tss. We can just
mark the queue as being in the tss. When a queue is destroyed, mark it
as destroyed but when it is still in the tss, don't free the structure
yet. We free the structure when we destroy the tss.
We can also free the overflow queues of a queue when it is destroyed
immediately.
The thread that calls the impl_clear method might be the main thread and
is certainly not going to call the invoke function anymore so free the
tss if there is any.
Fixes a leak in the unit test.
When combine-stream initiation code was moved around in b46673b4, a
bitwise or of flags was accidentally dropped, and thus flags were
overwritten instead of added to.
The properties of the card might overwrite those of the PCM.
For example, the cards's `alsa.id` will be set on the PCM too
since 37a51533e0 ("acp: add more properties for the card").
To avoid that, call `pa_alsa_init_proplist_card()` first
in `pa_alsa_init_proplist_pcm_info()` instead of last.
See #4135
Store a pointer to a pointer to a queue in the tss and point to it from
the queue.
When we destroy the queue when we _clear the support, we can clear the
pointer in the tss as well. This way, when the thread is later
destroyed, it will see the NULL pointer and not try to free the queue
again.
Don't queue an async state change completion for exported nodes. The
server sends a ping to check for completion and we want this ping reply
to happen after the state completion.
Consider the case where we have a follower and a driver, the follower is
sent the Start/Ping commands and replies to the ping but is still
processing the state change async. The server can then Start the driver,
which will then try to schedule the (still starting) follower and fail.
We could add the ping to the work queue as well but that creates
complications because modules (clients) and server share the same work
queues right now and block each other completions.
We could also make a method to process the work queue immediately but
that would be dangerous as well because it could contain a BUSY item
from some module that would block things.
Set the corked state on streams so that we can use this in sink-input
and source-output info without guessing.
The problem is that when a stream starts un-corked, the state is less
than RUNNING and so before this patch, pulse-server reports a corked
stream, which is not what pulseaudio reports.
Free the client ports when closing.
Move the per client cached objects to the global cache.
Free the per-client cached mix and ports.
Add a destructor that frees the cached global objects.
When we receive a message with fds and we are at the end of the
buffer, we will call clear_buffer, which moves the next fds over the
fds of this message before we copy the fds into the message. This
results in the fd being leaked and the message using the fd of the next
message instead.
Avoid this by first copying the fds into the message and then move the
new ones over the old ones.
This fixes some wrong fds being used by clients.