Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb77f14d authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by android-build-merger
Browse files

Merge "Audio policy / flinger: updates to recording callback and record stop" into oc-dev

am: d9d9ae29

Change-Id: I93d5ada16592d831336ac68168537ea38be35a4f
parents ea098bf5 d9d9ae29
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -6791,7 +6791,7 @@ void AudioFlinger::RecordThread::syncStartEventCallback(const wp<SyncEvent>& eve
bool AudioFlinger::RecordThread::stop(RecordThread::RecordTrack* recordTrack) {
    ALOGV("RecordThread::stop");
    AutoMutex _l(mLock);
    if (mActiveTracks.indexOf(recordTrack) != 0 || recordTrack->mState == TrackBase::PAUSING) {
    if (mActiveTracks.indexOf(recordTrack) < 0 || recordTrack->mState == TrackBase::PAUSING) {
        return false;
    }
    // note that threadLoop may still be processing the track at this point [without lock]
@@ -6805,7 +6805,7 @@ bool AudioFlinger::RecordThread::stop(RecordThread::RecordTrack* recordTrack) {
    // FIXME incorrect usage of wait: no explicit predicate or loop
    mStartStopCond.wait(mLock);
    // if we have been restarted, recordTrack is in mActiveTracks here
    if (exitPending() || mActiveTracks.indexOf(recordTrack) != 0) {
    if (exitPending() || mActiveTracks.indexOf(recordTrack) < 0) {
        ALOGV("Record stopped OK");
        return true;
    }
+9 −5
Original line number Diff line number Diff line
@@ -91,9 +91,11 @@ uint32_t AudioSession::changeActiveCount(int delta)
                AUDIO_CONFIG_BASE_INITIALIZER;
        const audio_patch_handle_t patchHandle = (provider != NULL) ? provider->getPatchHandle() :
                AUDIO_PATCH_HANDLE_NONE;
        if (patchHandle != AUDIO_PATCH_HANDLE_NONE) {
            mClientInterface->onRecordingConfigurationUpdate(event, mSession, mInputSource,
                    &mConfig, &deviceConfig, patchHandle);
        }
    }

    return mActiveCount;
}
@@ -126,11 +128,13 @@ void AudioSession::onSessionInfoUpdate() const
                AUDIO_CONFIG_BASE_INITIALIZER;
        const audio_patch_handle_t patchHandle = (provider != NULL) ? provider->getPatchHandle() :
                AUDIO_PATCH_HANDLE_NONE;
        if (patchHandle != AUDIO_PATCH_HANDLE_NONE) {
            mClientInterface->onRecordingConfigurationUpdate(RECORD_CONFIG_EVENT_START,
                    mSession, mInputSource,
                    &mConfig, &deviceConfig, patchHandle);
        }
    }
}

status_t AudioSession::dump(int fd, int spaces, int index) const
{