diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-02-27 03:11:07 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-02-27 03:11:07 +0000 |
commit | d053b628701e9525fc094441d184608c07a1aa89 (patch) | |
tree | d20394fc5534144998aa07dc82c4f2def03ff257 | |
parent | d1ecdddfde67ef345e0b87bd1baa30f99a813f16 (diff) | |
parent | 3b4b33f479b2ef31f94030a51642dcc58e1e1152 (diff) | |
download | libhardware-d053b628701e9525fc094441d184608c07a1aa89.tar.gz |
Snap for 6239836 from 3b4b33f479b2ef31f94030a51642dcc58e1e1152 to rvc-release
Change-Id: I52bfdf58e59d2e30fccdc21bc101a99386d0f515
-rw-r--r-- | include/hardware/audio.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h index b047fa06..b87d3bb3 100644 --- a/include/hardware/audio.h +++ b/include/hardware/audio.h @@ -203,8 +203,15 @@ typedef enum { STREAM_CBK_EVENT_ERROR, /* stream hit some error, let AF take action */ } stream_callback_event_t; +typedef enum { + STREAM_EVENT_CBK_TYPE_CODEC_FORMAT_CHANGED, /* codec format of the stream changed */ +} stream_event_callback_type_t; + typedef int (*stream_callback_t)(stream_callback_event_t event, void *param, void *cookie); +typedef int (*stream_event_callback_t)(stream_event_callback_type_t event, + void *param, void *cookie); + /* type of drain requested to audio_stream_out->drain(). Mutually exclusive */ typedef enum { AUDIO_DRAIN_ALL, /* drain() returns when all data has been played */ @@ -422,6 +429,13 @@ struct audio_stream_out { */ void (*update_source_metadata)(struct audio_stream_out *stream, const struct source_metadata* source_metadata); + + /** + * Set the callback function for notifying events for an output stream. + */ + int (*set_event_callback)(struct audio_stream_out *stream, + stream_event_callback_t callback, + void *cookie); }; typedef struct audio_stream_out audio_stream_out_t; |