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

Commit fedb92ef authored by jiabin's avatar jiabin Committed by Jiabin Huang
Browse files

Invalidate all clients when bit-perfect client is active.

When a bit-perfect client becomes active, invalidate all clients on outputs that don't have an active patch or share at least one device with bit-perfect output.

Bug: 366372464
Test: enable touch sound, play DSD file
Flag: EXEMPT bugfix
Change-Id: I3ed943335ce42b2c93ccdec0f3d60e4a2e48120a
parent 5be5d604
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2379,8 +2379,8 @@ status_t AudioPolicyManager::startOutput(audio_port_handle_t portId)
                // the bit-perfect sink so that it is guaranteed only bit-perfect stream is active.
                PortHandleVector clientsToInvalidate;
                for (size_t i = 0; i < mOutputs.size(); i++) {
                    if (mOutputs[i] == outputDesc ||
                        mOutputs[i]->devices().filter(outputDesc->devices()).isEmpty()) {
                    if (mOutputs[i] == outputDesc || (!mOutputs[i]->devices().isEmpty() &&
                        mOutputs[i]->devices().filter(outputDesc->devices()).isEmpty())) {
                        continue;
                    }
                    for (const auto& c : mOutputs[i]->getClientIterable()) {