summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-09-29 20:48:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-29 20:48:48 +0000
commit04afc0a753c449994ad844d1f5713d28569df645 (patch)
tree134af2beedc3a7a2fd300d11dea7b361ae5b6082 /services
parent4b5d678e8a9724573f380574bec461e6056e4276 (diff)
parent4379c03433e4613c417998ca7917059ef17dc3a9 (diff)
downloadframeworks_av-04afc0a753c449994ad844d1f5713d28569df645.zip
frameworks_av-04afc0a753c449994ad844d1f5713d28569df645.tar.gz
frameworks_av-04afc0a753c449994ad844d1f5713d28569df645.tar.bz2
am 4379c034: Merge "Fix tee sink" into lmp-dev
* commit '4379c03433e4613c417998ca7917059ef17dc3a9': Fix tee sink
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/Threads.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 818bb05..d885558 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -2803,6 +2803,7 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud
// create a MonoPipe to connect our submix to FastMixer
NBAIO_Format format = mOutputSink->format();
+ NBAIO_Format origformat = format;
// adjust format to match that of the Fast Mixer
format.mFormat = fastMixerFormat;
format.mFrameSize = audio_bytes_per_sample(format.mFormat) * format.mChannelCount;
@@ -2822,14 +2823,15 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud
#ifdef TEE_SINK
if (mTeeSinkOutputEnabled) {
// create a Pipe to archive a copy of FastMixer's output for dumpsys
- Pipe *teeSink = new Pipe(mTeeSinkOutputFrames, format);
+ Pipe *teeSink = new Pipe(mTeeSinkOutputFrames, origformat);
+ const NBAIO_Format offers2[1] = {origformat};
numCounterOffers = 0;
- index = teeSink->negotiate(offers, 1, NULL, numCounterOffers);
+ index = teeSink->negotiate(offers2, 1, NULL, numCounterOffers);
ALOG_ASSERT(index == 0);
mTeeSink = teeSink;
PipeReader *teeSource = new PipeReader(*teeSink);
numCounterOffers = 0;
- index = teeSource->negotiate(offers, 1, NULL, numCounterOffers);
+ index = teeSource->negotiate(offers2, 1, NULL, numCounterOffers);
ALOG_ASSERT(index == 0);
mTeeSource = teeSource;
}