diff options
author | Tejas Shikhare <tshikhar@codeaurora.org> | 2012-07-10 17:02:03 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2012-08-17 10:25:24 -0700 |
commit | 7e8fce19e44e1060ca8dfe12317e3fbc32c7b30b (patch) | |
tree | a0f143bbc239119cc0beacf6bcd7f4b3debe613d | |
parent | 0d22b65d2d3b5cf64c90e03d1537d2c939b19164 (diff) | |
download | hardware_libhardware-7e8fce19e44e1060ca8dfe12317e3fbc32c7b30b.zip hardware_libhardware-7e8fce19e44e1060ca8dfe12317e3fbc32c7b30b.tar.gz hardware_libhardware-7e8fce19e44e1060ca8dfe12317e3fbc32c7b30b.tar.bz2 |
libhardware: Add APIs to support DirectTrack in HAL
Add APIs in HAL which can be used for Direct outputs like
Tunnel and LPA.
Change-Id: Id7b93b20746eeebc29270d630c8cf4e9c2b13332
-rw-r--r-- | include/hardware/audio.h | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h index b5977b3..02031fc 100644 --- a/include/hardware/audio.h +++ b/include/hardware/audio.h @@ -264,12 +264,41 @@ struct audio_stream_out { uint32_t *dsp_frames); #ifndef ICS_AUDIO_BLOB +#ifdef QCOM_HARDWARE + /** + * start audio data rendering + */ + int (*start)(struct audio_stream_out *stream); + + /** + * pause audio rendering + */ + int (*pause)(struct audio_stream_out *stream); + + /** + * flush audio data with driver + */ + int (*flush)(struct audio_stream_out *stream); + + /** + * stop audio data rendering + */ + int (*stop)(struct audio_stream_out *stream); +#endif + /** * get the local time at which the next write to the audio driver will be presented. * The units are microseconds, where the epoch is decided by the local audio HAL. */ int (*get_next_write_timestamp)(const struct audio_stream_out *stream, int64_t *timestamp); +#ifdef QCOM_HARDWARE + /** + * EOS notification from HAL to Flinger + */ + int (*set_observer)(const struct audio_stream_out *stream, + void *observer); +#endif #endif }; @@ -506,7 +535,18 @@ static inline int audio_hw_device_close(struct audio_hw_device* device) return device->common.close(&device->common); } - +#ifdef QCOM_HARDWARE +#ifdef __cplusplus +/** + *Observer class to post the Events from HAL to Flinger +*/ +class AudioEventObserver { +public: + virtual ~AudioEventObserver() {} + virtual void postEOS(int64_t delayUs) = 0; +}; +#endif +#endif __END_DECLS #endif // ANDROID_AUDIO_INTERFACE_H |