summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaynes Mathew George <hgeorge@codeaurora.org>2018-02-21 14:45:20 -0800
committerMikhail Naganov <mnaganov@google.com>2018-02-28 12:35:18 -0800
commita57f41d58cf61aa4da84a43e6eb6809530574f4d (patch)
treeae4c9c6fe01db9b9a07f350f9526a009abc969a7
parent85c3cf436b1ed1b0b32a3b03b1afa8b66a7e6169 (diff)
downloadplatform_hardware_interfaces-a57f41d58cf61aa4da84a43e6eb6809530574f4d.tar.gz
platform_hardware_interfaces-a57f41d58cf61aa4da84a43e6eb6809530574f4d.tar.bz2
platform_hardware_interfaces-a57f41d58cf61aa4da84a43e6eb6809530574f4d.zip
audio: Initialize processstate with vndbinder
Initialize processtate with vndbinder to allow vendor components to talk via vndbinder Test: re-launch android.hardware.audio@2.0 service Change-Id: I9fafff157c5e497a8125b13741b56e0852534ffa
-rw-r--r--audio/2.0/default/Android.mk1
-rw-r--r--audio/2.0/default/service.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/audio/2.0/default/Android.mk b/audio/2.0/default/Android.mk
index 12713d3037..edf1761b7f 100644
--- a/audio/2.0/default/Android.mk
+++ b/audio/2.0/default/Android.mk
@@ -31,6 +31,7 @@ LOCAL_SRC_FILES := \
LOCAL_CFLAGS := -Wall -Werror
LOCAL_SHARED_LIBRARIES := \
+ libbinder \
libhidlbase \
libhidltransport \
liblog \
diff --git a/audio/2.0/default/service.cpp b/audio/2.0/default/service.cpp
index 3cf7134258..d554481291 100644
--- a/audio/2.0/default/service.cpp
+++ b/audio/2.0/default/service.cpp
@@ -20,6 +20,7 @@
#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
#include <android/hardware/soundtrigger/2.1/ISoundTriggerHw.h>
+#include <binder/ProcessState.h>
#include <hidl/HidlTransportSupport.h>
#include <hidl/LegacySupport.h>
@@ -36,6 +37,9 @@ using android::hardware::registerPassthroughServiceImplementation;
using android::OK;
int main(int /* argc */, char* /* argv */ []) {
+ android::ProcessState::initWithDriver("/dev/vndbinder");
+ // start a threadpool for vndbinder interactions
+ android::ProcessState::self()->startThreadPool();
configureRpcThreadpool(16, true /*callerWillJoin*/);
android::status_t status;
status = registerPassthroughServiceImplementation<IDevicesFactory>();