summaryrefslogtreecommitdiffstats
path: root/libs/audioflinger/AudioHardwareGeneric.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2010-01-19 17:37:09 -0800
committerEric Laurent <elaurent@google.com>2010-01-26 18:40:39 -0800
commit0986e7907ffc8387b04fb201e285784bcd11b9b7 (patch)
tree96733235d1e92e0f329ded11b9b55c0d67a4ca83 /libs/audioflinger/AudioHardwareGeneric.cpp
parent7d3a558b9ebf2256517ec99cd09c066cc7dbc92c (diff)
downloadframeworks_base-0986e7907ffc8387b04fb201e285784bcd11b9b7.zip
frameworks_base-0986e7907ffc8387b04fb201e285784bcd11b9b7.tar.gz
frameworks_base-0986e7907ffc8387b04fb201e285784bcd11b9b7.tar.bz2
Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V sync
Added getRenderPosition() API to IAudioFlinger to retreive number of audio frames written by AudioFlinger to audio HAL and by DSP to DAC. Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames written by DSP to DAC. Exposed AudioTrack::getPosition() to AudioSink() to make it available to media player. Removed excessive log in AudioHardwareGeneric.
Diffstat (limited to 'libs/audioflinger/AudioHardwareGeneric.cpp')
-rw-r--r--libs/audioflinger/AudioHardwareGeneric.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/audioflinger/AudioHardwareGeneric.cpp b/libs/audioflinger/AudioHardwareGeneric.cpp
index 57874f3..d63c031 100644
--- a/libs/audioflinger/AudioHardwareGeneric.cpp
+++ b/libs/audioflinger/AudioHardwareGeneric.cpp
@@ -298,6 +298,11 @@ String8 AudioStreamOutGeneric::getParameters(const String8& keys)
return param.toString();
}
+status_t AudioStreamOutGeneric::getRenderPosition(uint32_t *dspFrames)
+{
+ return INVALID_OPERATION;
+}
+
// ----------------------------------------------------------------------------
// record functions
@@ -310,9 +315,8 @@ status_t AudioStreamInGeneric::set(
uint32_t *pRate,
AudioSystem::audio_in_acoustics acoustics)
{
- // FIXME: remove logging
if (pFormat == 0 || pChannels == 0 || pRate == 0) return BAD_VALUE;
- LOGD("AudioStreamInGeneric::set(%p, %d, %d, %d, %u)", hw, fd, *pFormat, *pChannels, *pRate);
+ LOGV("AudioStreamInGeneric::set(%p, %d, %d, %d, %u)", hw, fd, *pFormat, *pChannels, *pRate);
// check values
if ((*pFormat != format()) ||
(*pChannels != channels()) ||
@@ -332,14 +336,10 @@ status_t AudioStreamInGeneric::set(
AudioStreamInGeneric::~AudioStreamInGeneric()
{
- // FIXME: remove logging
- LOGD("AudioStreamInGeneric destructor");
}
ssize_t AudioStreamInGeneric::read(void* buffer, ssize_t bytes)
{
- // FIXME: remove logging
- LOGD("AudioStreamInGeneric::read(%p, %d) from fd %d", buffer, (int)bytes, mFd);
AutoMutex lock(mLock);
if (mFd < 0) {
LOGE("Attempt to read from unopened device");