diff options
author | Mike J. Chen <mjchen@google.com> | 2011-08-15 12:05:00 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2012-02-10 08:58:32 -0800 |
commit | 5ad38a901dcca2961f3ed35ae0b206c13bc515cd (patch) | |
tree | 5175ce575888ff146a63d1e2ab44eb103a33687e /include/hardware/audio.h | |
parent | ad255ee424e36f1fbf5e92e320328ceae1aecd49 (diff) | |
download | hardware_libhardware-5ad38a901dcca2961f3ed35ae0b206c13bc515cd.zip hardware_libhardware-5ad38a901dcca2961f3ed35ae0b206c13bc515cd.tar.gz hardware_libhardware-5ad38a901dcca2961f3ed35ae0b206c13bc515cd.tar.bz2 |
Modifications to audio_hal for Android@Home.
This is a squashed merge of the following changes:
Commit f560da61a5e128ca9f82f7fe939afcf1f09188c7
Author: John Grossman <johngro@google.com>
Date: Thu Aug 11 15:34:55 2011 -0700
Fill out a missing entry in the audio HAL function table.
The entry for get_initial_master_volume was missing from the non-legacy audio
HAL and needs to be filled out. Also fix up the order of the comments
describing the get_initial_master_volume method.
Change-Id: I87d5415ef92611497a6dab4c657fc00367c4d80b
commit cea82facb63fd237a4ea6fb770605fcb500850ff
Author: Jason Simmons <jsimmons@google.com>
Date: Thu Jun 16 14:24:24 2011 -0700
Define a replacement for getSampleDelta that returns a DMA start time and count of samples queued
Change-Id: I2d13f57b5a8c5b97fb3aa0a90834ce91c56864ef
commit 60a9acd7eee470a8d870218e8be618bfa3be15a5
Author: Mike J. Chen <mjchen@google.com>
Date: Tue Jun 7 09:13:23 2011 -0700
Add Android@Home extensions to new Audio HAL interface.
Change-Id: I3ea4676d4b7d2afd78a5a7a7003ad5c437276d05
Signed-off-by: Mike J. Chen <mjchen@google.com>
Change-Id: I09f3756d12a1ce4f9af39610ed857890742a72df
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>
Conflicts:
include/hardware/audio.h
modules/audio/audio_hw.c
Diffstat (limited to 'include/hardware/audio.h')
-rw-r--r-- | include/hardware/audio.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/hardware/audio.h b/include/hardware/audio.h index fa34467..1e68cd1 100644 --- a/include/hardware/audio.h +++ b/include/hardware/audio.h @@ -184,6 +184,14 @@ struct audio_stream_out { */ int (*get_render_position)(const struct audio_stream_out *stream, uint32_t *dsp_frames); + + /** + * get the local time at which the next write to the audio driver will be + * presented + */ + int (*get_next_write_timestamp)(const struct audio_stream_out *stream, + int64_t *timestamp); + }; typedef struct audio_stream_out audio_stream_out_t; @@ -272,6 +280,15 @@ struct audio_hw_device { int (*set_master_volume)(struct audio_hw_device *dev, float volume); /** + * Get the current master volume value for the HAL, if the HAL supports + * master volume control. AudioFlinger will query this value from the + * primary audio HAL when the service starts and use the value for setting + * the initial master volume across all HALs. HALs which do not support + * this method should may leave it set to NULL. + */ + int (*get_master_volume)(struct audio_hw_device *dev, float *volume); + + /** * set_mode is called when the audio mode changes. AUDIO_MODE_NORMAL mode * is for standard audio playback, AUDIO_MODE_RINGTONE when a ringtone is * playing, and AUDIO_MODE_IN_CALL when a call is in progress. |