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

Commit 9807247a authored by Ajender Reddy's avatar Ajender Reddy
Browse files

libaudiohal@aidl: allow ACTIVE,TRANSFERRING,DRAINING for resume

resume may return success even if the state falls into any
one of the states namely ACTIVE,TRANSFERRING,DRAINING.

Bug: 349413905 
test: run offload playback

Change-Id: I8449557f0aaaa0077d8e2a956d07cf172c821474
parent 027e8a38
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -445,6 +445,11 @@ status_t StreamHalAidl::resume(StreamDescriptor::Reply* reply) {
                   state == StreamDescriptor::State::TRANSFER_PAUSED ||
                   state == StreamDescriptor::State::DRAIN_PAUSED) {
            return sendCommand(makeHalCommand<HalCommand::Tag::start>(), reply);
        } else if (state == StreamDescriptor::State::ACTIVE ||
                   state == StreamDescriptor::State::TRANSFERRING ||
                   state == StreamDescriptor::State::DRAINING) {
            ALOGD("%s: already in stream state: %s", __func__, toString(state).c_str());
            return OK;
        } else {
            ALOGE("%s: unexpected stream state: %s (expected IDLE or one of *PAUSED states)",
                        __func__, toString(state).c_str());