hal:dts: Fixed high initial delay in re-encode path
-Ten to Twenty sec delay was observed in re-encode path
-Compressed fragment size was too small for DTS encoded content
-updated the fragment size
-Fix for run time media format change in QAP test app
Change-Id: If7fc06bfe4f40a00118dabced87b01964868af1e
diff --git a/hal/audio_extn/qaf.c b/hal/audio_extn/qaf.c
index 6320b94..7a1c65f 100644
--- a/hal/audio_extn/qaf.c
+++ b/hal/audio_extn/qaf.c
@@ -31,12 +31,11 @@
/*#define LOG_NDEBUG 0*/
/*#define VERY_VERY_VERBOSE_LOGGING*/
#ifdef VERY_VERY_VERBOSE_LOGGING
-#define ALOGVV ALOGV
+#define DEBUG_MSG_VV DEBUG_MSG
#else
-#define ALOGVV(a...) do { } while(0)
+#define DEBUG_MSG_VV(a...) do { } while(0)
#endif
-#define DEBUG_MSG_VV(arg,...) ALOGVV("%s: %d: " arg, __func__, __LINE__, ##__VA_ARGS__)
#define DEBUG_MSG(arg,...) ALOGV("%s: %d: " arg, __func__, __LINE__, ##__VA_ARGS__)
#define ERROR_MSG(arg,...) ALOGE("%s: %d: " arg, __func__, __LINE__, ##__VA_ARGS__)
@@ -1383,7 +1382,8 @@
flags = (AUDIO_OUTPUT_FLAG_NON_BLOCKING
| AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD
- | AUDIO_OUTPUT_FLAG_DIRECT);
+ | AUDIO_OUTPUT_FLAG_DIRECT
+ | AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH);
devices = AUDIO_DEVICE_OUT_AUX_DIGITAL;
ret = adev_open_output_stream((struct audio_hw_device *)p_qaf->adev,
@@ -1399,7 +1399,7 @@
return;
}
- if (format & AUDIO_FORMAT_E_AC3) {
+ if (format == AUDIO_FORMAT_E_AC3) {
qaf_mod->stream_out[QAF_OUT_TRANSCODE_PASSTHROUGH]->compr_config.fragment_size =
COMPRESS_PASSTHROUGH_DDP_FRAGMENT_SIZE;
}
diff --git a/qahw_api/test/qap_wrapper_extn.c b/qahw_api/test/qap_wrapper_extn.c
index 0405423..6fcf540 100644
--- a/qahw_api/test/qap_wrapper_extn.c
+++ b/qahw_api/test/qap_wrapper_extn.c
@@ -747,7 +747,9 @@
if (buffer) {
index = get_qap_out_config_index_for_id(
buffer->buffer_parms.output_buf_params.output_id);
- if (index < 0 && new_output_conf_index < MAX_QAP_MODULE_OUT) {
+ if (index >= 0) {
+ cached_conf = &qap_out_configs[index];
+ } else if (index < 0 && new_output_conf_index < MAX_QAP_MODULE_OUT) {
index = new_output_conf_index;
cached_conf = &qap_out_configs[index];
new_output_conf_index++;