Commit Graph

117 Commits

Author SHA1 Message Date
Marcin Smoczyński
ef3f840a4d [EGD-6049] Add voice call over HSP
Add support for voice calls over HSP.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-05-28 15:38:56 +02:00
Mateusz Grzegorzek
b4a40bd21c [BH-398] Move sml to a separate directory
Move sml to a separate directory
2021-05-27 10:11:24 +02:00
Bartosz Cichocki
52d5a35c1b [EGD-6447] Add Bluetooth PIN pairing
Implemented legacy pairing using PIN code
2021-05-25 16:12:01 +02:00
DariuszSabala
339f3d52fa [BH-364] Move TPLIB magic_enum to separate dir
Changed submodule directory and updated cmake scripts and include paths
2021-05-21 11:12:20 +02:00
Marcin Smoczyński
f6dd452c41 [EGD-6799] Cleanup audio device interface
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>
2021-05-20 19:31:06 +02:00
Marcin Smoczyński
a3e512a89b [EGD-6674] Change negotiation of audio block size
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>
2021-05-05 21:36:00 +02:00
Jakub Pyszczak
afa71c7e53 [EGD-6051] Receiving notifications on bt
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 .
2021-05-05 16:11:13 +02:00
Jakub Pyszczak
49c132c622 [EGD-6513] Volume control feedback
Added volume control feedback during music playback over Bluetooth.
Changed volume buttons handler logic in service audio to use actions
instead of messages.
2021-04-22 15:30:02 +02:00
Michał Kamoń
bb6396679f [EGD-6118] BT low power initial implementation
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
2021-04-21 08:32:31 +02:00
Jakub Pyszczak
6be93bef43 [EGD-6166] HSP ringing
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.
2021-04-20 10:29:30 +02:00
Jakub Pyszczak
6f2d77c5f4 [EGD-6401] Fix bluetooth initialization
Fixed multiple initialization in A2DP and HSP profiles.
2021-04-14 15:05:54 +02:00
Marcin Smoczyński
332aed9365 [EGD-6507] Enable per-module testing
Add per-module:
 - test build
 - test execution
 - coverage reporting (xml/html).

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-04-13 15:16:59 +02:00
Marcin Smoczyński
8b21df135c [EGD-5742] Add audio format checking
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>
2021-04-12 10:00:00 +02:00
Jakub Pyszczak
9c41f6f592 [EGD-6350] Added bluetooth device volume control
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.
2021-04-07 21:08:11 +02:00
Marcin Smoczyński
b890bcd6e3 [EGD-5260] Add A2DP playback to audio
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>
2021-03-25 01:01:35 +01:00
SP2FET
4c30e3c535 [EGD-6190] Fix Bluetooth DMA transmission
Enabled previously FIFO buffer without proper handling caused
ignoring one byte. Disabling FIFO fixes this issue
2021-03-22 13:50:04 +01:00
Michał Kamoń
46b8914054 [EGD-5945] Bluetooth-harness API messages
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]
2021-03-19 10:27:29 +01:00
Tomasz Langowski
2de63da943 [EGD-5954] Add CoD verification for bluetooth conn
Implement selective profile connection based on Class of Device
2021-03-17 12:58:45 +01:00
Piotr Tański
4de9970108 [EGD-5952] Changed service stack depths acc. to real usage
Stack depth changed for:
- Application Manager
- Service Bluetooth
- Bluetooth Worker
- Service Eink
- Service GUI
- Application Special Input
2021-03-11 11:15:29 +01:00
SP2FET
da27b16dcc [EGD-6100] Add BT device turn off handling
After BT device disconnects (e.g. because of shutdown) Pure is now
aware of this
2021-03-11 10:33:51 +01:00
Pawel Olejniczak
72ac24f2e8 [EGD-6073] Fix text formatting in retry windows
Error message in retry windows was displayed incorrectly.
2021-03-10 15:23:15 +01:00
Pawel Olejniczak
77faaaec7f [EGD-6024] Return to All Devices window after attempt to retry action
Execution of retry pairing/unpairing/connecting took too long
to wait for it on retry popup. Fixed minor bugs.
2021-03-05 09:57:46 +01:00
SP2FET
83524c42e4 [EGD-5986] Fix re-enabling BT scan
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
2021-03-03 17:19:49 +01:00
SP2FET
d325f1bd43 [EGD-5984] Add BT implementation of added GUI actions
Implemented BT-side actions for GUI usage, e.g. connection status
2021-03-03 12:42:50 +01:00
SP2FET
b911ad9044 [EGD-5940] Add BT device unpairing
Implemented possibility to forget/unpair a device via GUI
2021-03-03 08:40:59 +01:00
SP2FET
6fcf2ee8e7 [EGD-5982] Fix no window refresh after pairing
Fixes no refresh after finished scan
2021-03-02 11:03:17 +01:00
SP2FET
b055eee371 [EGD-5981] Fix BT scan stop issue
Btstack's scan stop call was not working properly thus force stop
function has been added
2021-03-02 11:03:17 +01:00
SP2FET
8460e9e915 [EGD-5980] Fix BT paired devices list
After pairing more than 1 device the paired device list showed
only the last paired. This commit fix this issue
2021-03-02 11:03:17 +01:00
SP2FET
d1fe9bc520 [EGD-5977] Fix empty BT devices list after pairing
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
2021-03-01 16:33:30 +01:00
SP2FET
f9b80ac26c [EGD-5764] Implement handling multiple BT profiles
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!
2021-02-25 14:03:44 +01:00
Pawel Olejniczak
1e219f3c5c [EGD-2634] Add pairing process result confirmation
Enable pairing BT devices in settings.
Connect popup and add adjust messages for pairing error handling.
2021-02-25 11:36:15 +01:00
SP2FET
3d3b997cc0 [EGD-5856] Update Btstack
Updated to the latest version, fixes few bugs
2021-02-24 08:33:41 +01:00
Wiktor S. Ovalle Correa
fe72169338 [EGD-5737] Merge master into experimental
Synchronize with master before merging
2021-02-23 18:10:52 +01:00
SP2FET
1929a38252 [EGD-5848] Fix bluetooth pairing key import
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
2021-02-23 09:18:24 +01:00
Radoslaw Wicik
b7622bf149 [EGD-5812] Add cmake support for Products
Move cmake scripts/modules to separate directory, adding Products will
add new more scripts so first clean up, then changes.
2021-02-22 14:13:21 +01:00
SP2FET
5c7b518136 [EGD-5700] Fix Bluetooth pairing
To be able to proper propagate the pair message there was a need
for Command wrapper (to be able to send command and parameter in
one piece)
2021-02-21 14:17:29 +01:00
Pawel Olejniczak
cda64d4f8a [EGD-4340] Refactor bluetooth settings and add device windows
Rewrote these windows in a proper way.
Fixed few minor issues.
GUI adjustments.
2021-02-18 18:05:16 +01:00
Wiktor S. Ovalle Correa
c7b7cc4c27 [EGD-5737] Merge master into experimental
Keep experimental up to date with changes from master
2021-02-17 17:10:32 +01:00
Wiktor S. Ovalle Correa
3b141041e9 [EGD-5737] Merge master into experimental
Keep experimental up to date with changes from master
2021-02-17 17:09:37 +01:00
Hubert Chrzaniuk
bb92b333da [EGD-5355] Fix emulator crash
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.
2021-02-17 17:06:59 +01:00
Lucjan Bryndza
067ca94835 [EGD-5737] Merge master into experimental
Keep experimental up to date with changes from master
2021-02-17 17:06:30 +01:00
Marcin Smoczyński
bda18b5b54 [EGD-5706] Refactor creating audio device
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>
2021-02-17 16:20:59 +01:00
Lucjan Bryndza
6c4c4e8aef [EGD-5098] Fix and remove old vfs class
Fix and remove global vfs object remove all old data
included in the vfs.hpp class
2021-02-17 16:06:33 +01:00
SP2FET
619ad219d2 [EGD-4394] Add BT device name change
Added handling of BT device name changing
2021-02-16 12:38:16 +01:00
SP2FET
133e5c2761 [EGD-5484] Add BT scan documentation
Added documentation related to BT scan operation
2021-02-16 11:28:43 +01:00
SP2FET
cc18f9ba9b [EGD-5475] Add BT on/off documentation
Added documentation with on/off BT flow
2021-02-15 11:54:04 +01:00
SP2FET
a30887bb40 [EGD-5666] Add BT off function
Turning BT off was impossible thus there was the need of fixing it
Updated harness test
2021-02-11 12:01:58 +01:00
SP2FET
fa24dcc829 [EGD-5483] Updated BT harness tests
Added harness test for BT scan in order to be able
to test regression
2021-02-11 11:48:07 +01:00
SP2FET
e191817953 [EGD-5480] Bluetooth scan refactor
There was a need for Bluetooth scan code refactor. Here it is
2021-02-10 14:33:14 +01:00
Piotr Tański
bc4d32c7d8 [EGD-5158] Change access to the bus methods
The bus is now accessible only via Service object.
2021-02-08 16:56:42 +01:00