diff options
author | Dima Zavin <dima@android.com> | 2011-04-19 16:53:42 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2011-04-27 10:48:25 -0700 |
commit | e81531e91ecae92aff471dbff9cbeb0f95ff4a80 (patch) | |
tree | 203c16c95e297163138f465e3a2a60c827873ce6 /include/hardware_legacy/AudioHardwareInterface.h | |
parent | f01215993dda68b6b52111d754bd0c7c2d5bcfa3 (diff) | |
download | hardware_libhardware_legacy-e81531e91ecae92aff471dbff9cbeb0f95ff4a80.zip hardware_libhardware_legacy-e81531e91ecae92aff471dbff9cbeb0f95ff4a80.tar.gz hardware_libhardware_legacy-e81531e91ecae92aff471dbff9cbeb0f95ff4a80.tar.bz2 |
hardware_legacy: provide HAL helpers for legacy audio users
This doesn't actually create a HAL, but rather a set of helper static
libraries that device specific libraries (i.e. the old libaudio pieces)
can link against to create a proper audio HAL module.
We provide an audio_policy static wrapper and audio hardware interface
static wrapper.
Change-Id: Ie56195447ad24b83888f752dca24674b0afd8a76
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'include/hardware_legacy/AudioHardwareInterface.h')
-rw-r--r-- | include/hardware_legacy/AudioHardwareInterface.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/hardware_legacy/AudioHardwareInterface.h b/include/hardware_legacy/AudioHardwareInterface.h index ba65d9a..198cff3 100644 --- a/include/hardware_legacy/AudioHardwareInterface.h +++ b/include/hardware_legacy/AudioHardwareInterface.h @@ -26,10 +26,17 @@ #include <utils/String8.h> #include <media/IAudioFlinger.h> -#include "media/AudioSystem.h" +#include <hardware_legacy/AudioSystemLegacy.h> +#include <hardware/audio.h> +#include <hardware/audio_hal.h> -namespace android { +#include <cutils/bitops.h> + +namespace android_audio_legacy { + using android::Vector; + using android::String16; + using android::String8; // ---------------------------------------------------------------------------- @@ -62,7 +69,7 @@ public: /** * return the frame size (number of bytes per sample). */ - uint32_t frameSize() const { return AudioSystem::popCount(channels())*((format()==AudioSystem::PCM_16_BIT)?sizeof(int16_t):sizeof(int8_t)); } + uint32_t frameSize() const { return popcount(channels())*((format()==AUDIO_FORMAT_PCM_16_BIT)?sizeof(int16_t):sizeof(int8_t)); } /** * return the audio hardware driver latency in milli seconds. |