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

Commit 2fe1bbcc authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Audio policy: fix effect parking when releasing an input am: c03ada6c

parents be1213cf c03ada6c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3190,7 +3190,12 @@ void AudioPolicyManager::releaseInput(audio_port_handle_t portId)
    ALOGV("%s %d", __FUNCTION__, input);

    inputDesc->removeClient(portId);

    // If no more clients are present in this session, park effects to an orphan chain
    RecordClientVector clientsOnSession = inputDesc->getClientsForSession(client->session());
    if (clientsOnSession.size() == 0) {
        mEffects.putOrphanEffects(client->session(), input, &mInputs, mpClientInterface);
    }
    if (inputDesc->getClientCount() > 0) {
        ALOGV("%s(%d) %zu clients remaining", __func__, portId, inputDesc->getClientCount());
        return;