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
diff --git a/audio/2.0/default/Android.mk b/audio/2.0/default/Android.mk
index 12713d3..edf1761 100644
--- a/audio/2.0/default/Android.mk
+++ b/audio/2.0/default/Android.mk
@@ -31,6 +31,7 @@
 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 3cf7134..d554481 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::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>();