audiohal: Always load A2DP module locally
This makes legitimate unix socket interaction between A2DP
module and the Bluetooth stack.
Implemented by allowing both "local" and "hidl" interface
wrappers to co-exist for devices and streams. A "hybrid" device
factory is introduced to create an appropriate implementation
of a device depending on the requested module name.
Bug: 37640821
Test: Play Music over BT headset
Change-Id: I5592961dd5b56840418fb122680979d11a261b6c
diff --git a/media/libaudiohal/EffectBufferHalHidl.cpp b/media/libaudiohal/EffectBufferHalHidl.cpp
index ef4097a..8b5201b 100644
--- a/media/libaudiohal/EffectBufferHalHidl.cpp
+++ b/media/libaudiohal/EffectBufferHalHidl.cpp
@@ -47,7 +47,7 @@
status_t EffectBufferHalInterface::mirror(
void* external, size_t size, sp<EffectBufferHalInterface>* buffer) {
sp<EffectBufferHalInterface> tempBuffer = new EffectBufferHalHidl(size);
- status_t result = reinterpret_cast<EffectBufferHalHidl*>(tempBuffer.get())->init();
+ status_t result = static_cast<EffectBufferHalHidl*>(tempBuffer.get())->init();
if (result == OK) {
tempBuffer->setExternalData(external);
*buffer = tempBuffer;