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

Commit 995ba712 authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: fix regression in A2DP playback

commit f05fc906 introduced a regression preventing playback over A2DP
to resume after the second time an A2DP device is connected.

Bug: 70245910
Test: Audio smoke test, CTS test for AudioTrack.
Change-Id: Ic6b5da96debf62be08ae12efec27ad36854fe3c5
parent 1b2de88f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -249,6 +249,9 @@ void AudioInputDescriptor::close()
        mClientInterface->closeInput(mIoHandle);
        LOG_ALWAYS_FATAL_IF(mProfile->curOpenCount < 1, "%s profile open count %u",
                            __FUNCTION__, mProfile->curOpenCount);
        if (isActive()) {
            mProfile->curActiveCount--;
        }
        mProfile->curOpenCount--;
        mIoHandle = AUDIO_IO_HANDLE_NONE;
    }
+3 −0
Original line number Diff line number Diff line
@@ -462,6 +462,9 @@ void SwAudioOutputDescriptor::close()

        LOG_ALWAYS_FATAL_IF(mProfile->curOpenCount < 1, "%s profile open count %u",
                            __FUNCTION__, mProfile->curOpenCount);
        if (isActive()) {
            mProfile->curActiveCount--;
        }
        mProfile->curOpenCount--;
        mIoHandle = AUDIO_IO_HANDLE_NONE;
    }