hardware/qcom/audio: Integrate Eagle framework for HeadphoneX

Add support to integrate the Eagle framework for HeadphoneX
audio post processing feature 1.1

Change-Id: Ib119c27c359950a6087d5e6ae200dfc1e83b7551
Signed-off-by: Jitendra Naruka <jitendra.naruka@dts.com>
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
diff --git a/post_proc/bundle.c b/post_proc/bundle.c
index 0db2e37..a0a6765 100644
--- a/post_proc/bundle.c
+++ b/post_proc/bundle.c
@@ -15,6 +15,24 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ * This file was modified by DTS, Inc. The portions of the
+ * code modified by DTS, Inc are copyrighted and
+ * licensed separately, as follows:
+ *
+ * (C) 2014 DTS, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
 #define LOG_TAG "offload_effect_bundle"
@@ -32,6 +50,10 @@
 #include "virtualizer.h"
 #include "reverb.h"
 
+#ifdef DTS_EAGLE
+#include "effect_util.h"
+#endif
+
 enum {
     EFFECT_STATE_UNINITIALIZED,
     EFFECT_STATE_INITIALIZED,
@@ -190,6 +212,10 @@
 
     ALOGV("%s output %d pcm_id %d", __func__, output, pcm_id);
 
+#ifdef DTS_EAGLE
+    create_effect_state_node(pcm_id);
+#endif
+
     if (lib_init() != 0)
         return init_status;
 
@@ -285,6 +311,10 @@
 
     list_remove(&out_ctxt->outputs_list_node);
 
+#ifdef DTS_EAGLE
+    remove_effect_state_node(pcm_id);
+#endif
+
     free(out_ctxt);
 
 exit: