msm8974-common: sensors: Tune binder buffer for sensors HIDL

Setting custom binder buffer size for sensors HIDL service.

Change-Id: I83ebdc77ed7aec0e25a975097358440681ca5f11
This commit is contained in:
Shaikh Shadul 2018-08-14 19:12:01 +05:30 committed by Kevin F. Haggerty
parent b14c7f0152
commit eb5a728efa
No known key found for this signature in database
GPG Key ID: 6D95512933112729
2 changed files with 13 additions and 0 deletions

View File

@ -46,6 +46,7 @@ cc_library_shared {
cc_binary { cc_binary {
name: "android.hardware.sensors@1.0-service.samsung8974", name: "android.hardware.sensors@1.0-service.samsung8974",
defaults: ["hidl_defaults"],
relative_install_path: "hw", relative_install_path: "hw",
vendor: true, vendor: true,
init_rc: ["android.hardware.sensors@1.0-service.samsung8974.rc"], init_rc: ["android.hardware.sensors@1.0-service.samsung8974.rc"],
@ -59,6 +60,12 @@ cc_binary {
"libutils", "libutils",
"libhidlbase", "libhidlbase",
"libhidltransport", "libhidltransport",
"libhwbinder",
"android.hardware.sensors@1.0", "android.hardware.sensors@1.0",
], ],
arch: {
arm: {
cflags: ["-DARCH_ARM_32"],
},
},
} }

View File

@ -18,11 +18,17 @@
#include <android/hardware/sensors/1.0/ISensors.h> #include <android/hardware/sensors/1.0/ISensors.h>
#include <hidl/LegacySupport.h> #include <hidl/LegacySupport.h>
#ifdef ARCH_ARM_32
#include <hwbinder/ProcessState.h>
#endif
using android::hardware::sensors::V1_0::ISensors; using android::hardware::sensors::V1_0::ISensors;
using android::hardware::defaultPassthroughServiceImplementation; using android::hardware::defaultPassthroughServiceImplementation;
int main() { int main() {
#ifdef ARCH_ARM_32
android::hardware::ProcessState::initWithMmapSize((size_t)8192);
#endif
/* Sensors framework service needs at least two threads. /* Sensors framework service needs at least two threads.
* One thread blocks on a "poll" * One thread blocks on a "poll"
* The second thread is needed for all other HAL methods. * The second thread is needed for all other HAL methods.