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
This commit is contained in:
Haynes Mathew George
2018-02-21 14:45:20 -08:00
committed by Mikhail Naganov
parent 85c3cf436b
commit a57f41d58c
2 changed files with 5 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ LOCAL_SRC_FILES := \
LOCAL_CFLAGS := -Wall -Werror
LOCAL_SHARED_LIBRARIES := \
libbinder \
libhidlbase \
libhidltransport \
liblog \

View File

@@ -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>();