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

Commit 7010e5b1 authored by Naresh Tanniru's avatar Naresh Tanniru Committed by Dan Pasanen
Browse files

audiopolicy: Avoid spurious routing in APM::stopSource

- On AudioOutput::stopSource, ignore routing calls
on an output descriptor to the same device

Change-Id: I10026d3d9147e45d3ed2b93160922bc3bb4bc2d0
parent 889c0b33
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -832,6 +832,7 @@ status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDe
                        (newDevice != desc->device())) {
                        audio_devices_t dev = getNewOutputDevice(mOutputs.valueFor(curOutput), false
 /*fromCache*/);
                        bool force = desc->device() != dev;
                        uint32_t delayMs;
                        if (dev == prevDevice) {
                            delayMs = 0;
@@ -840,7 +841,7 @@ status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDe
                        }
                        setOutputDevice(desc,
                                    dev,
                                    true,
                                    force,
                                    delayMs);
                }
            }