summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2020-01-13 21:40:24 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-01-13 21:40:24 +0000
commit2d0682b212eb8939a9ce76e86b00b9b741893fc4 (patch)
tree1f3a1d2620a014c701bb4be0c8267e19a3e0b71b
parent4e018cf0398695f02795d3448f76d8b901831335 (diff)
parent70a7b39f6896c77410a8cd11f35041c81395b2d2 (diff)
downloadlibhardware-android-r-preview-1.tar.gz
Merge "Audio HAL: Add API to attach an effect to a device"android-r-preview-1
-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;