Commit Graph

11 Commits

Author SHA1 Message Date
Peng Xu
2b7c19d0bc Fix the bug that causes setDelay not working
Fix the bug that causes setDelay not working. Many native sensor
apps, such as camera EIS, still use this API.

Bug: b/27790706
Change-Id: Iaf7eeb3311a2148ca556d27dbd117e1992715644
2016-03-22 21:04:23 -07:00
Ben Fennema
ca13308ce7 Merge "sensorhal: support converting raw samples back to floats" into nyc-dev 2016-03-21 22:08:08 +00:00
Ben Fennema
d801d1605a sensorhal: support converting raw samples back to floats
Bug: 27122781

Change-Id: I397773aa73161028a22e988c1231c57def5bd4a8
Signed-off-by: Ben Fennema <fennema@google.com>
2016-03-21 18:07:26 +00:00
Brian Duddie
83110051b7 Revert "Revert "nanohub: Block HAL read threads when lock file present""
This reverts commit 86d29ab208.
Compilation fix for nanohubhal.c required in upcoming commit.
2016-03-21 08:56:39 -07:00
Bart Sears
86d29ab208 Revert "nanohub: Block HAL read threads when lock file present"
This reverts commit 94e8b24272.

Change-Id: Ic2e5a4b7aa07d40e7938b56aaf56c695864044f5
2016-03-20 20:59:53 +00:00
Brian Duddie
94e8b24272 nanohub: Block HAL read threads when lock file present
Support factory calibration, low-level debug, etc. using direct access
to the device file while the Android runtime is up without interference
from the sensors HAL or context hub HAL by using a lock file. When the
HALs notice that this lock file is present, their read threads will
block until the file is removed, rather than reading from their
respective device files. This avoids the race between the read threads
and a command-line utility that are both attempting to read events from
a device file with no inherent multi-client support.

This lock file is created and deleted by nanotool (or potentially some
other utility in the future), assuming it is run with sufficient
privileges to access the directory.

The current implementation sacrifices true inter-process synchronization
for lower overhead in the read threads, meaning that nanotool needs to
use a time delay to have reasonable assurance that the HAL threads have
noticed the creation of the lock file.

Bug: 27569995
Change-Id: I692acc4ca773151fbd677ac1d71f526c598b4e5f
2016-03-17 16:51:09 -07:00
Trevor Bunker
365a5a458f hubconnection: add support for light calibration data
Bug: 27567785
Change-Id: Ia11a32c8523df28968df18c558676053943a68df
2016-03-10 10:39:50 -08:00
Andrew Rossignol
da962ef519 sensorhal: Adds some rudimentary error handling
This prevents the sensorhal from preventing the device to boot.

Change-Id: I485d8e0be9dbbe78f9824fd4d05736e7b40844aa
2016-03-03 10:02:11 -08:00
Greg Kaiser
065dfa2e1c contexthub: Remove unused variables.
Change-Id: Ie0f979b15ae38035b1e5cb0db919d65a009df449
2016-02-25 14:03:45 -08:00
Trevor Bunker
1bb150f589 sensorhal: Fix build
Change-Id: I95586d213d7ef0f3d81f5ca72289479323bfbe9d
2016-02-25 08:33:03 -08:00
Trevor Bunker
21f2c7c52a sensorhal: migrate from vendor/google_contexthub and google_chinook
- Original authors for hubconnection: Ben Fennema (fennema@google.com),
  Andreas Huber (andih@google.com), Trevor Bunker
  (trevorbunker@google.com), and Andrew Rossignol (aaross@google.com)
- Original authors for other files: Andreas Huber (andih@google.com),
  Trevor Bunker (trevorbunker@google.com), and Meng-hsuan Chung
  (menghsuan@google.com)

Change-Id: I4b1097b80315135949f0713103c61793b92126c2
2016-02-25 06:34:43 -08:00