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

Commit 260e6983 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Automerger Merge Worker
Browse files

DO NOT MERGE APM clear AS routing cache on output activity with preferred device am: 32b7a104

parents dceddb2e 32b7a104
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2017,6 +2017,10 @@ status_t AudioPolicyManager::startOutput(audio_port_handle_t portId)
        outputDesc->stop();
        return status;
    }
    if (client->hasPreferredDevice()) {
        // playback activity with preferred device impacts routing occurred, inform upper layers
        mpClientInterface->onRoutingUpdated();
    }
    if (delayMs != 0) {
        usleep(delayMs * 1000);
    }
@@ -2262,6 +2266,11 @@ status_t AudioPolicyManager::stopOutput(audio_port_handle_t portId)
    }
    sp<TrackClientDescriptor> client = outputDesc->getClient(portId);

    if (client->hasPreferredDevice(true)) {
        // playback activity with preferred device impacts routing occurred, inform upper layers
        mpClientInterface->onRoutingUpdated();
    }

    ALOGV("stopOutput() output %d, stream %d, session %d",
          outputDesc->mIoHandle, client->stream(), client->session());