From 99ba13543a75bf29ff42ba13e958435bb927b5d4 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Wed, 20 Apr 2011 01:22:02 -0700 Subject: crespo/audio: build hal modules instead of libaudio Change-Id: Ia4134c310a8e854d85c3584907a4da07355cc2b3 Signed-off-by: Dima Zavin --- libaudio/Android.mk | 30 ++++++++++++++++-------------- libaudio/AudioHardware.cpp | 2 +- libaudio/AudioHardware.h | 9 ++++++++- libaudio/AudioPolicyManager.cpp | 2 +- libaudio/AudioPolicyManager.h | 2 +- 5 files changed, 27 insertions(+), 18 deletions(-) (limited to 'libaudio') diff --git a/libaudio/Android.mk b/libaudio/Android.mk index 726859b..9dbe57d 100644 --- a/libaudio/Android.mk +++ b/libaudio/Android.mk @@ -1,7 +1,5 @@ LOCAL_PATH:= $(call my-dir) -ifneq ($(filter crespo crespo4g,$(TARGET_DEVICE)),) - include $(CLEAR_VARS) LOCAL_SRC_FILES:= aplay.c alsa_pcm.c alsa_mixer.c LOCAL_MODULE:= aplay @@ -25,12 +23,12 @@ include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) LOCAL_SRC_FILES:= AudioHardware.cpp alsa_mixer.c alsa_pcm.c -LOCAL_MODULE:= libaudio -LOCAL_STATIC_LIBRARIES:= libaudiointerface -LOCAL_SHARED_LIBRARIES:= libc libcutils libutils libmedia libhardware_legacy -ifeq ($(BOARD_HAVE_BLUETOOTH),true) - LOCAL_SHARED_LIBRARIES += liba2dp -endif +LOCAL_MODULE := audio.primary.herring +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw +LOCAL_STATIC_LIBRARIES:= libmedia_helper +LOCAL_SHARED_LIBRARIES:= libcutils libutils libmedia libhardware_legacy +LOCAL_WHOLE_STATIC_LIBRARIES := libaudiohw_legacy +LOCAL_MODULE_TAGS := optional ifeq ($(TARGET_SIMULATOR),true) LOCAL_LDLIBS += -ldl @@ -41,13 +39,17 @@ endif include $(BUILD_SHARED_LIBRARY) include $(CLEAR_VARS) -LOCAL_SRC_FILES:= AudioPolicyManager.cpp -LOCAL_MODULE:= libaudiopolicy -LOCAL_STATIC_LIBRARIES:= libaudiopolicybase -LOCAL_SHARED_LIBRARIES:= libc libcutils libutils libmedia + +LOCAL_SRC_FILES := AudioPolicyManager.cpp +LOCAL_SHARED_LIBRARIES := libcutils libutils libmedia +LOCAL_STATIC_LIBRARIES := libmedia_helper +LOCAL_WHOLE_STATIC_LIBRARIES := libaudiopolicy_legacy +LOCAL_MODULE := audio_policy.herring +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw +LOCAL_MODULE_TAGS := optional + ifeq ($(BOARD_HAVE_BLUETOOTH),true) LOCAL_CFLAGS += -DWITH_A2DP endif -include $(BUILD_SHARED_LIBRARY) -endif +include $(BUILD_SHARED_LIBRARY) diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp index eee5f17..777b6eb 100644 --- a/libaudio/AudioHardware.cpp +++ b/libaudio/AudioHardware.cpp @@ -41,7 +41,7 @@ extern "C" { } -namespace android { +namespace android_audio_legacy { const uint32_t AudioHardware::inputSamplingRates[] = { 8000, 11025, 16000, 22050, 44100 diff --git a/libaudio/AudioHardware.h b/libaudio/AudioHardware.h index fb94e95..dc83921 100644 --- a/libaudio/AudioHardware.h +++ b/libaudio/AudioHardware.h @@ -34,7 +34,14 @@ extern "C" { struct mixer_ctl; }; -namespace android { +namespace android_audio_legacy { + using android::AutoMutex; + using android::Mutex; + using android::RefBase; + using android::SortedVector; + using android::sp; + using android::String16; + using android::Vector; // TODO: determine actual audio DSP and hardware latency // Additionnal latency introduced by audio DSP and hardware in ms diff --git a/libaudio/AudioPolicyManager.cpp b/libaudio/AudioPolicyManager.cpp index c53d1e9..bfa6c00 100644 --- a/libaudio/AudioPolicyManager.cpp +++ b/libaudio/AudioPolicyManager.cpp @@ -20,7 +20,7 @@ #include "AudioPolicyManager.h" #include -namespace android { +namespace android_audio_legacy { diff --git a/libaudio/AudioPolicyManager.h b/libaudio/AudioPolicyManager.h index 03141e5..d660e78 100644 --- a/libaudio/AudioPolicyManager.h +++ b/libaudio/AudioPolicyManager.h @@ -23,7 +23,7 @@ #include -namespace android { +namespace android_audio_legacy { class AudioPolicyManager: public AudioPolicyManagerBase { -- cgit v1.1