Loading services/audiopolicy/managerdefault/AudioPolicyManager.cpp +8 −15 Original line number Diff line number Diff line Loading @@ -3573,8 +3573,12 @@ status_t AudioPolicyManager::setDeviceAbsoluteVolumeEnabled(audio_devices_t devi ALOGI("%s: deviceType 0x%X, enabled %d, streamToDriveAbs %d", __func__, deviceType, enabled, streamToDriveAbs); if (!enabled) { mAbsoluteVolumeDrivingStreams.erase(deviceType); return NO_ERROR; } audio_attributes_t attributesToDriveAbs = mEngine->getAttributesForStreamType(streamToDriveAbs); if (enabled) { if (attributesToDriveAbs == AUDIO_ATTRIBUTES_INITIALIZER) { ALOGW("%s: no attributes for stream %s, bailing out", __func__, toString(streamToDriveAbs).c_str()); Loading @@ -3582,17 +3586,6 @@ status_t AudioPolicyManager::setDeviceAbsoluteVolumeEnabled(audio_devices_t devi } mAbsoluteVolumeDrivingStreams[deviceType] = attributesToDriveAbs; } else { mAbsoluteVolumeDrivingStreams.erase(deviceType); } // apply the stream volumes regarding the new absolute mode to all the outputs for (size_t i = 0; i < mOutputs.size(); i++) { sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i); ALOGV("%s: apply stream volumes for portId %d", __func__, desc->getId()); applyStreamVolumes(desc, {deviceType}, static_cast<int>(desc->latency()) * 2); } return NO_ERROR; } Loading Loading
services/audiopolicy/managerdefault/AudioPolicyManager.cpp +8 −15 Original line number Diff line number Diff line Loading @@ -3573,8 +3573,12 @@ status_t AudioPolicyManager::setDeviceAbsoluteVolumeEnabled(audio_devices_t devi ALOGI("%s: deviceType 0x%X, enabled %d, streamToDriveAbs %d", __func__, deviceType, enabled, streamToDriveAbs); if (!enabled) { mAbsoluteVolumeDrivingStreams.erase(deviceType); return NO_ERROR; } audio_attributes_t attributesToDriveAbs = mEngine->getAttributesForStreamType(streamToDriveAbs); if (enabled) { if (attributesToDriveAbs == AUDIO_ATTRIBUTES_INITIALIZER) { ALOGW("%s: no attributes for stream %s, bailing out", __func__, toString(streamToDriveAbs).c_str()); Loading @@ -3582,17 +3586,6 @@ status_t AudioPolicyManager::setDeviceAbsoluteVolumeEnabled(audio_devices_t devi } mAbsoluteVolumeDrivingStreams[deviceType] = attributesToDriveAbs; } else { mAbsoluteVolumeDrivingStreams.erase(deviceType); } // apply the stream volumes regarding the new absolute mode to all the outputs for (size_t i = 0; i < mOutputs.size(); i++) { sp<SwAudioOutputDescriptor> desc = mOutputs.valueAt(i); ALOGV("%s: apply stream volumes for portId %d", __func__, desc->getId()); applyStreamVolumes(desc, {deviceType}, static_cast<int>(desc->latency()) * 2); } return NO_ERROR; } Loading