Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67e34518 authored by Mingming Yin's avatar Mingming Yin Committed by Gerrit - the friendly Code Review server
Browse files

hal: add missing flags for extended features

- add missing feature flags and definitions
  to compile hal without extended features
  enabled.

Change-Id: I8c04ae54e6597ed43de60b2d01ca333070aef675
parent 2e995268
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ LOCAL_SRC_FILES := \

LOCAL_SRC_FILES += audio_extn/audio_extn.c

ifneq ($(strip $(AUDIO_FEATURE_DISABLED_PCM_OFFLOAD)),true)
    LOCAL_CFLAGS += -DPCM_OFFLOAD_ENABLED
endif

ifneq ($(strip $(AUDIO_FEATURE_DISABLED_ANC_HEADSET)),true)
    LOCAL_CFLAGS += -DANC_HEADSET_ENABLED
endif
+39 −0
Original line number Diff line number Diff line
@@ -22,6 +22,45 @@

#include <cutils/str_parms.h>

#ifndef PCM_OFFLOAD_ENABLED
#define AUDIO_FORMAT_PCM_OFFLOAD 0x17000000UL
#define AUDIO_FORMAT_PCM_16_BIT_OFFLOAD (AUDIO_FORMAT_PCM_OFFLOAD | AUDIO_FORMAT_PCM_SUB_16_BIT)
#define AUDIO_FORMAT_PCM_24_BIT_OFFLOAD (AUDIO_FORMAT_PCM_OFFLOAD | AUDIO_FORMAT_PCM_SUB_8_24_BIT)
#define AUDIO_OFFLOAD_CODEC_FORMAT  "music_offload_codec_format"
static inline bool audio_is_offload_pcm(audio_format_t format) {
    return ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_PCM_OFFLOAD);
}
#endif

#ifndef AFE_PROXY_ENABLED
#define AUDIO_DEVICE_OUT_PROXY 0x40000
#endif

#ifndef COMPRESS_VOIP_ENABLED
#define AUDIO_OUTPUT_FLAG_VOIP_RX 0x4000
#endif

#ifndef INCALL_MUSIC_ENABLED
#define AUDIO_OUTPUT_FLAG_INCALL_MUSIC 0x8000
#endif

#ifndef FLUENCE_ENABLED
#define AUDIO_PARAMETER_KEY_FLUENCE "fluence"
#define AUDIO_PARAMETER_VALUE_QUADMIC "quadmic"
#define AUDIO_PARAMETER_VALUE_DUALMIC "dualmic"
#define AUDIO_PARAMETER_KEY_NO_FLUENCE "none"
#endif

#ifndef FM_ENABLED
#define AUDIO_DEVICE_OUT_FM 0x80000
#define AUDIO_DEVICE_OUT_FM_TX 0x100000
#define AUDIO_SOURCE_FM_RX 9
#define AUDIO_SOURCE_FM_RX_A2DP 10
#define AUDIO_DEVICE_IN_FM_RX (AUDIO_DEVICE_BIT_IN | 0x8000)
#define AUDIO_DEVICE_IN_FM_RX_A2DP AUDIO_DEVICE_BIT_IN | 0x10000
#endif


void audio_extn_set_parameters(struct audio_device *adev,
                               struct str_parms *parms);

+2 −0
Original line number Diff line number Diff line
@@ -570,6 +570,7 @@ void voice_extn_in_get_parameters(struct stream_in *in,
    voice_extn_compress_voip_in_get_parameters(in, query, reply);
}

#ifdef INCALL_MUSIC_ENABLED
int voice_extn_check_and_set_incall_music_usecase(struct audio_device *adev,
                                                  struct stream_out *out)
{
@@ -591,4 +592,5 @@ int voice_extn_check_and_set_incall_music_usecase(struct audio_device *adev,

    return 0;
}
#endif
+1 −1
Original line number Diff line number Diff line
ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
ifneq ($(strip $(BOARD_USES_AOSP_AUDIO_POLICY_MANAGER)),true)

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
+4 −0
Original line number Diff line number Diff line
@@ -3,6 +3,10 @@ LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

ifneq ($(strip $(AUDIO_FEATURE_DISABLED_PROXY_DEVICE)),true)
    LOCAL_CFLAGS += -DAFE_PROXY_ENABLED
endif

LOCAL_SRC_FILES:= \
	bundle.c \
	equalizer.c \
Loading