Merge "Audio HAL: Add API to attach an effect to a device"
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index feebd23..b047fa0 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -56,7 +56,8 @@
 #define AUDIO_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION(1, 0)
 #define AUDIO_DEVICE_API_VERSION_2_0 HARDWARE_DEVICE_API_VERSION(2, 0)
 #define AUDIO_DEVICE_API_VERSION_3_0 HARDWARE_DEVICE_API_VERSION(3, 0)
-#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_3_0
+#define AUDIO_DEVICE_API_VERSION_3_1 HARDWARE_DEVICE_API_VERSION(3, 1)
+#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_3_1
 /* Minimal audio HAL version supported by the audio framework */
 #define AUDIO_DEVICE_API_VERSION_MIN AUDIO_DEVICE_API_VERSION_2_0
 
@@ -825,6 +826,31 @@
     int (*set_audio_port_config)(struct audio_hw_device *dev,
                          const struct audio_port_config *config);
 
+    /**
+     * Applies an audio effect to an audio device.
+     *
+     * @param dev the audio HAL device context.
+     * @param device identifies the sink or source device the effect must be applied to.
+     *               "device" is the audio_port_handle_t indicated for the device when
+     *               the audio patch connecting that device was created.
+     * @param effect effect interface handle corresponding to the effect being added.
+     * @return retval operation completion status.
+     */
+    int (*add_device_effect)(struct audio_hw_device *dev,
+                        audio_port_handle_t device, effect_handle_t effect);
+
+    /**
+     * Stops applying an audio effect to an audio device.
+     *
+     * @param dev the audio HAL device context.
+     * @param device identifies the sink or source device this effect was applied to.
+     *               "device" is the audio_port_handle_t indicated for the device when
+     *               the audio patch is created.
+     * @param effect effect interface handle corresponding to the effect being removed.
+     * @return retval operation completion status.
+     */
+    int (*remove_device_effect)(struct audio_hw_device *dev,
+                        audio_port_handle_t device, effect_handle_t effect);
 };
 typedef struct audio_hw_device audio_hw_device_t;