hal: QCV changes for remaining HAL compile time feature
flags
Removed all feature flags except those that are hardware
specific, legacy features, non-LA features.
Moved following features to runtime enable:
- HFP
- EXT_HW_PLUGIN
- HDMI_PASSTHROUGH
- BATTERY_LISTENER
- INCALL_MUSIC
- CONCURRENT_CAPTURE
- COMPRESS_IN_CAPTURE
- HWDEP_CAL
- RECORD_PLAY_CONCURRENCY
Disabled AUTO_HAL compiletime flag temporarily after
discussing with Derek Chen. Will be re-enabled as
runtime flag later.
Change-Id: I55a58ca405b58be99e1873a5198fa201c0525725
diff --git a/hal/audio_extn/utils.c b/hal/audio_extn/utils.c
index c7d3bd4..6a74a4c 100644
--- a/hal/audio_extn/utils.c
+++ b/hal/audio_extn/utils.c
@@ -48,10 +48,8 @@
#endif
#ifdef AUDIO_EXTERNAL_HDMI_ENABLED
-#ifdef HDMI_PASSTHROUGH_ENABLED
#include "audio_parsers.h"
#endif
-#endif
#ifdef LINUX_ENABLED
#define AUDIO_OUTPUT_POLICY_VENDOR_CONFIG_FILE "/etc/audio_output_policy.conf"
@@ -129,9 +127,7 @@
STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD),
STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_NON_BLOCKING),
STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_HW_AV_SYNC),
-#ifdef INCALL_MUSIC_ENABLED
STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_INCALL_MUSIC),
-#endif
STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH),
STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_TIMESTAMP),
STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_VOIP_RX),
@@ -1786,7 +1782,6 @@
channel_status[3] |= SR_48000;
}
-#ifdef HDMI_PASSTHROUGH_ENABLED
int32_t get_compressed_channel_status(void *audio_stream_data,
uint32_t audio_frame_size,
unsigned char *channel_status,
@@ -1815,8 +1810,6 @@
}
-#endif
-
void get_lpcm_channel_status(uint32_t sampleRate,
unsigned char *channel_status)
{
@@ -1873,15 +1866,14 @@
const char *mixer_ctl_name = "IEC958 Playback PCM Stream";
struct mixer_ctl *ctl;
ALOGV("%s: buffer %s bytes %zd", __func__, buffer, bytes);
-#ifdef HDMI_PASSTHROUGH_ENABLED
+
if (audio_extn_utils_is_dolby_format(out->format) &&
/*TODO:Extend code to support DTS passthrough*/
/*set compressed channel status bits*/
- audio_extn_passthru_is_passthrough_stream(out)){
+ audio_extn_passthru_is_passthrough_stream(out) &&
+ audio_extn_is_hdmi_passthru_enabled()) {
get_compressed_channel_status(buffer, bytes, channel_status, AUDIO_PARSER_CODEC_AC3);
- } else
-#endif
- {
+ } else {
/*set channel status bit for LPCM*/
get_lpcm_channel_status(out->sample_rate, channel_status);
}