When a memblock closes its fd, have it emit signal to other memblocks
possibly sharing the fd, so they know it is now invalid.
When a memblock has an invalidated fd, it'll not allow mapping more
memory, nor match against fd searches.
This avoids bugs where kernel fd reuse causes already invalid memblocks
to be used. Generally, higher level code should make sure memblocks get
freed in right order so that this situation does not occur, but try to
keep mempool in consistent state regardless.
When the ringbuffer has too much data, do a resync or else we would just
have a huge delay and would try to resample to get back to the target
fill level.
If for some reason the proxy gets destroyed, we make sure to remove
listeners and forget the proxy pointer. We do not however delete the
target_link; we consider the proxy destruction as an error.
If another definitive state occured on the link (got to paused state,
got an error), then that event will be ignored. Else we consider it an
error.
Previously, on new node event, we registered a core sync. Linking was
attempted at core sync done but the node did not yet have time to
register its ports.
Only listen to new ports. This delays the linking attempt to when nodes
have had time to create their ports.
Stop using sync for link creation detection. Instead, listen to link
events.
We still listen to errors, link info events are not enough. For example,
if a link already exists, we only get a proxy error and no link info
event.
Now that we have a create_link_proxies() that looks for our matching
nodes/ports and creates proxies if they exist, implementing --wait is
easy.
We move the call to create_link_proxies() the core done event. If it
finds no potential nodes/ports, we keep running our loop, monitoring
new objects.
Make do_link_ports() only create proxies. Previously it ran the event
loop once per attempted link to detect link creation errors. Rename it
to create_link_proxies() to make things clear.
Created proxies are stored into a list (data->link_targets).
create_link_proxies() returns the number of link proxies created. This
can be zero when the two matching nodes have zero ports.
Refactor main() to use create_link_proxies(), ask for a sync then run
the event loop. It will stop on sync done, and we will have received
all potential link proxy errors.
Cleanup all proxies and listeners at the end of main().
Always reevaluate the rate matching even when we did not change the
follower state.
It is possible that we were a follower from some node with the same
clock and now become a follower of a node with a different clock. The
follower state doesn't change but we need to activate the rate matching
logic in that case.
Fixes rate matching in pro audio (playback) when capture and playback
are moved to another driver.
The AAC-ELD support was not properly tested on devices. In theory it
should be OK, but it's untested.
Bump it down in priority so it won't be selected by default.
Also log info on FDK-AAC AAC-ELD support status.
Variables enclosed with @ are replaced with the value of the variable.
The sink.name should remain @DEFAULT_SINK@.
Escape the enclosing @ to prevent substitution of DEFAULT_SINK with an
empty string while generating pipewire.conf.
We first need to do the setup, which we start when setting the Format
param.
This causes the module to unload when starting pavucontrol because it
tries to start the record in the wrong state.
See #3778
When multiple packets need to be flushed (because sess.latency is set
and larger than ptime) use a timer to space the packets uniformly in
the current quantum to avoid bursts.
See !1873
After we set the format, probe if we can do EXPBUF and enable/disable
the ALLOC_BUFFERS flag on the port.
This should gracefully handle the case where EXPBUF is not available.
Fixes#3821
When we try to alloc buffers but EXPBUF is not supported, make sure to
clear the alloc_buffers flag so that the caller can try again with
allocated buffers instead.
See #3821
Reduce fallback delay values used when BT device doesn't provide the
information itself.
It may be better to have audio late than early, so use values that are
probably close to or below the delays of majority of headsets.
Don't include the quantum in latency: the latency relative to graph
cycle start doesn't depend on the quantum. Instead, the audio packet
size determines it.
Enable the /Internal media class hack also for SCO.
Session manager can use this to adjust SCO sink/source media.class when
it is going to emit front-end nodes hiding the hardware ones.
The rfcomm list may contain various AG & HF ones, so the profile must be
checked everywhere they are looked up.
Fix the rfcomm lookups everywhere to do it.
Fixes Pipewire<->Pipewire HFP connections, and sending HFP HF commands
to HSP or AG.
Add registry generation checks to pw_context methods that find globals,
(pw_context_find_global, pw_context_for_each_global), so that they are
made everywhere where a client acquires globals.
In addition to previously covered registry bind/destroy, this also
covers link creation (port/node ids) and metadata (subject ids).
If the manager gave us a different channel count than we had by
default or configured, assume everything is AUX channels.
Also handle the case where the manager is sending more than our
MAX_CHANNELS channels.
Use the sess.latency.msec also for the sender and use it to control the
NODE_LATENCY. Make it a float to be in line with the other time values.
Set is to a default of ptime, which was what it used to be.
This makes it possible to set the ptime to a smaller value than the
sess.latency.msec so that we send out multiple packets per quantum.
This will result in some bursty output for now but with a timer that can
be improved later.
Update the docs a little, mention the new rtp.ptime and rtp.frametime.