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

Commit 15e57989 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Make error handling for audio driver initCheck more similar

Change-Id: I8222f00f7ac89d52235af0f64f3fee7a8c471e1e
parent 570f633e
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -1384,7 +1384,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac

    lStatus = initCheck();
    if (lStatus != NO_ERROR) {
        ALOGE("Audio driver not initialized.");
        ALOGE("createTrack_l() audio driver not initialized");
        goto Exit;
    }

@@ -5077,12 +5077,6 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe
    sp<RecordTrack> track;
    status_t lStatus;

    lStatus = initCheck();
    if (lStatus != NO_ERROR) {
        ALOGE("createRecordTrack_l() audio driver not initialized");
        goto Exit;
    }

    // client expresses a preference for FAST, but we get the final say
    if (*flags & IAudioFlinger::TRACK_FAST) {
      if (
@@ -5135,7 +5129,11 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe
    }
    *pFrameCount = frameCount;

    // FIXME use flags and tid similar to createTrack_l()
    lStatus = initCheck();
    if (lStatus != NO_ERROR) {
        ALOGE("createRecordTrack_l() audio driver not initialized");
        goto Exit;
    }

    { // scope for mLock
        Mutex::Autolock _l(mLock);