diff options
author | fang hui <hui.fang@freescale.com> | 2015-12-18 16:42:01 +0800 |
---|---|---|
committer | leozwang <leozwang@google.com> | 2016-01-21 09:27:03 -0800 |
commit | 678dce005c323eb9f3bbcdc387ddf49b0eecfa78 (patch) | |
tree | d0e6016858439f564f0f9fc353b726eabbd53a3c | |
parent | bf1b58e742f1695522890556f073e3ade74538c5 (diff) | |
download | freescale-678dce005c323eb9f3bbcdc387ddf49b0eecfa78.tar.gz |
Refine code in alsa HALbrillo-m10-releasebrillo-m10-dev
Use macro __BRILLO__ in alsa HAL.
Change-Id: I13f766f026b1dc94b9d59067dc4f693306adca64
Signed-off-by: fang hui <hui.fang@freescale.com>
-rwxr-xr-x | peripheral/alsa/Android.mk | 14 | ||||
-rwxr-xr-x | peripheral/alsa/config_wm8960.h | 4 | ||||
-rwxr-xr-x | peripheral/alsa/tinyalsa_hal.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/peripheral/alsa/Android.mk b/peripheral/alsa/Android.mk index b46bfcc..a30264a 100755 --- a/peripheral/alsa/Android.mk +++ b/peripheral/alsa/Android.mk @@ -25,9 +25,9 @@ LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw LOCAL_SRC_FILES := tinyalsa_hal.c LOCAL_C_INCLUDES += \ - external/tinyalsa/include \ - system/media/audio_utils/include \ - system/media/audio_effects/include + external/tinyalsa/include \ + system/media/audio_utils/include \ + system/media/audio_effects/include LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libdl LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) @@ -41,12 +41,12 @@ LOCAL_MODULE := audio.primary.$(soc_name) LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_SRC_FILES := tinyalsa_hal.c control.c LOCAL_C_INCLUDES += \ - external/tinyalsa/include \ - system/media/audio_utils/include \ - system/media/audio_effects/include + external/tinyalsa/include \ + system/media/audio_utils/include \ + system/media/audio_effects/include LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libdl LOCAL_MODULE_TAGS := optional -LOCAL_CFLAGS += -DBRILLO +LOCAL_CFLAGS += -D__BRILLO__ include $(BUILD_SHARED_LIBRARY) endif diff --git a/peripheral/alsa/config_wm8960.h b/peripheral/alsa/config_wm8960.h index a250cc0..c51c9bf 100755 --- a/peripheral/alsa/config_wm8960.h +++ b/peripheral/alsa/config_wm8960.h @@ -35,7 +35,7 @@ #define MIXER_WM8960_LEFT_INPUT_SWITCH "Left Input Mixer Boost Switch" #define MIXER_WM8960_ADC_PCM_CAPTURE_VOLUME "ADC PCM Capture Volume" -#ifdef BRILLO +#ifdef __BRILLO__ #define MIXER_WM8960_LEFT_INPUT1_SWITCH "Left Boost Mixer LINPUT1 Switch" #define MIXER_WM8960_LEFT_INPUT2_SWITCH "Left Boost Mixer LINPUT2 Switch" #define MIXER_WM8960_LEFT_INPUT3_SWITCH "Left Boost Mixer LINPUT3 Switch" @@ -87,7 +87,7 @@ static struct route_setting mm_main_mic_input_wm8960[] = { .ctl_name = MIXER_WM8960_CAPTURE_VOLUME, .intval = 60, }, -#ifdef BRILLO +#ifdef __BRILLO__ { .ctl_name = MIXER_WM8960_LEFT_INPUT1_SWITCH, .intval = 1, diff --git a/peripheral/alsa/tinyalsa_hal.c b/peripheral/alsa/tinyalsa_hal.c index e1059c8..d77fd00 100755 --- a/peripheral/alsa/tinyalsa_hal.c +++ b/peripheral/alsa/tinyalsa_hal.c @@ -50,7 +50,7 @@ #include "config_sii902x.h" #include "control.h" -#ifdef BRILLO +#ifdef __BRILLO__ #define PCM_HW_PARAM_ACCESS 0 #define PCM_HW_PARAM_FORMAT 1 #define PCM_HW_PARAM_SUBFORMAT 2 @@ -2330,7 +2330,7 @@ static uint32_t in_get_input_frames_lost(struct audio_stream_in *stream) int times, diff; struct imx_stream_in *in = (struct imx_stream_in *)stream; if (in->pcm == NULL) return 0; -#ifdef BRILLO +#ifdef __BRILLO__ times = 0; #else times = pcm_get_time_of_xrun(in->pcm); @@ -3256,7 +3256,7 @@ static int adev_get_format_for_device(struct imx_audio_device *adev, uint32_t de static int pcm_get_near_param_wrap(unsigned int card, unsigned int device, unsigned int flags, int type, int *data) { -#ifdef BRILLO +#ifdef __BRILLO__ return 0; #else return pcm_get_near_param(card, device, flags, type, data); @@ -3354,7 +3354,7 @@ static int scan_available_device(struct imx_audio_device *adev, bool rescanusb, format = PCM_FORMAT_S16_LE; -#ifdef BRILLO +#ifdef __BRILLO__ adev->card_list[n]->in_format = format; #else if( pcm_check_param_mask(i, 0, PCM_IN, PCM_HW_PARAM_FORMAT, format)) |