summaryrefslogtreecommitdiffstats
path: root/hal
diff options
context:
space:
mode:
authorWeiyin Jiang <wjiang@codeaurora.org>2019-07-18 17:24:21 +0800
committerSamyak Jain <samyjain@codeaurora.org>2019-11-05 11:17:26 +0530
commitebfa0502f5a06a2556ebea98ae20df1cdc58beca (patch)
treec7057b2b19d72336062c00400c5de2e38775aee7 /hal
parent5171705a38e73290c2b14b7ed778917ea29add15 (diff)
downloadandroid_hardware_qcom_audio-ebfa0502f5a06a2556ebea98ae20df1cdc58beca.tar.gz
android_hardware_qcom_audio-ebfa0502f5a06a2556ebea98ae20df1cdc58beca.tar.bz2
android_hardware_qcom_audio-ebfa0502f5a06a2556ebea98ae20df1cdc58beca.zip
hal: fix media param not sent during gapless transition
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
Diffstat (limited to 'hal')
-rw-r--r--hal/Android.mk4
-rw-r--r--hal/audio_extn/audio_extn.h3
-rw-r--r--hal/audio_hw.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/hal/Android.mk b/hal/Android.mk
index 569cd3ba..bf19326f 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -169,6 +169,10 @@ ifeq ($(strip $(AUDIO_FEATURE_ENABLED_DLKM)),true)
LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/vendor/qcom/opensource/audio-kernel/include
endif
+ifeq ($(strip $(AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT)),true)
+ LOCAL_CFLAGS += -DENABLE_EXTENDED_COMPRESS_FORMAT
+endif
+
LOCAL_CFLAGS += -DUSE_VENDOR_EXTN
# Legacy feature
diff --git a/hal/audio_extn/audio_extn.h b/hal/audio_extn/audio_extn.h
index 74581cd8..f37c948e 100644
--- a/hal/audio_extn/audio_extn.h
+++ b/hal/audio_extn/audio_extn.h
@@ -108,9 +108,10 @@ int audio_extn_parse_compress_metadata(struct stream_out *out,
#define AUDIO_OUTPUT_BIT_WIDTH ((config->offload_info.bit_width == 32) ? 24\
:config->offload_info.bit_width)
-#ifndef AUDIO_HW_EXTN_API_ENABLED
+#ifndef ENABLE_EXTENDED_COMPRESS_FORMAT
#define compress_set_metadata(compress, metadata) (0)
#define compress_get_metadata(compress, metadata) (0)
+#define compress_set_next_track_param(compress, codec_options) (0)
#endif
#define MAX_LENGTH_MIXER_CONTROL_IN_INT (128)
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 38e57a82..24516a2e 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3232,7 +3232,7 @@ static void *offload_thread_loop(void *context)
int ret = 0;
setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_AUDIO);
- //set_sched_policy(0, SP_FOREGROUND);
+ set_sched_policy(0, SP_FOREGROUND);
prctl(PR_SET_NAME, (unsigned long)"Offload Callback", 0, 0, 0);
ALOGV("%s", __func__);
@@ -5520,7 +5520,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer,
out->send_new_metadata = 0;
if (out->send_next_track_params && out->is_compr_metadata_avail) {
ALOGD("copl(%p):send next track params in gapless", out);
- // compress_set_next_track_param(out->compr, &(out->compr_config.codec->options));
+ compress_set_next_track_param(out->compr, &(out->compr_config.codec->options));
out->send_next_track_params = false;
out->is_compr_metadata_avail = false;
}