diff options
author | Xuefer <xuefer@gmail.com> | 2015-12-29 00:43:16 +0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-01-06 14:39:47 -0800 |
commit | c20f75882a9af6bd5c7e94c24647453a13cd1d41 (patch) | |
tree | 762bd3c8dbcea3bcbe92b9d6188996e7970d7386 | |
parent | af4528b74642910c023cdbede1cb8b184fa9fa92 (diff) | |
download | frameworks_av-c20f75882a9af6bd5c7e94c24647453a13cd1d41.zip frameworks_av-c20f75882a9af6bd5c7e94c24647453a13cd1d41.tar.gz frameworks_av-c20f75882a9af6bd5c7e94c24647453a13cd1d41.tar.bz2 |
audiopolicy: Handle legacy startOutput on output command thread too
* Fixes the build for legacy audio policy
* Broken by: de3b1c01146d2103f6bf56e2659a9c650734945a
Change-Id: I990ce609b3da81c462b35c7dd3f7b11d189e2d2e
Signed-off-by: Xuefer <xuefer@gmail.com>
-rw-r--r-- | services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp index 13af3ef..f76b5c8 100644 --- a/services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp +++ b/services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp @@ -158,13 +158,27 @@ status_t AudioPolicyService::startOutput(audio_io_handle_t output, return NO_INIT; } ALOGV("startOutput()"); - // create audio processors according to stream + return mOutputCommandThread->startOutputCommand(output, stream, session); +} + +status_t AudioPolicyService::doStartOutput(audio_io_handle_t output, + audio_stream_type_t stream, + audio_session_t session) +{ + if (uint32_t(stream) >= AUDIO_STREAM_CNT) { + return BAD_VALUE; + } + if (mpAudioPolicy == NULL) { + return NO_INIT; + } + ALOGV("doStartOutput()"); sp<AudioPolicyEffects>audioPolicyEffects; { Mutex::Autolock _l(mLock); audioPolicyEffects = mAudioPolicyEffects; } if (audioPolicyEffects != 0) { + // create audio processors according to stream status_t status = audioPolicyEffects->addOutputSessionEffects(output, stream, session); if (status != NO_ERROR && status != ALREADY_EXISTS) { ALOGW("Failed to add effects on session %d", session); |