Loading media/libaudioclient/aidl/android/media/IAudioPolicyService.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ interface IAudioPolicyService { void releaseInput(int /* audio_port_handle_t */ portId); oneway void setDeviceAbsoluteVolumeEnabled(in AudioDevice device, void setDeviceAbsoluteVolumeEnabled(in AudioDevice device, boolean enabled, AudioStreamType streamToDriveAbs); Loading services/audiopolicy/managerdefault/AudioPolicyManager.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -3546,6 +3546,9 @@ status_t AudioPolicyManager::setDeviceAbsoluteVolumeEnabled(audio_devices_t devi bool enabled, audio_stream_type_t streamToDriveAbs) { ALOGI("%s: deviceType 0x%X, enabled %d, streamToDriveAbs %d", __func__, deviceType, enabled, streamToDriveAbs); if (!enabled) { mAbsoluteVolumeDrivingStreams.erase(deviceType); return NO_ERROR; Loading Loading @@ -8276,9 +8279,9 @@ float AudioPolicyManager::adjustDeviceAttenuationForAbsVolume(IVolumeCurves &cur float volumeDb = curves.volIndexToDb(deviceCategory, index); if (com_android_media_audio_abs_volume_index_fix()) { if (mAbsoluteVolumeDrivingStreams.find(volumeDevice) != mAbsoluteVolumeDrivingStreams.end()) { audio_attributes_t attributesToDriveAbs = mAbsoluteVolumeDrivingStreams[volumeDevice]; const auto it = mAbsoluteVolumeDrivingStreams.find(volumeDevice); if (it != mAbsoluteVolumeDrivingStreams.end()) { audio_attributes_t attributesToDriveAbs = it->second; auto groupToDriveAbs = mEngine->getVolumeGroupForAttributes(attributesToDriveAbs); if (groupToDriveAbs == VOLUME_GROUP_NONE) { ALOGD("%s: no group matching with %s", __FUNCTION__, Loading services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp +10 −5 Original line number Diff line number Diff line Loading @@ -1116,8 +1116,15 @@ Status AudioPolicyService::releaseInput(int32_t portIdAidl) Status AudioPolicyService::setDeviceAbsoluteVolumeEnabled(const AudioDevice& deviceAidl, bool enabled, AudioStreamType streamToDriveAbsAidl) { audio_stream_type_t streamToDriveAbs = VALUE_OR_RETURN_BINDER_STATUS( ALOGI("%s: deviceAidl %s, enabled %d, streamToDriveAbsAidl %d", __func__, deviceAidl.toString().c_str(), enabled, streamToDriveAbsAidl); audio_stream_type_t streamToDriveAbs = AUDIO_STREAM_DEFAULT; if (enabled) { streamToDriveAbs = VALUE_OR_RETURN_BINDER_STATUS( aidl2legacy_AudioStreamType_audio_stream_type_t(streamToDriveAbsAidl)); } audio_devices_t deviceType; std::string address; RETURN_BINDER_STATUS_IF_ERROR( Loading @@ -1131,9 +1138,7 @@ Status AudioPolicyService::setDeviceAbsoluteVolumeEnabled(const AudioDevice& dev : settingsAllowed())) { return binderStatusFromStatusT(PERMISSION_DENIED); } if (uint32_t(streamToDriveAbs) >= AUDIO_STREAM_PUBLIC_CNT) { return binderStatusFromStatusT(BAD_VALUE); } audio_utils::lock_guard _l(mMutex); AutoCallerClear acc; return binderStatusFromStatusT( Loading Loading
media/libaudioclient/aidl/android/media/IAudioPolicyService.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ interface IAudioPolicyService { void releaseInput(int /* audio_port_handle_t */ portId); oneway void setDeviceAbsoluteVolumeEnabled(in AudioDevice device, void setDeviceAbsoluteVolumeEnabled(in AudioDevice device, boolean enabled, AudioStreamType streamToDriveAbs); Loading
services/audiopolicy/managerdefault/AudioPolicyManager.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -3546,6 +3546,9 @@ status_t AudioPolicyManager::setDeviceAbsoluteVolumeEnabled(audio_devices_t devi bool enabled, audio_stream_type_t streamToDriveAbs) { ALOGI("%s: deviceType 0x%X, enabled %d, streamToDriveAbs %d", __func__, deviceType, enabled, streamToDriveAbs); if (!enabled) { mAbsoluteVolumeDrivingStreams.erase(deviceType); return NO_ERROR; Loading Loading @@ -8276,9 +8279,9 @@ float AudioPolicyManager::adjustDeviceAttenuationForAbsVolume(IVolumeCurves &cur float volumeDb = curves.volIndexToDb(deviceCategory, index); if (com_android_media_audio_abs_volume_index_fix()) { if (mAbsoluteVolumeDrivingStreams.find(volumeDevice) != mAbsoluteVolumeDrivingStreams.end()) { audio_attributes_t attributesToDriveAbs = mAbsoluteVolumeDrivingStreams[volumeDevice]; const auto it = mAbsoluteVolumeDrivingStreams.find(volumeDevice); if (it != mAbsoluteVolumeDrivingStreams.end()) { audio_attributes_t attributesToDriveAbs = it->second; auto groupToDriveAbs = mEngine->getVolumeGroupForAttributes(attributesToDriveAbs); if (groupToDriveAbs == VOLUME_GROUP_NONE) { ALOGD("%s: no group matching with %s", __FUNCTION__, Loading
services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp +10 −5 Original line number Diff line number Diff line Loading @@ -1116,8 +1116,15 @@ Status AudioPolicyService::releaseInput(int32_t portIdAidl) Status AudioPolicyService::setDeviceAbsoluteVolumeEnabled(const AudioDevice& deviceAidl, bool enabled, AudioStreamType streamToDriveAbsAidl) { audio_stream_type_t streamToDriveAbs = VALUE_OR_RETURN_BINDER_STATUS( ALOGI("%s: deviceAidl %s, enabled %d, streamToDriveAbsAidl %d", __func__, deviceAidl.toString().c_str(), enabled, streamToDriveAbsAidl); audio_stream_type_t streamToDriveAbs = AUDIO_STREAM_DEFAULT; if (enabled) { streamToDriveAbs = VALUE_OR_RETURN_BINDER_STATUS( aidl2legacy_AudioStreamType_audio_stream_type_t(streamToDriveAbsAidl)); } audio_devices_t deviceType; std::string address; RETURN_BINDER_STATUS_IF_ERROR( Loading @@ -1131,9 +1138,7 @@ Status AudioPolicyService::setDeviceAbsoluteVolumeEnabled(const AudioDevice& dev : settingsAllowed())) { return binderStatusFromStatusT(PERMISSION_DENIED); } if (uint32_t(streamToDriveAbs) >= AUDIO_STREAM_PUBLIC_CNT) { return binderStatusFromStatusT(BAD_VALUE); } audio_utils::lock_guard _l(mMutex); AutoCallerClear acc; return binderStatusFromStatusT( Loading