diff options
author | Andy Hung <hunga@google.com> | 2021-01-28 18:20:34 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-01-28 18:20:34 +0000 |
commit | 4ca7eb33b5a7550cc05459e060ede16cc5931b45 (patch) | |
tree | e9a073420c39e47efdf2c0452d4c30a63d655f72 | |
parent | 15ff37860e5b459a5556f15444b177ab92354d59 (diff) | |
parent | 541a8d3e5b6d5f9667c25f72aa669eabe8ae6305 (diff) | |
download | libhardware-4ca7eb33b5a7550cc05459e060ede16cc5931b45.tar.gz |
Merge "audio: add implementation for TV related API" am: 541a8d3e5b
Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1562805
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I1e1940b2690d789adb892cf465c80fbe79583031
-rw-r--r-- | include/hardware/audio.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h index c2db50c1..adec3da8 100644 --- a/include/hardware/audio.h +++ b/include/hardware/audio.h @@ -459,6 +459,80 @@ struct audio_stream_out { */ void (*update_source_metadata_v7)(struct audio_stream_out *stream, const struct source_metadata_v7* source_metadata); + + /** + * Returns the Dual Mono mode presentation setting. + * + * \param[in] stream the stream object. + * \param[out] mode current setting of Dual Mono mode. + * + * \return 0 if the position is successfully returned. + * -EINVAL if the arguments are invalid + * -ENOSYS if the function is not available + */ + int (*get_dual_mono_mode)(struct audio_stream_out *stream, audio_dual_mono_mode_t *mode); + + /** + * Sets the Dual Mono mode presentation on the output device. + * + * \param[in] stream the stream object. + * \param[in] mode selected Dual Mono mode. + * + * \return 0 in case of success. + * -EINVAL if the arguments are invalid + * -ENOSYS if the function is not available + */ + int (*set_dual_mono_mode)(struct audio_stream_out *stream, const audio_dual_mono_mode_t mode); + + /** + * Returns the Audio Description Mix level in dB. + * + * \param[in] stream the stream object. + * \param[out] leveldB the current Audio Description Mix Level in dB. + * + * \return 0 in case of success. + * -EINVAL if the arguments are invalid + * -ENOSYS if the function is not available + */ + int (*get_audio_description_mix_level)(struct audio_stream_out *stream, float *leveldB); + + /** + * Sets the Audio Description Mix level in dB. + * + * \param[in] stream the stream object. + * \param[in] leveldB Audio Description Mix Level in dB. + * + * \return 0 in case of success. + * -EINVAL if the arguments are invalid + * -ENOSYS if the function is not available + */ + int (*set_audio_description_mix_level)(struct audio_stream_out *stream, const float leveldB); + + /** + * Retrieves current playback rate parameters. + * + * \param[in] stream the stream object. + * \param[out] playbackRate current playback parameters. + * + * \return 0 in case of success. + * -EINVAL if the arguments are invalid + * -ENOSYS if the function is not available + */ + int (*get_playback_rate_parameters)(struct audio_stream_out *stream, + audio_playback_rate_t *playbackRate); + + /** + * Sets the playback rate parameters that control playback behavior. + * + * \param[in] stream the stream object. + * \param[in] playbackRate playback parameters. + * + * \return 0 in case of success. + * -EINVAL if the arguments are invalid + * -ENOSYS if the function is not available + */ + int (*set_playback_rate_parameters)(struct audio_stream_out *stream, + const audio_playback_rate_t *playbackRate); }; typedef struct audio_stream_out audio_stream_out_t; |