Abstract away access to audio devices HAL
In this CL all direct access to audio_hw_device_t and its functions is
encapsulated within the new class DeviceHalLocal. Loading of hardware
modules is encapsulated withing DevicesFactoryHalLocal. AudioFlinger
uses interface classes DevicesFactoryHalInterface and DeviceHalInterface
to access these functions.
Bug: 30222631
Change-Id: Ic88b20c55813a24b898f4a832e082c17d81935b7
diff --git a/services/audioflinger/AudioStreamOut.h b/services/audioflinger/AudioStreamOut.h
index 1e31b6a..d132f6f 100644
--- a/services/audioflinger/AudioStreamOut.h
+++ b/services/audioflinger/AudioStreamOut.h
@@ -26,6 +26,7 @@
namespace android {
class AudioHwDevice;
+class DeviceHalInterface;
/**
* Managed access to a HAL output stream.
@@ -39,7 +40,7 @@
audio_stream_out_t *stream;
const audio_output_flags_t flags;
- audio_hw_device_t *hwDev() const;
+ sp<DeviceHalInterface> hwDev() const;
AudioStreamOut(AudioHwDevice *dev, audio_output_flags_t flags);