Dynamics Processing Effect

Dynamics Processing Effect definitions

Bug: 64161702
Bug: 38266419

Test: manual testing and CTS tests
Change-Id: Ie0070f331b487716cac4b3009282ffa2e8b76548
diff --git a/audio/include/system/audio_effects/effect_dynamicsprocessing.h b/audio/include/system/audio_effects/effect_dynamicsprocessing.h
new file mode 100644
index 0000000..346e830
--- /dev/null
+++ b/audio/include/system/audio_effects/effect_dynamicsprocessing.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#ifndef ANDROID_EFFECT_DYNAMICSPROCESSING_CORE_H_
+#define ANDROID_EFFECT_DYNAMICSPROCESSING_CORE_H_
+
+#include <system/audio_effect.h>
+
+#if __cplusplus
+extern "C" {
+#endif
+
+#ifndef OPENSL_ES_H_
+static const effect_uuid_t SL_IID_DYNAMICSPROCESSING_ = { 0x7261676f, 0x6d75, 0x7369, 0x6364,
+        { 0x28, 0xe2, 0xfd, 0x3a, 0xc3, 0x9e } };
+const effect_uuid_t * const SL_IID_DYNAMICSPROCESSING = &SL_IID_DYNAMICSPROCESSING_;
+#endif //OPENSL_ES_H_
+
+/* enumerated parameters for dynamics processing effect */
+typedef enum
+{
+    DP_PARAM_GET_CHANNEL_COUNT = 0x10,
+    DP_PARAM_INPUT_GAIN = 0x20,
+    DP_PARAM_ENGINE_ARCHITECTURE = 0x30,
+    DP_PARAM_PRE_EQ = 0x40,
+    DP_PARAM_PRE_EQ_BAND = 0x45,
+    DP_PARAM_MBC = 0x50,
+    DP_PARAM_MBC_BAND = 0x55,
+    DP_PARAM_POST_EQ = 0x60,
+    DP_PARAM_POST_EQ_BAND = 0x65,
+    DP_PARAM_LIMITER = 0x70,
+} t_dynamicsprocessing_params;
+
+/* enumerated variants */
+typedef enum
+{
+    VARIANT_FAVOR_FREQUENCY_RESOLUTION = 0x00,
+    VARIANT_FAVOR_TIME_RESOLUTION = 0x01,
+} t_dynamicsprocessing_variants;
+
+#if __cplusplus
+} // extern "C"
+#endif
+
+
+#endif /*ANDROID_EFFECT_DYNAMICSPROCESSING_CORE_H_*/
diff --git a/audio_effects/include/audio_effects/effect_dynamicsprocessing.h b/audio_effects/include/audio_effects/effect_dynamicsprocessing.h
new file mode 100644
index 0000000..d350d73
--- /dev/null
+++ b/audio_effects/include/audio_effects/effect_dynamicsprocessing.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * 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.
+ */
+
+/*
+ * USAGE NOTE: Only include this header when _implementing_ a particular
+ * effect. When access to UUID and properties is enough, include the
+ * corresponding header from system/audio_effects/, which doesn't include
+ * hardware/audio_effect.h.
+ *
+ * Only code that immediately calls into HAL or implements an effect
+ * can import hardware/audio_effect.h.
+ */
+
+#ifndef ANDROID_EFFECT_DYNAMICSPROCESSING_H_
+#define ANDROID_EFFECT_DYNAMICSPROCESSING_H_
+
+#include <hardware/audio_effect.h>
+#include <system/audio_effects/effect_dynamicsprocessing.h>
+
+#endif /*ANDROID_EFFECT_DYNAMICSPROCESSING_H_*/