From a57f41d58cf61aa4da84a43e6eb6809530574f4d Mon Sep 17 00:00:00 2001 From: Haynes Mathew George Date: Wed, 21 Feb 2018 14:45:20 -0800 Subject: [PATCH] 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 --- audio/2.0/default/Android.mk | 1 + audio/2.0/default/service.cpp | 4 ++++ 2 files changed, 5 insertions(+) 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 #include #include +#include #include #include @@ -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();