From 005fa70b060726b5b3cac22a4cf8adbe45281104 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Fri, 12 Oct 2012 19:06:16 +0200 Subject: Build each file separately (with header inclusion fix) Signed-off-by: Paul Kocialkowski --- Android.mk | 6 ++++-- audio_hw.c | 12 ------------ audio_hw.h | 7 ++++++- audio_in.c | 16 +++++++++++++--- audio_out.c | 12 +++++++++++- 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 . */ -#undef LOG_TAG #define LOG_TAG "audio_in" +#include +#include +#include +#include + +#include + +#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 . */ -#undef LOG_TAG #define LOG_TAG "audio_out" +#include +#include +#include +#include + +#include + +#define EFFECT_UUID_NULL EFFECT_UUID_NULL_OUT +#define EFFECT_UUID_NULL_STR EFFECT_UUID_NULL_STR_OUT +#include "audio_hw.h" + /* * Functions */ -- cgit v1.1