diff options
author | Mikhail Naganov <mnaganov@google.com> | 2022-02-01 20:52:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2022-02-01 20:52:49 +0000 |
commit | 5c789ae9e78ab9f38860176df7770dbfd0f46780 (patch) | |
tree | 81b3fa0447ce41be2d1ed36b5c7aa0120ae00094 | |
parent | b0bcbf421f762b1ee18dd73efd63b56453a1a3f5 (diff) | |
parent | 521310bc2607ed550b89efb638207420de23f85f (diff) | |
download | libhardware-5c789ae9e78ab9f38860176df7770dbfd0f46780.tar.gz |
Merge "Add audio_hw_device.set_device_connected_state_v7 method"
-rw-r--r-- | include/hardware/audio.h | 18 |
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; |