Fix of the issue that after disconnecting
BT A2DP device during music playback
and reconnecting it without leaving
music player app the sound was not
audible anywhere.
Additionally unified behaviour of music
playback on connection/disconnection
of audio devices.
Refactored Audio settings API.
Moved phone modes logic from serivce audio to service clients level.
Removed redundant API.
Seprated API for vibration and sound enable/disable.
Fixed issues with vibrations logic.
Verify stack usage of:
- ServiceAudio
- application music player
- decoder worker
Change if possible to a realistic value keeping a 30% margin.
Stack usage reduction is limited due to an extensive stack usage of
every call to the filesystem, which uses around 2 kB of stack.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Audio devices are created in the audio subsystem and it is not possible
to send a device to bt service upon creation.
Introduce hookable audio device factory to allow sharing bluetooth
audio device. Move audio devices from bsp to audio allowing removal of
unwanted bsp -> audio dependency.
Remove Bluetooth proxy device which turned out to be a dead end.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Refactor audio module to use only one callback for communication
with audio service. This also simplifies the logic and removes
necessity to define defaults for audio values in multiple places.