Keep all the children param flags around and use those to decide
if something changed. Also don't change the param flag serial when
we are simply adding a listener.
This should reduce the number of param updates, most notably the
PropInfo that was updated along with the Props on volume changes.
For batch devices we want to keep the IRQ so that the pointers are
updated with the period-size. Brings my UMC404HD to 4.8ms roundtrip
times with IRQ at 6 sample and batch enabled.
Because we set the default sink/source before calling the metadata,
we don't send out updates about the new sink and this confuses
pavucontrol.
Instead, use the new async reply to reply once the new metadata has
been configured and the defaults have been updated.
We only want to restore the saved profile when it is available, when
it is not available and there was no change in best profile, leave
the profile as it is.
Keep track of the best profile. Only try to switch away from the
saved profile when something changed and the saved profile is not
available.
This makes it possible to select an unavailable profile but when
something is changed, it will switch away from it.
A node.target property of -1 also means to follow the default
sink/source. The ALSA plugin might use this to select the
target node and would otherwise not move to the new default sink.
Only start the driver node after we have added ourselves to the
driver node or else we might start too soon, before there is anything
to schedule and we cause driver underruns.
Only activate the links when the node is added to a driver. Otherwise
the driver will expect us to decrement the activation counters for the
links but that won't happen because the node will not be processed
yet.
Instead we activate the links that were not activated yet when the
node is activated.
This improves scheduling for newly added links and nodes.
When we were busy with the graph recalculation and something changed,
restart the graph state change to get the new change applied.
For example, when we start a node and it has a max-quantum set, we
need to restart our calculation with the new quantum limits.
Use the manager sync method to wait until all pending queries are
finished. It is the manager that will query the new parameters so
we need to wait until that completes.
See #868
Trigger a roundtrip before we send the reply to the client for many
methods like set_volume/set_mute etc.
this ensure that we get the updated information from the server before
we reply so that a subsequent query returns the up-to-data information.
Fixes#868
SCO transports have timer-delayed release, but they need to be released
immediately when changing profiles to close connections before switching
to A2DP.
When the quantum is changed, the error between the current and
expected buffer levels needs to be corrected with the quantum
difference.
For example, say we are running with a 1024 quantum and the quantum
is changed to 8192, when we wake up the filled level might be
1016 vs expected 8192, 1024 - 8192 = -7168. The real error for the
timeout was 1016 - 8192 - (-7168) = -8.
When we start or after an xrun, we need fill the buffer with one
period + headroom of samples, not period*2. This is because after
start we set our timeout immediately and expect there to be
period + headroom samples in the buffer.
With period*2 we take one period longer to start and we also feed
one period of error in the dll, which causes it to wobble for no
good reason.
Every time a new operation is started, schedule a rescan. This
ensures that there are no more pending actions before the policy
module scans the nodes.
This has the effect that all devices and nodes are up to data and
ready to be used by policy-node.
Fixes#789
Move the profile switching from default-route to the default-profile
module. This makes more sense and it also allows us to restore the
saved profile when it becomes available.
Make default-profile always check if the saved profile can be restored
before attempting to switch to the best profile.
Default-route now just monitors profile changes and restores the
routes associated with it.
See #466
Mark bluez5 routes always available in EnumRoute, because there's always
a device connected.
Fixes default-route resetting profiles back, when they are manually
changed.