Update NBAIO to use the new audio HAL abstraction layer
Moved the HAL access abstraction layer to a separate library so it
can be used both by audioflinger and libnbaio.
Bug: 30222631
Test: manual with Loopback app, Hangouts, YouTube
Change-Id: Id622c2f1aa8f55a775d34f369a596c2c4d29d5be
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 7675a12..3b05c48 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -73,9 +73,6 @@
#include "AutoPark.h"
-// FIXME: Remove after NBAIO is converted
-#include "StreamHalLocal.h"
-
// ----------------------------------------------------------------------------
// Note: the following macro is used for extremely verbose logging message. In
@@ -3618,8 +3615,7 @@
return;
}
// create an NBAIO sink for the HAL output stream, and negotiate
- mOutputSink = new AudioStreamOutSink(
- static_cast<StreamOutHalLocal*>(output->stream.get())->getStream());
+ mOutputSink = new AudioStreamOutSink(output->stream);
size_t numCounterOffers = 0;
const NBAIO_Format offers[1] = {Format_from_SR_C(mSampleRate, mChannelCount, mFormat)};
#if !LOG_NDEBUG
@@ -5926,8 +5922,7 @@
readInputParameters_l();
// create an NBAIO source for the HAL input stream, and negotiate
- mInputSource = new AudioStreamInSource(
- static_cast<StreamInHalLocal*>(input->stream.get())->getStream());
+ mInputSource = new AudioStreamInSource(input->stream);
size_t numCounterOffers = 0;
const NBAIO_Format offers[1] = {Format_from_SR_C(mSampleRate, mChannelCount, mFormat)};
#if !LOG_NDEBUG