diff options
author | Eric Laurent <elaurent@google.com> | 2014-07-28 17:26:49 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-07-28 18:10:29 -0700 |
commit | 4dc680607181e6a76f4e91a39366c4f5dfb7b03e (patch) | |
tree | 5212b6ff474b8ef68a68cb1cf144f54e5348de77 /services/audioflinger | |
parent | d530d415e60373caf875a37d2d747a51470ee45c (diff) | |
download | frameworks_av-4dc680607181e6a76f4e91a39366c4f5dfb7b03e.zip frameworks_av-4dc680607181e6a76f4e91a39366c4f5dfb7b03e.tar.gz frameworks_av-4dc680607181e6a76f4e91a39366c4f5dfb7b03e.tar.bz2 |
audio policy: pass session ID to capture activity methods
Indicate the audio session ID when calling getInput(),
startInput(), stopInput(), releaseInput().
Bug: 12378680.
Change-Id: I763793752f93e2f4e1445a5ab217c895af011038
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/Threads.cpp | 4 | ||||
-rw-r--r-- | services/audioflinger/Tracks.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 0ef5bb8..2e2f533 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -5649,7 +5649,7 @@ status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrac status_t status = NO_ERROR; if (recordTrack->isExternalTrack()) { mLock.unlock(); - status = AudioSystem::startInput(mId); + status = AudioSystem::startInput(mId, (audio_session_t)recordTrack->sessionId()); mLock.lock(); // FIXME should verify that recordTrack is still in mActiveTracks if (status != NO_ERROR) { @@ -5684,7 +5684,7 @@ status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrac startError: if (recordTrack->isExternalTrack()) { - AudioSystem::stopInput(mId); + AudioSystem::stopInput(mId, (audio_session_t)recordTrack->sessionId()); } recordTrack->clearSyncStartEvent(); // FIXME I wonder why we do not reset the state here? diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp index e81697f..48093da 100644 --- a/services/audioflinger/Tracks.cpp +++ b/services/audioflinger/Tracks.cpp @@ -2050,7 +2050,7 @@ void AudioFlinger::RecordThread::RecordTrack::stop() if (thread != 0) { RecordThread *recordThread = (RecordThread *)thread.get(); if (recordThread->stop(this) && isExternalTrack()) { - AudioSystem::stopInput(recordThread->id()); + AudioSystem::stopInput(recordThread->id(), (audio_session_t)mSessionId); } } } @@ -2064,9 +2064,9 @@ void AudioFlinger::RecordThread::RecordTrack::destroy() if (thread != 0) { if (isExternalTrack()) { if (mState == ACTIVE || mState == RESUMING) { - AudioSystem::stopInput(thread->id()); + AudioSystem::stopInput(thread->id(), (audio_session_t)mSessionId); } - AudioSystem::releaseInput(thread->id()); + AudioSystem::releaseInput(thread->id(), (audio_session_t)mSessionId); } Mutex::Autolock _l(thread->mLock); RecordThread *recordThread = (RecordThread *) thread.get(); |