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

Commit c4b7b464 authored by Naresh Tanniru's avatar Naresh Tanniru Committed by Arne Coucheron
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 af1613a4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -779,8 +779,8 @@ status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDe
                        desc->isActive() &&
                        outputDesc->sharesHwModuleWith(desc) &&
                        (newDevice != desc->device())) {
                        audio_devices_t dev = getNewOutputDevice(mOutputs.valueFor(curOutput), false
 /*fromCache*/);
                        audio_devices_t dev = getNewOutputDevice(mOutputs.valueFor(curOutput), false /*fromCache*/);
                        bool force = desc->device() != dev;
                        uint32_t delayMs;
                        if (dev == prevDevice) {
                            delayMs = 0;
@@ -789,7 +789,7 @@ status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDe
                        }
                        setOutputDevice(desc,
                                    dev,
                                    true,
                                    force,
                                    delayMs);
                }
            }