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

Commit cbcca296 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libaudiohal@aidl: Allow onError callback in any state" into main am: e7b43745

parents 78d584c3 e7b43745
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -456,15 +456,8 @@ void StreamHalAidl::onAsyncDrainReady() {

void StreamHalAidl::onAsyncError() {
    std::lock_guard l(mLock);
    if (mLastReply.state == StreamDescriptor::State::IDLE ||
        mLastReply.state == StreamDescriptor::State::DRAINING ||
        mLastReply.state == StreamDescriptor::State::TRANSFERRING) {
    ALOGW("%s: received in the state %s", __func__, toString(mLastReply.state).c_str());
    mLastReply.state = StreamDescriptor::State::ERROR;
        ALOGW("%s: onError received", __func__);
    } else {
        ALOGW("%s: unexpected onError in the state %s", __func__,
                toString(mLastReply.state).c_str());
    }
}

status_t StreamHalAidl::createMmapBuffer(int32_t minSizeFrames __unused,