This refactoring removes invalid interface dependencies of the original
AudioDevice implementation:
- move things characteristic to RT1051AudioCodec to audio::codec
- remove dead methods
- make start/stop optional and codec configuration independent
- add more convenient way to get supported formats
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Replace faulty implementation which produced ambiguous results with one
which is suited for both phone calls and music playback requirements,
including A2DP and HSP Bluetooth profiles.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Any notification could be heard via bt audio device while
it's connected to the pure.
If any notification is being played and bt device would disconnect,
playback will be stopped.
Disabled bluetooth low power as it was causing issues with the playback.
JIRA for the low power bug
https://appnroll.atlassian.net/browse/EGD-6681 .
Added volume control feedback during music playback over Bluetooth.
Changed volume buttons handler logic in service audio to use actions
instead of messages.
The `Pure`'s power consumption was measured in three variants:
* BT off
* BT on (master)
* BT on (EGD-6118)
Measurement results (respectively):
* idle [mA]:
** 78-81
** 83-85
** 78-81
* BT headphones connected [mA]
** -
** 85-87
** 82-85
* music play [mA] (may be not precise)
** 90-100
** 98-105
** 101-115
Added HSP ring sound on incoming call event while
there's bluetooth connection active and HSP is
selected as the current profile.
Possibility of pick up/decline the call using
BT device buttons added.
Slightly changed HSP initialization according
to the UML-s added.
Changed call hangup handler in service cellular.
Check if decoder's file format is supported by the sink audio device
before playing the sound. Add list of supported formats to each of audio
devices.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Bluetooth device volume control can be set by Pure Phone
while paired and is in A2DP mode. Temporarly disabled
HSP since it's not fully working and causing control issues.
Add basic playback capability using Bluetooth A2DP profile.
Only stereo/44100/16bit files are supported at the moment
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
This PR:
* provides Bluetooth-Harness API messages definition [EGD-5944]
* provides Bluetooth-Harness API messages implementation
* provides Bluetooth-Harness API usage on harness side [EGD-5946]
* provides Bluetooth-Harness tests [EGD-5947]
Due to incorrect stopping the BT scan, re-enabling it caused
failure to HCI state machine, which was indirect cause of failing
connections. Now it works
After changing flow of settings windows, the stopScan command
is being executed right after executing pairing, so cleaning the
scan devices list is being done on scan start
To be able to connect to the BT device with more than one audio
profile, we need something to manage those profiles. Created here
ProfileManager made it convenient
To be able to work properly with BT, CPU freq has to be at least
at Level_5 - to be fixed!
After BT refactor settings init for key storage has been moved,
thus in the initial phase settings were unavailable and btstack
couldn't import keys from storage
lIndexOfLastAddedTask is shared between two separate functions
that should run consecutively but in some cases the thread
running can be yield in between which results in broken thread
stack.
This change reduces the risk but it does not entirely solve
the problem. It is still possible for the threads to return in
different order. Nevertheless the tests did not confirm that.
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>