Mostly uses the existing infrastructure, but the webrtc canceller has a
fixed blocksize, so we:
1. Use the canceller blocksize if configured
2. Accumulate output data in a ringbuffer
3. Push out the data in the required chunk size
This aggregates buffers from the capture stream and the sink in the
corresponding process callbacks, and runs processing based on the
desired resampler rate if there is one.
We allow the ringbuffer in which we capture buffers to grow to some
extent, as that seems to be required for playback to occur smoothly.
Whether this is hiding some other underlying problem likely needs
investigation.
Use _alibpref to check if a device needs a UCM local config. Mark
the device as such and use this to set the OPEN_UCM property on
the device.
Open the UCM for a card when the device has the property set. Use the
same logic for loading the UCM as the acp code.
See #1251
Add env variable PIPEWIRE_NO_CONFIG to disable parsing
custom config files.
Add a method to check extra options.
Expose valgrind, no-config and no-color as options.
UCM devices can require local data from use_case_mgr_open() but since
we do that in a separate process, make sure we reopen the use case
manager in case we are passed a UCM device so that the config is
available.
See #1251
Just like the real free() we should just ignore a NULL pointer, makes the
caller code easier for those instances where properties are optional.
Patch generated with concinelle with a few manual fixes.
For boolean properties:
- passing in NULL no longer crashes and instead returns false
- passing in a string starting with 1 (e.g. "1xyz") no longer resolves to true
For int-based properties:
- passing in NULL no longer crashes and instead returns 0
- passing in invalid numbers no longer resolves to whatever number prefix
could be parsed (e.g. "123foo" was 123)
When the server or client goes away, detach the client
from the server to avoid potential use-after-free issues
that might occur if the client causes the
unloading of the server it is connected to.
E.g.:
pactl load-module module-protocol-native-tcp port=4713
pactl -s localhost:4713 unload-module module-native-protocol-tcp
See #1240.
When we enable a device, the node will be created and its software
volume will be set to 100%. Update the device volume with this as
well so that changing the volume has an effect.
Fixes#1198
If any of those two branches are taken, the connection
cannot make forward progress since no data will be read/sent
from/to the client.
For example, sending just 21 invalid bytes to the server
causes the first 20 bytes (client descriptor) to be read,
then rejected, leaving `client->message == NULL`. But since
polling is level triggered, `on_client_data()` and thus
`do_read()` will continue to be called ceaselessly,
thereby spamming the log and wasting resources.
According to the alsa-info.txt in the pipewire issues of #747 and #1206,
the Front Playback Volume is shared by Headphone and Lineout or
Headphone and Speaker, But Headphone, Lineout or Speaker they all have
independent Playback Switch, change to only use switch to mute the
Lineout or Speaker. This could resolve the issues of #747 and #1206.
See #1206 and #747
Check if the port has latency param and only try to set the
latency param when it appears available. This avoids sending unknown
latency params to an old client and erroring out.
RLIMIT_RTTIME is Linux specific, there is no equivalent replacement
for FreeBSD. Save trouble and build module-rt for Linux only, rtkit
WIP fork should be fine on FreeBSD for now.
If `struct pw_map::free_list` is not initialized to `SPA_ID_INVALID`,
then `pw_map_insert()` will try to read `map->items.data[0]` when
inserting the first element, but `data` is a `NULL`
pointer after initialization.
Emitting events using the listener_list can not be done from multiple
threads at the same time. For this reason, make a copy of the events
with the process event and call it explicitly from the data thread.
See #1122