summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeiyin Jiang <wjiang@codeaurora.org>2019-07-18 17:24:21 +0800
committerBruno Martins <bgcngm@gmail.com>2019-12-07 00:59:48 +0200
commit2869d8e760572c81ee3bdec3e08f79cc91a97f01 (patch)
treea1cd8eb5d72ff307fed3bcd6b54f8b193de7fbcd
parente351fe80a1b86399f7d52c34eb37878ea3e0c25f (diff)
downloadandroid_hardware_qcom_audio-lineage-17.0-caf-msm8994.tar.gz
android_hardware_qcom_audio-lineage-17.0-caf-msm8994.tar.bz2
android_hardware_qcom_audio-lineage-17.0-caf-msm8994.zip
hal: fix media param not sent during gapless transitionlineage-17.0-caf-msm8994
QC defined interfaces in tinycompress to handle metadata of extended audio format. These interfaces aren't enabled in tinycompress lib. Use feature flag to enable these APIs for QC AHAL. CRs-Fixed: 2491047 Change-Id: I0644bd0965a3850ef4c728ca881bf81cdbd8bc53
-rw-r--r--hal/Android.mk4
-rw-r--r--hal/audio_extn/audio_extn.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/hal/Android.mk b/hal/Android.mk
index 890d4722..7eca4aaf 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -121,6 +121,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTN_FORMATS)),true)
LOCAL_CFLAGS += -DAUDIO_EXTN_FORMATS_ENABLED
endif
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT)),true)
+ LOCAL_CFLAGS += -DENABLE_EXTENDED_COMPRESS_FORMAT
+endif
+
ifeq ($(strip $(AUDIO_FEATURE_ENABLED_SPKR_PROTECTION)),true)
LOCAL_CFLAGS += -DSPKR_PROT_ENABLED
LOCAL_SRC_FILES += audio_extn/spkr_protection.c
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index fad9c0f1..799143cd 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -85,6 +85,10 @@ int audio_extn_parse_compress_metadata(struct stream_out *out,
#define AUDIO_OUTPUT_BIT_WIDTH (CODEC_BACKEND_DEFAULT_BIT_WIDTH)
#endif
+#ifndef ENABLE_EXTENDED_COMPRESS_FORMAT
+#define compress_set_next_track_param(compress, codec_options) (0)
+#endif
+
#define MAX_LENGTH_MIXER_CONTROL_IN_INT (128)
void audio_extn_set_parameters(struct audio_device *adev,