With hooks we have less of a chance of race issue when switching to and
from voice volume control. Using subscription system is bad as the
messages are not passed synchronously, whereas hooks are.
Volume control callbacks wouldn't be properly set for a device with
hardware volume when starting the sink, only after switching to voice
volume control and back.
AUDIO_DEVICE_IN_ALL contains AUDIO_DEVICE_BIT_DEFAULT,
like AUDIO_DEVICE_OUT_ALL, which meant that config was
always filled with input channels, even when device
was output device. Fix the logic so that correct channel
mask is generated for output device as well.
New source doesn't need any special control with different devices,
so we can just remove the whole voicecall source controlling
functionality and handle everything in the source.
Since the changes to channel map etc are done in the route changing
code, we don't need special voicecall source anymore. Remove all code
related to that from source and card.
As we are now updating source route in the IO thread we cannot update
the source proplist when changing routing. Since it's not really that
important information and updating the audio source in main context is
quite a lot of work for small benefit, remove the proplist changing code
and refactor route setting to one function.
When changing source port, by default we will now close the input
stream, set the new parameters, and reopen the stream. At the same time
it is possible that the channel count or buffer size of the input stream
needs to change (mainly for voicecall recording case, where we need to
use mono channel map for best compatibility across different devices).
It is also possible to revert to older behavior where input stream is
always around, using quirks=-close_input
We also now start droid source always in suspended state. We still need
to open the input stream for a while to get stream buffer size and
sample rate.
New audio_policy.conf files contain new sections with new values as well
as global_configuration section per-module.
Currently other than using per-module global_configuration we ignore all
the values, but extend the parser so that when the new config values are
needed it's easier to parse them.
Instead of having version specific header files use one where most of
the values are common and device/version specific values are compile
time dynamic.
See configure.ac CC_CHECK_DROID_ENUM lines for how to add checks for
additional enum values.