summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-12-09 10:40:37 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-12-09 10:40:37 +0000
commite8860846c60975257ac45b7f0eb16b8fa32842ef (patch)
tree9c27b2acf15060bfd15e6f6e85fb75c906937855
parenta3849fec825bc0fe04afc00f87058cdf9b786131 (diff)
parentd12f22448654633080d64725b92999335f437889 (diff)
downloadlibhardware-e8860846c60975257ac45b7f0eb16b8fa32842ef.tar.gz
Merge "Add a new API for getting audio_port_v7." am: d12f224486
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1518624 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I5f15574d6be358ba5b6e2eb12f6f33a1aab90770
-rw-r--r--include/hardware/audio.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index b87d3bb3..69b0b9c0 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -57,7 +57,8 @@ __BEGIN_DECLS
#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_3_1 HARDWARE_DEVICE_API_VERSION(3, 1)
-#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_3_1
+#define AUDIO_DEVICE_API_VERSION_3_2 HARDWARE_DEVICE_API_VERSION(3, 2)
+#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_3_2
/* Minimal audio HAL version supported by the audio framework */
#define AUDIO_DEVICE_API_VERSION_MIN AUDIO_DEVICE_API_VERSION_2_0
@@ -865,6 +866,18 @@ struct audio_hw_device {
*/
int (*remove_device_effect)(struct audio_hw_device *dev,
audio_port_handle_t device, effect_handle_t effect);
+
+ /**
+ * Fills the list of supported attributes for a given audio port.
+ * As input, "port" contains the information (type, role, address etc...)
+ * needed by the HAL to identify the port.
+ * As output, "port" contains possible attributes (sampling rates, formats,
+ * channel masks, gain controllers...) for this port. The possible attributes
+ * are saved as audio profiles, which contains audio format and the supported
+ * sampling rates and channel masks.
+ */
+ int (*get_audio_port_v7)(struct audio_hw_device *dev,
+ struct audio_port_v7 *port);
};
typedef struct audio_hw_device audio_hw_device_t;