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:58:56 +0200
commit3e3cfe0e848dea87d9b8ba3f6ead0082c7c539b9 (patch)
treedc90009b18f4d8417d6b737147fc44cabbd1ce29
parent369d0427e28b01815e87f42f9c8ceba883039418 (diff)
downloadandroid_hardware_qcom_audio-lineage-17.0-caf-msm8916.tar.gz
android_hardware_qcom_audio-lineage-17.0-caf-msm8916.tar.bz2
android_hardware_qcom_audio-lineage-17.0-caf-msm8916.zip
hal: fix media param not sent during gapless transitionlineage-17.0-caf-msm8916
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 be921667..61c4deed 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -135,6 +135,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 ac3a1fc2..fc694d59 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -93,6 +93,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,