diff options
author | Eric Laurent <elaurent@google.com> | 2010-03-05 16:01:47 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-05 16:01:47 -0800 |
commit | 29855801de083e82b76dee18e5e161d154bdb60c (patch) | |
tree | 0b1b15f34b43bbad34060d8e231bb10cc64864d2 /libs | |
parent | 931bf89d327ecf07301231fd86b17deac535feaa (diff) | |
parent | ba8811f5528404527b0cbad584a836f0b1807d26 (diff) | |
download | frameworks_base-29855801de083e82b76dee18e5e161d154bdb60c.zip frameworks_base-29855801de083e82b76dee18e5e161d154bdb60c.tar.gz frameworks_base-29855801de083e82b76dee18e5e161d154bdb60c.tar.bz2 |
Merge "Fix issue 2428563: Camera rendered inoperable by voice call interruption."
Diffstat (limited to 'libs')
-rw-r--r-- | libs/audioflinger/AudioFlinger.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/audioflinger/AudioFlinger.cpp b/libs/audioflinger/AudioFlinger.cpp index 2269352..8089389 100644 --- a/libs/audioflinger/AudioFlinger.cpp +++ b/libs/audioflinger/AudioFlinger.cpp @@ -3247,7 +3247,10 @@ bool AudioFlinger::RecordThread::threadLoop() if (mBytesRead < 0) { LOGE("Error reading audio input"); if (mActiveTrack->mState == TrackBase::ACTIVE) { - sleep(1); + // Force input into standby so that it tries to + // recover at next read attempt + mInput->standby(); + usleep(5000); } mRsmpInIndex = mFrameCount; framesOut = 0; @@ -3429,7 +3432,10 @@ status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* if (mBytesRead < 0) { LOGE("RecordThread::getNextBuffer() Error reading audio input"); if (mActiveTrack->mState == TrackBase::ACTIVE) { - sleep(1); + // Force input into standby so that it tries to + // recover at next read attempt + mInput->standby(); + usleep(5000); } buffer->raw = 0; buffer->frameCount = 0; |