Newer glibc versions have made certain `str*()` functions into macros
that ensure that the const-ness of the argument is propagated to the
return type.
!2699 has been merged a bit prematurely and it contained things that are
not used. So remove the unused member variables, functions, fix module
usage strings, and move some functions from headers.
This function is run for all the nodes with the data loop locked. It can
be used to atomically update multiple node controls.
We can't use the control_changed function because this one runs without
the lock and might do slow things, like what the sofa plugin currently
does.
See #5019
don't read the control ports from the processing thread and check for
updates. Use the control_changed signal to check and update the
parameters of the biquad atimically.
See #5019
We can just concatenate the stream and client dict on the stack, reusing
all the strings without having to do allocations or copies.
Also filter out the object.id and object.serial from the client, we want
to keep the ones from the streams.
Instead of adding the client props to the stream props when we create
it, add them when we enumerate the streams.
This makes it possible to also have the client props in the stream props
for streams that are not created with the pulse API.
Fixes#5090
Roc-toolkit log records are captured via a callback and
written to PipeWire log with corresponding verbosity level.
The log.level config parameter limits record verbosity at
the roc-toolkit level.
Move the card->ignored check to only apply to ACTION_CHANGE, not ACTION_REMOVE. This ensures that ignored cards can still be properly removed when they are unplugged.
Patch by Lairton Lelis da Fonseca Junior (@lairton)
Remove the hard skip for IPv4 link-local addresses and add an interface
binding (matching the existing IPv6 link-local behavior).
The host needs a link-local address on the interface (ip addr add
169.254.x.x/16 dev wlan0 or via NetworkManager +ipv4.addresses).
Fixes#4830
With keepalive enabled, we need to emit state change event on acquire
similarly as we do if refcount was already positive.
Co-authored-by: Martin Geier <martin.geier@streamunlimited.com>
The stream should be streaming before the get_time call is meaningful.
Various places in the code already check this an fall back to a default
value, we just need to return an error here.
When setting up the mix matrix, don't just iterate over the first 64
(CHANNEL_BITS) positions because then we will never be able to configure
more than 64 channels in the matrix.
Instead iterate until we have filled all src and dst entries in the
matrix. For the first 64 positions we might need to check the channel
mask to get the right positions in our source matrix.
Fixes the channel mixer for >64 channels where the positions above 64
where 0 in the matrix and muted.
Fixes#5118
Add a container option to override the extension check and force a
container when saving.
Add some more formats that are supported by libsndfile.
Add some options to list all supported formats, extensions/containers,
layouts and channel names.
Fixes#5117
Depending on the codec kind, select appropriate settings to pass
to select_config().
This allows to pass the bluez5.bap.force-target-latency property,
and so to select the same configuration.
Some PTS tests (e.g. BAP/UCL/SCC/BV-046-C or BAP/UCL/SCC/BV-077-C)
requests to select QoS from low-latency or high-reliabilty.
The bluez5.bap.force-target-latency device property allows to force it.
For other values than low-latency or high-reliabilty the QoS selection
will use both tables to find the more appropriate configuration.
A call to `release_buffer()` may happen in a gstreamer thread concurrently
with the pipewire stream emitting the `remove_buffer` event in the thread
loop, which, in pipewiresink calls `gst_pipewire_pool_remove_buffer()`, which
in turn modifies the `GstPipeWirePoolData` object. Thus a data race occurs
when accessing its members, which can lead to `pw_stream_return_buffer()`
being called with a null pointer.
Fix that by locking the thread loop before checking the conditions.
Fixes: c0a6a7ea32 ("gst: handle flush event in pipewiresink")
Only set rate_match rate to DLL correction when matching is active.
When ALSA is driver and not matching, set rate to 1.0 to indicate no rate adjustment needed.
DLL still runs for buffer level management but rate_match should not expose correction
when matching is inactive to avoid confusion during debugging.
Signed-off-by: Stanislav Ruzani <stanislav.ruzani@streamunlimited.com>
On some device combinations (MT7925 / Sony LinkBuds S) the low-latency
48 kHz QoS crackle.
It's probably better to default to high-reliability for those, until we
have proper quality vs. latency configuration in place.
Socket activation uses sd_listen_fds from libsystemd, and can only be
compiled on systems with systemd.
This is an issue for Alpine / postmarketOS, where upstream has no
systemd package, but downstream depends on upstream's pipewire package
and wants to rely on socket activation. This also prevents using
socket-activation on other non-systemd distributions, including
non-Linux.
Implement equivalent functionality without a dependency on libsystemd.
sizeof(adapter) is larger than the big_entry->adapter and so the code
would copy too much. Instead only copy the strlen of the parsed
adapter, which we checked above to be smaller than the available size.
This doesn't copy the 0 byte because the memory is assumed to be 0
filled already by the calloc.
If the address is exactly the HCI_DEV_NAME_LEN, it will result in a non-0
terminated string, which may or may not be a problem...
This can easily be overlooked if the RTP rate equals the clock rate, which
is fairly common (for example, RTP rate and clock rate both being 48 kHz).
And, if an ASRC is active, and converting the output of the RTP source
node, the resampler's delay need to be taken into the account as well.
Clear the ringbuffer in stream_stop() when processing stops to prevent old invalid packets
from being sent when processing resumes via rtp_audio_flush_packets().
This ensures a clean state when the stream restarts.