diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2022-02-11 18:19:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-02-11 18:19:22 +0000 |
commit | ac977b60166c0b7b4dd016b4d15eb35f0c1e14d9 (patch) | |
tree | 62582f8185a6ea99ec72b6cddb6d101145f3b06b | |
parent | 5c264411c68c2583051e5c9cfa9bfec2c87d549c (diff) | |
parent | f9121419563862eb21b08fb5a342aca47c8d6b62 (diff) | |
download | libhardware-ac977b60166c0b7b4dd016b4d15eb35f0c1e14d9.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; |