summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2012-10-12 19:06:16 +0200
committerPaul Kocialkowski <contact@paulk.fr>2012-10-12 19:06:16 +0200
commit005fa70b060726b5b3cac22a4cf8adbe45281104 (patch)
tree7a48372d047d0c91e210b49b2a2a5a0afb782ece
parentf17d43066fc1f8b03947032bb04a1b5cc22203fa (diff)
downloadhardware_tinyalsa-audio-005fa70b060726b5b3cac22a4cf8adbe45281104.zip
hardware_tinyalsa-audio-005fa70b060726b5b3cac22a4cf8adbe45281104.tar.gz
hardware_tinyalsa-audio-005fa70b060726b5b3cac22a4cf8adbe45281104.tar.bz2
Build each file separately (with header inclusion fix)
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--Android.mk6
-rw-r--r--audio_hw.c12
-rw-r--r--audio_hw.h7
-rw-r--r--audio_in.c16
-rw-r--r--audio_out.c12
5 files changed, 34 insertions, 19 deletions
diff --git a/Android.mk b/Android.mk
index f412a89..2158a48 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,12 +15,14 @@
LOCAL_PATH := $(call my-dir)
-ifeq ($(strip $(BOARD_USES_TINYALSA_LIBAUDIO)),true)
+ifeq ($(strip $(BOARD_USES_TINYALSA_LIBAUDIO)),true)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
- audio_hw.c
+ audio_hw.c \
+ audio_out.c \
+ audio_in.c
LOCAL_C_INCLUDES += \
external/tinyalsa/include \
diff --git a/audio_hw.c b/audio_hw.c
index 317a798..30d8931 100644
--- a/audio_hw.c
+++ b/audio_hw.c
@@ -30,18 +30,6 @@
#include "audio_hw.h"
/*
- * Output
- */
-
-#include "audio_out.c"
-
-/*
- * Input
- */
-
-#include "audio_in.c"
-
-/*
* Functions
*/
diff --git a/audio_hw.h b/audio_hw.h
index d8beb81..2419883 100644
--- a/audio_hw.h
+++ b/audio_hw.h
@@ -42,8 +42,13 @@ struct tinyalsa_audio_device {
int audio_hw_open_output_stream(struct audio_hw_device *dev,
uint32_t devices, int *format, uint32_t *channels, uint32_t *sample_rate,
struct audio_stream_out **stream_out);
-
void audio_hw_close_output_stream(struct audio_hw_device *dev,
struct audio_stream_out *stream);
+int audio_hw_open_input_stream(struct audio_hw_device *dev,
+ uint32_t devices, int *format, uint32_t *channels, uint32_t *sample_rate,
+ audio_in_acoustics_t acoustics, struct audio_stream_in **stream_in);
+void audio_hw_close_input_stream(struct audio_hw_device *dev,
+ struct audio_stream_in *stream);
+
#endif
diff --git a/audio_in.c b/audio_in.c
index ef6730b..4fd1527 100644
--- a/audio_in.c
+++ b/audio_in.c
@@ -18,9 +18,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#undef LOG_TAG
#define LOG_TAG "audio_in"
+#include <errno.h>
+#include <pthread.h>
+#include <stdint.h>
+#include <sys/time.h>
+
+#include <cutils/log.h>
+
+#define EFFECT_UUID_NULL EFFECT_UUID_NULL_IN
+#define EFFECT_UUID_NULL_STR EFFECT_UUID_NULL_STR_IN
+#include "audio_hw.h"
+
/*
* Functions
*/
@@ -129,7 +139,7 @@ static int audio_in_remove_audio_effect(const struct audio_stream *stream, effec
* Interface
*/
-static void audio_hw_close_input_stream(struct audio_hw_device *dev,
+void audio_hw_close_input_stream(struct audio_hw_device *dev,
struct audio_stream_in *stream)
{
LOGD("%s(%p)", __func__, stream);
@@ -138,7 +148,7 @@ static void audio_hw_close_input_stream(struct audio_hw_device *dev,
free(stream);
}
-static int audio_hw_open_input_stream(struct audio_hw_device *dev,
+int audio_hw_open_input_stream(struct audio_hw_device *dev,
uint32_t devices, int *format, uint32_t *channels, uint32_t *sample_rate,
audio_in_acoustics_t acoustics, struct audio_stream_in **stream_in)
{
diff --git a/audio_out.c b/audio_out.c
index 04655e0..2b3c854 100644
--- a/audio_out.c
+++ b/audio_out.c
@@ -18,9 +18,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#undef LOG_TAG
#define LOG_TAG "audio_out"
+#include <errno.h>
+#include <pthread.h>
+#include <stdint.h>
+#include <sys/time.h>
+
+#include <cutils/log.h>
+
+#define EFFECT_UUID_NULL EFFECT_UUID_NULL_OUT
+#define EFFECT_UUID_NULL_STR EFFECT_UUID_NULL_STR_OUT
+#include "audio_hw.h"
+
/*
* Functions
*/