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
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c
index a2d7861..4069ace 100644
--- a/modules/audio/audio_hw.c
+++ b/modules/audio/audio_hw.c
@@ -126,6 +126,12 @@
return 0;
}
+static int out_get_next_write_timestamp(const struct audio_stream_out *stream,
+ int64_t *timestamp)
+{
+ return -EINVAL;
+}
+
/** audio_stream_in implementation **/
static uint32_t in_get_sample_rate(const struct audio_stream *stream)
{
@@ -236,6 +242,7 @@
out->stream.set_volume = out_set_volume;
out->stream.write = out_write;
out->stream.get_render_position = out_get_render_position;
+ out->stream.get_next_write_timestamp = out_get_next_write_timestamp;
*stream_out = &out->stream;
return 0;
@@ -278,6 +285,12 @@
return -ENOSYS;
}
+static int adev_get_master_volume(struct audio_hw_device *dev,
+ float *volume)
+{
+ return -ENOSYS;
+}
+
static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode)
{
return 0;
@@ -401,6 +414,7 @@
adev->device.init_check = adev_init_check;
adev->device.set_voice_volume = adev_set_voice_volume;
adev->device.set_master_volume = adev_set_master_volume;
+ adev->device.get_master_volume = adev_get_master_volume;
adev->device.set_mode = adev_set_mode;
adev->device.set_mic_mute = adev_set_mic_mute;
adev->device.get_mic_mute = adev_get_mic_mute;