summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-13 22:06:07 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-13 22:06:07 +0000
commit6e32a78e1218e0a79803c658e7bc836815f4ebcc (patch)
tree01a3e5a3e54e11c33f83b147b355c5ae1fd73de0
parentd252c69d3b874832a719677ddc154b022edae1a4 (diff)
parente16c3ebe00c1aeeb6289bd8dea11378d7c2cc815 (diff)
downloadlibhardware-6e32a78e1218e0a79803c658e7bc836815f4ebcc.tar.gz
Merge "Audio HAL: Add API to attach an effect to a device" am: 2d0682b212 am: e16c3ebe00
Change-Id: Idcd89be78d5c4470eb8958f5bf1e7f293f83580a
-rw-r--r--include/hardware/audio.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index feebd23e..b047fa06 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -56,7 +56,8 @@ __BEGIN_DECLS
#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 @@ struct audio_hw_device {
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;