audio: Start Binder pool thread explicitly

It was noted that calling 'ABinderProcess_startThreadPool'
results in the audio HAL service having more Binder pool
threads than without it. This is preferred to having
just one thread via 'ABinderProcess_joinThreadPool'
as in the latter case clients may seemingly be blocked
instead of being served by a newly spawned thread from
the pool.

Bug: 357669241
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ia8ed52b3c5a95cea12d063a0e75ac908af9260f8
This commit is contained in:
Mikhail Naganov
2024-08-19 14:48:28 -07:00
parent fc8d55a0bf
commit 1840d35645

View File

@@ -71,6 +71,7 @@ int main() {
// For more logs, use VERBOSE, however this may hinder performance.
// android::base::SetMinimumLogSeverity(::android::base::VERBOSE);
ABinderProcess_setThreadPoolMaxThreadCount(16);
ABinderProcess_startThreadPool();
// Guaranteed log for b/210919187 and logd_integration_test
LOG(INFO) << "Init for Audio AIDL HAL";