hal: compilation fix for extended feature flags
- Fix compilation error for offload, Dolby,
HDMI pass through, FLAC decoder, and hardware
accelerated effects when extended feature
flags are disabled.
Change-Id: If64d5fa5d124b42d40d7e123b887db8e0a5d7426
diff --git a/post_proc/bundle.c b/post_proc/bundle.c
index e38a41c..c09d2ad 100644
--- a/post_proc/bundle.c
+++ b/post_proc/bundle.c
@@ -43,7 +43,7 @@
#include <system/thread_defs.h>
#include <tinyalsa/asoundlib.h>
#include <hardware/audio_effect.h>
-
+#include <stdlib.h>
#include "bundle.h"
#include "hw_accelerator.h"
#include "equalizer.h"
@@ -69,7 +69,9 @@
&ins_env_reverb_descriptor,
&aux_preset_reverb_descriptor,
&ins_preset_reverb_descriptor,
+#ifdef HW_ACCELERATED_EFFECTS
&hw_accelerator_descriptor,
+#endif
NULL,
};
@@ -604,6 +606,7 @@
reverb_preset_init(reverb_ctxt);
}
reverb_ctxt->ctl = NULL;
+#ifdef HW_ACCELERATED_EFFECTS
} else if (memcmp(uuid, &hw_accelerator_descriptor.uuid,
sizeof(effect_uuid_t)) == 0) {
hw_accelerator_context_t *hw_acc_ctxt = (hw_accelerator_context_t *)
@@ -625,6 +628,7 @@
context->ops.process = hw_accelerator_process;
context->desc = &hw_accelerator_descriptor;
+#endif
} else {
return -EINVAL;
}
@@ -910,7 +914,7 @@
add_effect_to_output(out_ctxt, context);
} break;
-
+#ifdef HW_ACCELERATED_EFFECTS
case EFFECT_CMD_HW_ACC: {
ALOGV("EFFECT_CMD_HW_ACC cmdSize %d pCmdData %p, *replySize %d, pReplyData %p",
cmdSize, pCmdData, *replySize, pReplyData);
@@ -925,6 +929,7 @@
context->hw_acc_enabled = (value > 0) ? true : false;
break;
}
+#endif
default:
if (cmdCode >= EFFECT_CMD_FIRST_PROPRIETARY && context->ops.command)
status = context->ops.command(context, cmdCode, cmdSize,