Loading services/audiopolicy/AudioPolicyManager.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -4358,11 +4358,15 @@ uint32_t AudioPolicyManager::setOutputDevice(audio_io_handle_t output, muteWaitMs = checkDeviceMuteStrategies(outputDesc, prevDevice, delayMs); // Do not change the routing if: // - the requested device is AUDIO_DEVICE_NONE // - the requested device is the same as current device and force is not specified. // the requested device is AUDIO_DEVICE_NONE // OR the requested device is the same as current device // AND force is not specified // AND the output is connected by a valid audio patch. // Doing this check here allows the caller to call setOutputDevice() without conditions if ((device == AUDIO_DEVICE_NONE || device == prevDevice) && !force) { ALOGV("setOutputDevice() setting same device %04x or null device for output %d", device, output); if ((device == AUDIO_DEVICE_NONE || device == prevDevice) && !force && outputDesc->mPatchHandle != 0) { ALOGV("setOutputDevice() setting same device %04x or null device for output %d", device, output); return muteWaitMs; } Loading Loading
services/audiopolicy/AudioPolicyManager.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -4358,11 +4358,15 @@ uint32_t AudioPolicyManager::setOutputDevice(audio_io_handle_t output, muteWaitMs = checkDeviceMuteStrategies(outputDesc, prevDevice, delayMs); // Do not change the routing if: // - the requested device is AUDIO_DEVICE_NONE // - the requested device is the same as current device and force is not specified. // the requested device is AUDIO_DEVICE_NONE // OR the requested device is the same as current device // AND force is not specified // AND the output is connected by a valid audio patch. // Doing this check here allows the caller to call setOutputDevice() without conditions if ((device == AUDIO_DEVICE_NONE || device == prevDevice) && !force) { ALOGV("setOutputDevice() setting same device %04x or null device for output %d", device, output); if ((device == AUDIO_DEVICE_NONE || device == prevDevice) && !force && outputDesc->mPatchHandle != 0) { ALOGV("setOutputDevice() setting same device %04x or null device for output %d", device, output); return muteWaitMs; } Loading