History log of /system/chre/host/msm/daemon/chre_daemon.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b0bd0c2b3c1b0e7fb9c6652753a24de28809ff28 03-Oct-2017 Arthur Ishiguro <arthuri@google.com> Fix overflow in time sync offset calculation

Ticks to nanosecond conversion math in time sync offset calculation
overflowed after 11 days.

Bug: 67059655
Test: Compile and run on device, and verify that offset matches expected
value based on the qTimer counter and elapsedRealtimenano() values.
Change-Id: I659cde63bc4db75b6df57e6f62a4c32e0d78195f
/system/chre/host/msm/daemon/chre_daemon.cc
4b2c7edecd587358d7fbdcd7a3d1dc8ec0734997 29-Jun-2017 Arthur Ishiguro <arthuri@google.com> Periodically send time sync message from host

- Schedules a timer after receiving a time sync message to request for
another one after a fixed time interval
- CHRE daemon sends a time sync message when receiving this request
- CHRE also opportunistically sends a request along with message to the
host at a shorter time interval

Bug: 62910293
Test: Run on device, verify time sync msgs are periodically sent
Change-Id: Iab277b4fe097b2190bed5483bba17d93771e11e3
/system/chre/host/msm/daemon/chre_daemon.cc
26a76b2c0f8ed1c34833dedfc4915aa9602f545a 09-Jun-2017 Brian Duddie <bduddie@google.com> Increase max message to host size, minor cleanup

On SLPI, the host allocates a 4KB buffer to use when receiving messages
from CHRE. Increase the maximum message size we accept from nanoapps
from 2048 to 4000 bytes to allow nanoapps to use a larger portion of
this buffer. The remaining 96 bytes are reserved for current and future
overhead.

Also, avoid reallocation of the buffer used to construct the FlatBuffer
for nanoapp messages to the host by increasing the fixed buffer
reservation.

Drop log message on path from host to nanoapp in the daemon from debug
to verbose level, which matches the similar verbose log in the reverse
path.

Bug: 37640330
Test: run MessageWorld on-device + chre_test_client
Change-Id: I9dfccf7b00d3d09b3be7f529271432b10c2da044
/system/chre/host/msm/daemon/chre_daemon.cc
5fc9df58dc67591b24fd04f143b61fcf12100239 18-May-2017 Arthur Ishiguro <arthuri@google.com> Modifies CHRE daemon to send time sync msg at boot

- CHRE daemon sends a time sync message at boot
- Modifies SystemTime class to store the offset
- Implements chreGetEstimatedHostTimeOffset

Test: Runs on device, verified offset stored at init
Change-Id: I0b7a7421fd0220cd51bb915d7b5cd1a7887667ce
/system/chre/host/msm/daemon/chre_daemon.cc
e20119f9744b238ff0fbb318df79ddf1338edb79 19-Apr-2017 Andrew Rossignol <aarossig@google.com> Improves the robustness of the shutdown case of the host daemon

Test: Run on device.
Change-Id: Ibc3addadd47503feccd7f47baa6c216ce358c8eb
/system/chre/host/msm/daemon/chre_daemon.cc
2f6b50aa8e01717948efd3024f6ab4f4825c0a18 15-Apr-2017 Andrew Rossignol <aarossig@google.com> Support for printing logs via logcat on the host

Test: Run on device, see logs in logcat
Change-Id: I067defab05173b119923a850cdb0bce5b038dd8e
/system/chre/host/msm/daemon/chre_daemon.cc
803d1341ff577c6958c24414fc95d30c9bf2b58c 04-Apr-2017 Brian Duddie <bduddie@google.com> Revert "Add workaround for FastRPC crash on boot"

This reverts commit 99298ff1d87026c8a4c86afc2c3eb0133e7e4885.

Reason for revert: Workaround no longer necessary - root cause fixed.

Change-Id: I57ba15822aec9702a3fa02fc491e38e4fd8a3ab4
/system/chre/host/msm/daemon/chre_daemon.cc
99298ff1d87026c8a4c86afc2c3eb0133e7e4885 31-Mar-2017 Brian Duddie <bduddie@google.com> Add workaround for FastRPC crash on boot

Delay CHRE daemon initialization to avoid triggering a crash in the SLPI
when CHRE is run as part of device boot.

Bug: 36792843
Test: include chre in init.rc, verify SLPI doesn't crash on boot (x5
with uart enabled and usb connected, x5 with uart disabled and usb
connected, x5 with uart disabled and usb disconnected)
Change-Id: I7ed55fb1cb71612dee41452c35722975e3b1a216
/system/chre/host/msm/daemon/chre_daemon.cc
56944d8c8698b3304ddc52dd257ec8da30dcb189 30-Mar-2017 Brian Duddie <bduddie@google.com> Reduce debugging output from CHRE daemon

Test: load, confirm verbose binary buffer dumps are not printed
Change-Id: I2974690a608cd66cc37fcb9e2990ec3063e74c69
/system/chre/host/msm/daemon/chre_daemon.cc
47a99dc3cacacb0418548609c0e2d3b2b70d821e 27-Mar-2017 Brian Duddie <bduddie@google.com> Implement dynamic loading of nanoapps

Add support for loading a dynamic shared object containing a nanoapp
that has been received over the communications link with the host.

Test: use chre_test_client to load activity recognition on SLPI
Change-Id: I76da777ec19283ee67120b4b024133c556edf6e2
/system/chre/host/msm/daemon/chre_daemon.cc
f685db3a6b34f8dd6942964ae99836bda87c8134 21-Mar-2017 Brian Duddie <bduddie@google.com> Support unicast messages from CHRE to host

Tag messages sent to CHRE with the client ID of the sender. Populate
this same value in the response to discriminate the addressee so that
responses are only delivered to the client who sent the request.

Test: run multiple instances of chre_test_client
Change-Id: I60d52944cf4e6cb2bb1fb21e9806eadd7f74b6c2
/system/chre/host/msm/daemon/chre_daemon.cc
43898ec8a71749fc3a244d29b1d3e4bd96b6f68d 19-Mar-2017 Brian Duddie <bduddie@google.com> Don't deliver empty messages from CHRE to clients

Ensure that messages are non-empty and CHRE returned success before
attempting to deliver message data to clients connected to the daemon
via the socket interface. Empty messages are likely to be interpreted as
a connection close event.

Test: run chre_test_client
Change-Id: I16049f4d59bb0365a273bf90cd84af556b4118b7
/system/chre/host/msm/daemon/chre_daemon.cc
f972651484105181854f604e4709e32c8bf30375 14-Mar-2017 Brian Duddie <bduddie@google.com> Add SocketClient, move shareable code to common

Add a SocketClient as a helper to simplify interacting with the socket
connection, including automatically reconnecting if the remote end dies.
Another layer is expected to be added on top of this to handle
encoding/decoding messages.

Move the SocketServer and chre_test_client code from the MSM-specific
folder to common, as these can be used in any platform where there's a
userspace daemon that acts as the entry point to CHRE communications.

Test: compile, run chre and chre_test_client
Change-Id: I69c06eb823670beb0a8d018b8fe80495ced842a5
/system/chre/host/msm/daemon/chre_daemon.cc
3d0e53bc6419ee6110ca75ab30f369856fe5b28d 10-Mar-2017 Brian Duddie <bduddie@google.com> Expose socket interface to CHRE daemon

Run a Unix domain socket server in the CHRE daemon so clients such as
the context hub HAL implementation can connect and communicate with
CHRE. Add a test client binary to help with initial testing in
conjunction with the message world app.

Test: run CHRE with message world app loaded, and use chre_test_client
Change-Id: I444f883a468e1c0fa8d96fbeee670540fa6844e7
/system/chre/host/msm/daemon/chre_daemon.cc
aa505261768ffa12ab6dd1ca47484fbae8a8df4b 11-Mar-2017 Brian Duddie <bduddie@google.com> Add CHRE FastRPC daemon source files

Add sources for the AP-side daemon that hosts CHRE on SLPI using
FastRPC. These files were moved from the applicable vendor directory at
commit 0a76d02, and have only minor modifications made for compilation.
Although the source is included here for reference, this binary is built
out of vendor as the FastRPC generated sources depend on proprietary
header files that can be found in the Hexagon SDK.

The sources generated from the FastRPC IDL file are checked in to allow
this daemon to be built in Android without introducing a need to include
the proprietary QAIC tool.

Test: compile and run CHRE on-device
Change-Id: I5d09a7410dedfeba21495313e33b30954b522b83
/system/chre/host/msm/daemon/chre_daemon.cc