summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-02-11 19:06:35 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-11 19:06:35 +0000
commit9ab5ad944a755123ede8819b3ac7d2cd745e1e89 (patch)
tree27c99e102484997cfb61d9242c04e6dc3f59808f
parent14e51195e5afe64b7b6bbf3fb96e3deae2e1dd15 (diff)
parent466b596cc5d79f47357ec0d3d07389cdf4fc92bc (diff)
downloadlibhardware-9ab5ad944a755123ede8819b3ac7d2cd745e1e89.tar.gz
Merge "Add audio_hw_device.set_device_connected_state_v7 method" am: ac977b6016 am: 466b596cc5
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1978754 Change-Id: Ic66bd494ef59ce98cc856470a28379cbcc399552
-rw-r--r--include/hardware/audio.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index a3b52146..daaa16f1 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -1047,6 +1047,24 @@ struct audio_hw_device {
*/
int (*get_audio_port_v7)(struct audio_hw_device *dev,
struct audio_port_v7 *port);
+
+ /**
+ * Called when the state of the connection of an external device has been changed.
+ * The "port" parameter is only used as input and besides identifying the device
+ * port, also may contain additional information such as extra audio descriptors.
+ *
+ * HAL version 3.2 and higher only. If the HAL does not implement this method,
+ * it must leave the function entry as null, or return -ENOSYS. In this case
+ * the framework will use 'set_parameters', which can only pass the device address.
+ *
+ * @param dev the audio HAL device context.
+ * @param port device port identification and extra information.
+ * @param connected whether the external device is connected.
+ * @return retval operation completion status.
+ */
+ int (*set_device_connected_state_v7)(struct audio_hw_device *dev,
+ struct audio_port_v7 *port,
+ bool connected);
};
typedef struct audio_hw_device audio_hw_device_t;