Home
last modified time | relevance | path

Searched refs:volumeLevel (Results 1 - 25 of 45) sorted by relevance

12

/foundation/multimedia/audio_framework/frameworks/native/audiopolicy/test/unittest/policy_test/src/
H A Daudio_policy_unit_test.cpp997 int32_t volumeLevel = 2; in HWTEST() local
998 int32_t ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(volumeType, volumeLevel); in HWTEST()
1010 int32_t volumeLevel = 2; in HWTEST() local
1011 int32_t ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(volumeType, volumeLevel, API_7); in HWTEST()
1013 ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(volumeType, volumeLevel, API_8); in HWTEST()
1015 ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(volumeType, volumeLevel, API_9); in HWTEST()
1017 ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(volumeType, volumeLevel, API_10); in HWTEST()
1019 ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(volumeType, volumeLevel, API_11); in HWTEST()
1031 int32_t volumeLevel = 2; in HWTEST() local
1032 int32_t ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(volumeType, volumeLevel, API_ in HWTEST()
1043 int32_t volumeLevel = 2; HWTEST() local
1056 int32_t volumeLevel = 3; HWTEST() local
1069 int32_t volumeLevel = 3; HWTEST() local
1082 int32_t volumeLevel = 3; HWTEST() local
1095 int32_t volumeLevel = 4; HWTEST() local
1108 int32_t volumeLevel = 4; HWTEST() local
1121 int32_t volumeLevel = 5; HWTEST() local
1134 int32_t volumeLevel = 5; HWTEST() local
1147 int32_t volumeLevel = -1; HWTEST() local
1160 int32_t volumeLevel = 25; HWTEST() local
1173 int32_t volumeLevel = 2; HWTEST() local
1187 int32_t volumeLevel = 2; HWTEST() local
1204 int32_t volumeLevel = 3; HWTEST() local
1225 int32_t volumeLevel = 4; HWTEST() local
1254 int32_t volumeLevel = 5; HWTEST() local
1269 int32_t volumeLevel = 6; HWTEST() local
1284 int32_t volumeLevel = 8; HWTEST() local
[all...]
H A Daudio_policy_ext_unit_test.cpp330 int32_t volumeLevel = 4; in HWTEST() local
331 ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(AudioVolumeType::STREAM_MUSIC, volumeLevel); in HWTEST()
334 EXPECT_EQ(volumeLevel, ret); in HWTEST()
339 EXPECT_EQ(volumeLevel, ret); in HWTEST()
350 int32_t volumeLevel = 4; in HWTEST() local
351 ret = AudioPolicyManager::GetInstance().SetSystemVolumeLevel(AudioVolumeType::STREAM_MUSIC, volumeLevel); in HWTEST()
354 EXPECT_EQ(volumeLevel, ret); in HWTEST()
360 EXPECT_EQ(volumeLevel, ret); in HWTEST()
/foundation/multimedia/audio_framework/services/audio_policy/server/src/service/manager/
H A Daudio_adapter_manager.cpp281 void AudioAdapterManager::SaveRingtoneVolumeToLocal(AudioVolumeType volumeType, int32_t volumeLevel) in SaveRingtoneVolumeToLocal() argument
284 int32_t ret = SetParameter("persist.multimedia.audio.ringtonevolume", std::to_string(volumeLevel).c_str()); in SaveRingtoneVolumeToLocal()
286 AUDIO_INFO_LOG("Save ringtone volume for boot success %{public}d", volumeLevel); in SaveRingtoneVolumeToLocal()
293 int32_t AudioAdapterManager::SetSystemVolumeLevel(AudioStreamType streamType, int32_t volumeLevel) in SetSystemVolumeLevel() argument
295 AUDIO_INFO_LOG("SetSystemVolumeLevel: streamType: %{public}d, deviceType: %{public}d, volumeLevel:%{public}d", in SetSystemVolumeLevel()
296 streamType, currentActiveDevice_, volumeLevel); in SetSystemVolumeLevel()
297 if (GetSystemVolumeLevel(streamType) == volumeLevel && currentActiveDevice_ != DEVICE_TYPE_BLUETOOTH_SCO && in SetSystemVolumeLevel()
302 AUDIO_INFO_LOG("SetSystemVolumeLevel: streamType: %{public}d, deviceType: %{public}d, volumeLevel:%{public}d", in SetSystemVolumeLevel()
303 streamType, currentActiveDevice_, volumeLevel); in SetSystemVolumeLevel()
304 if (volumeLevel in SetSystemVolumeLevel()
343 HandleSaveVolume(DeviceType deviceType, AudioStreamType streamType, int32_t volumeLevel) HandleSaveVolume() argument
361 int32_t volumeLevel = HandleRingerMode() local
379 int32_t volumeLevel = SetVolumeDb() local
454 int32_t volumeLevel = volumeDataMaintainer_.GetStreamVolume(volumeType) * (isMuted ? 0 : 1); SetAudioVolume() local
509 int32_t volumeLevel = volumeDataMaintainer_.GetStreamVolume(streamType); GetSystemVolumeDb() local
1284 int32_t volumeLevel = GetMaxVolumeLevel(streamAlias); ResetRemoteCastDeviceVolume() local
1318 int32_t volumeLevel = InitRingerMode() local
1340 int32_t volumeLevel = TransferByteArrayToType<int>(value.Data()); CloneVolumeMap() local
1670 CalculateVolumeDb(int32_t volumeLevel) CalculateVolumeDb() argument
1758 GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType) GetSystemVolumeInDb() argument
1792 CalculateVolumeDbNonlinear(AudioStreamType streamType, DeviceType deviceType, int32_t volumeLevel) CalculateVolumeDbNonlinear() argument
[all...]
H A Dvolume_data_maintainer.cpp122 bool VolumeDataMaintainer::SaveVolume(DeviceType type, AudioStreamType streamType, int32_t volumeLevel) in SaveVolume() argument
133 ErrCode ret = audioSettingProvider.PutIntValue(volumeKey, volumeLevel, "system"); in SaveVolume()
171 void VolumeDataMaintainer::SetStreamVolume(AudioStreamType streamType, int32_t volumeLevel) in SetStreamVolume() argument
174 SetStreamVolumeInternal(streamType, volumeLevel); in SetStreamVolume()
177 void VolumeDataMaintainer::SetStreamVolumeInternal(AudioStreamType streamType, int32_t volumeLevel) in SetStreamVolumeInternal() argument
180 volumeLevelMap_[streamForVolumeMap] = volumeLevel; in SetStreamVolumeInternal()
H A Daudio_adapter_manager_handler.cpp54 const AudioStreamType &streamType, const int32_t &volumeLevel) in SendSaveVolume()
56 auto eventContextObj = std::make_shared<VolumeDataEvent>(deviceType, streamType, volumeLevel); in SendSaveVolume()
53 SendSaveVolume(const DeviceType &deviceType, const AudioStreamType &streamType, const int32_t &volumeLevel) SendSaveVolume() argument
/foundation/multimedia/audio_framework/services/audio_policy/server/include/service/manager/
H A Daudio_adapter_manager_handler.h48 VolumeDataEvent(const DeviceType &deviceType, const AudioStreamType &streamType, const int32_t &volumeLevel) in VolumeDataEvent()
49 : deviceType_(deviceType), streamType_(streamType), volumeLevel_(volumeLevel) in VolumeDataEvent()
75 bool SendSaveVolume(const DeviceType &deviceType, const AudioStreamType &streamType, const int32_t &volumeLevel);
H A Daudio_adapter_manager.h72 int32_t SetSystemVolumeLevel(AudioStreamType streamType, int32_t volumeLevel);
117 float CalculateVolumeDb(int32_t volumeLevel);
129 float CalculateVolumeDbNonlinear(AudioStreamType streamType, DeviceType deviceType, int32_t volumeLevel);
139 float GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType);
182 void HandleSaveVolume(DeviceType deviceType, AudioStreamType streamType, int32_t volumeLevel);
235 void SaveRingtoneVolumeToLocal(AudioVolumeType volumeType, int32_t volumeLevel);
329 int32_t volumeLevel = audioAdapterManager_->GetStreamVolume(streamForVolumeMap); in OnGetVolumeDbCb() local
335 return {vol, volumeLevel}; in OnGetVolumeDbCb()
346 audioAdapterManager_->GetActiveDevice(), volumeLevel); in OnGetVolumeDbCb()
348 volumeDb = audioAdapterManager_->CalculateVolumeDb(volumeLevel); in OnGetVolumeDbCb()
[all...]
H A Dvolume_data_maintainer.h62 bool SaveVolume(DeviceType type, AudioStreamType streamType, int32_t volumeLevel);
64 void SetStreamVolume(AudioStreamType streamType, int32_t volumeLevel);
97 void SetStreamVolumeInternal(AudioStreamType streamType, int32_t volumeLevel);
/foundation/multimedia/audio_framework/services/audio_policy/server/include/service/interface/
H A Diaudio_policy_interface.h49 virtual int32_t SetSystemVolumeLevel(AudioStreamType streamType, int32_t volumeLevel) = 0;
96 virtual float CalculateVolumeDb(int32_t volumeLevel) = 0;
118 virtual float GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType) = 0;
154 virtual void HandleSaveVolume(DeviceType deviceType, AudioStreamType streamType, int32_t volumeLevel) = 0;
/foundation/multimedia/audio_framework/frameworks/cj/src/
H A Dmultimedia_audio_volume_group_manager_impl.cpp48 float MMAAudioVolumeGroupManagerImpl::GetSystemVolumeInDb(int32_t volumeType, int32_t volumeLevel, int32_t deviceType) in GetSystemVolumeInDb() argument
50 auto ret = audioGroupMngr_->GetSystemVolumeInDb(static_cast<AudioVolumeType>(volumeType), volumeLevel, in GetSystemVolumeInDb()
/foundation/multimedia/audio_framework/services/audio_service/common/include/
H A Daudio_volume.h50 void SetSystemVolume(int32_t volumeType, const std::string &deviceClass, float volume, int32_t volumeLevel);
100 SystemVolume(int32_t volumeType, std::string deviceClass, float volume, int32_t volumeLevel, bool isMuted) in SystemVolume() argument
102 volumeLevel_(volumeLevel), isMuted_(isMuted) {}; in SystemVolume()
/foundation/multimedia/audio_framework/services/audio_policy/client/src/proxy/
H A Daudio_policy_volume_proxy.cpp58 int32_t AudioPolicyProxy::SetSystemVolumeLevelLegacy(AudioVolumeType volumeType, int32_t volumeLevel) in SetSystemVolumeLevelLegacy() argument
67 data.WriteInt32(volumeLevel); in SetSystemVolumeLevelLegacy()
74 int32_t AudioPolicyProxy::SetSystemVolumeLevel(AudioVolumeType volumeType, int32_t volumeLevel, int32_t volumeFlag) in SetSystemVolumeLevel() argument
83 data.WriteInt32(volumeLevel); in SetSystemVolumeLevel()
223 float AudioPolicyProxy::GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType) in GetSystemVolumeInDb() argument
233 data.WriteInt32(volumeLevel); in GetSystemVolumeInDb()
/foundation/multimedia/audio_framework/frameworks/cj/include/
H A Dmultimedia_audio_volume_group_manager_impl.h37 float GetSystemVolumeInDb(int32_t volumeType, int32_t volumeLevel, int32_t deviceType);
/foundation/multimedia/audio_framework/services/audio_service/common/src/
H A Daudio_volume.cpp93 int32_t volumeLevel = 0; in GetVolume() local
98 volumeLevel = itSV->second.volumeLevel_; in GetVolume()
109 monitorVolume_[sessionId] = {volumeFloat, volumeLevel}; in GetVolume()
257 " volume:%{public}f, volumeLevel:%{public}d, isMuted:%{public}d, systemVolumeSize:%{public}zu", in SetSystemVolume()
262 void AudioVolume::SetSystemVolume(int32_t volumeType, const std::string &deviceClass, float volume, int32_t volumeLevel) in SetSystemVolume() argument
268 it->second.volumeLevel_ = volumeLevel; in SetSystemVolume()
272 systemVolume.volumeLevel_ = volumeLevel; in SetSystemVolume()
276 " volume:%{public}f, volumeLevel:%{public}d, systemVolumeSize:%{public}zu", in SetSystemVolume()
277 volumeType, deviceClass.c_str(), volume, volumeLevel, systemVolume_.size()); in SetSystemVolume()
350 AppendFormat(dumpString, " volumeLevel in Dump()
[all...]
/foundation/multimedia/audio_framework/services/audio_policy/server/src/
H A Daudio_policy_server.cpp423 bool AudioPolicyServer::IsVolumeLevelValid(AudioStreamType streamType, int32_t volumeLevel) in IsVolumeLevelValid() argument
426 if (volumeLevel < audioPolicyService_.GetMinVolumeLevel(streamType) || in IsVolumeLevelValid()
427 volumeLevel > audioPolicyService_.GetMaxVolumeLevel(streamType)) { in IsVolumeLevelValid()
428 AUDIO_ERR_LOG("IsVolumeLevelValid: volumeLevel[%{public}d] is out of valid range for streamType[%{public}d]", in IsVolumeLevelValid()
429 volumeLevel, streamType); in IsVolumeLevelValid()
623 int32_t AudioPolicyServer::SetSystemVolumeLevelLegacy(AudioStreamType streamType, int32_t volumeLevel) in SetSystemVolumeLevelLegacy() argument
634 if (!IsVolumeLevelValid(streamType, volumeLevel)) { in SetSystemVolumeLevelLegacy()
638 return SetSystemVolumeLevelInternal(streamType, volumeLevel, false); in SetSystemVolumeLevelLegacy()
641 int32_t AudioPolicyServer::SetSystemVolumeLevel(AudioStreamType streamType, int32_t volumeLevel, int32_t volumeFlag) in SetSystemVolumeLevel() argument
651 if (!IsVolumeLevelValid(streamType, volumeLevel)) { in SetSystemVolumeLevel()
765 GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType) GetSystemVolumeInDb() argument
867 SetSystemVolumeLevelInternal(AudioStreamType streamType, int32_t volumeLevel, bool isUpdateUi) SetSystemVolumeLevelInternal() argument
891 SetSingleStreamVolume(AudioStreamType streamType, int32_t volumeLevel, bool isUpdateUi) SetSingleStreamVolume() argument
[all...]
/foundation/multimedia/audio_framework/test/fuzztest/audiopolicyservicemore_fuzzer/
H A Daudio_policy_service_more_fuzzer.cpp322 int32_t volumeLevel = *reinterpret_cast<const int32_t*>(rawData); in AudioPolicyServiceTestII() local
323 GetServerPtr()->audioPolicyService_.DealWithSafeVolume(volumeLevel, true); in AudioPolicyServiceTestII()
324 GetServerPtr()->audioPolicyService_.DealWithSafeVolume(volumeLevel, false); in AudioPolicyServiceTestII()
331 volumeLevel = GetServerPtr()->audioPolicyService_.audioPolicyManager_.GetSafeVolumeLevel() + MOD_NUM_TWO; in AudioPolicyServiceTestII()
333 GetServerPtr()->audioPolicyService_.SetA2dpDeviceVolume("activeBTDevice_1", volumeLevel, true); in AudioPolicyServiceTestII()
334 GetServerPtr()->audioPolicyService_.SetA2dpDeviceVolume("activeBTDevice_1", volumeLevel, false); in AudioPolicyServiceTestII()
/foundation/multimedia/audio_framework/services/audio_policy/test/unittest/audio_policy_service_unit_test/src/
H A Daudio_policy_service_second_unit_test.cpp360 int32_t volumeLevel = 5; in HWTEST_F() local
362 int32_t volumeLevelRet = server->audioPolicyService_.DealWithSafeVolume(volumeLevel, isA2dpDevice); in HWTEST_F()
366 volumeLevelRet = server->audioPolicyService_.DealWithSafeVolume(volumeLevel, isA2dpDevice); in HWTEST_F()
369 volumeLevel = 11; in HWTEST_F()
370 volumeLevelRet = server->audioPolicyService_.DealWithSafeVolume(volumeLevel, isA2dpDevice); in HWTEST_F()
383 int32_t volumeLevel = 10; in HWTEST_F() local
384 int32_t safeVolumeLevel = server->audioPolicyService_.HandleAbsBluetoothVolume(macAddress, volumeLevel); in HWTEST_F()
387 volumeLevel = 1; in HWTEST_F()
388 safeVolumeLevel = server->audioPolicyService_.HandleAbsBluetoothVolume(macAddress, volumeLevel); in HWTEST_F()
401 int32_t volumeLevel in HWTEST_F() local
[all...]
/foundation/communication/bluetooth/frameworks/inner/ipc/interface/
H A Di_bluetooth_avrcp_tg.h49 virtual int32_t SetDeviceAbsoluteVolume(const BluetoothRawAddress &addr, int32_t volumeLevel) = 0;
/foundation/communication/bluetooth/interfaces/inner_api/include/
H A Dbluetooth_avrcp_tg.h281 * @param[in] volumeLevel device absolute volume.
285 int32_t SetDeviceAbsoluteVolume(const BluetoothRemoteDevice &device, int32_t volumeLevel);
/foundation/communication/bluetooth_service/services/bluetooth/server/include/
H A Dbluetooth_avrcp_tg_server.h55 int32_t SetDeviceAbsoluteVolume(const BluetoothRawAddress &addr, int32_t volumeLevel) override;
/foundation/communication/bluetooth/frameworks/inner/ipc/include/
H A Dbluetooth_avrcp_tg_proxy.h49 int32_t SetDeviceAbsoluteVolume(const BluetoothRawAddress &addr, int32_t volumeLevel) override;
/foundation/multimedia/audio_framework/services/audio_policy/server/include/
H A Daudio_policy_server.h120 int32_t SetSystemVolumeLevelLegacy(AudioVolumeType volumeType, int32_t volumeLevel) override;
122 int32_t SetSystemVolumeLevel(AudioVolumeType volumeType, int32_t volumeLevel, int32_t volumeFlag = 0) override;
148 float GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType) override;
544 int32_t SetSystemVolumeLevelInternal(AudioStreamType streamType, int32_t volumeLevel, bool isUpdateUi);
545 int32_t SetSingleStreamVolume(AudioStreamType streamType, int32_t volumeLevel, bool isUpdateUi);
553 bool IsVolumeLevelValid(AudioStreamType streamType, int32_t volumeLevel);
/foundation/multimedia/audio_framework/services/audio_policy/client/include/
H A Daudio_policy_base.h41 virtual int32_t SetSystemVolumeLevelLegacy(AudioVolumeType volumeType, int32_t volumeLevel) = 0;
43 virtual int32_t SetSystemVolumeLevel(AudioVolumeType volumeType, int32_t volumeLevel, int32_t volumeFlag = 0) = 0;
217 virtual float GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType) = 0;
H A Daudio_policy_proxy.h37 int32_t SetSystemVolumeLevelLegacy(AudioVolumeType volumeType, int32_t volumeLevel) override;
39 int32_t SetSystemVolumeLevel(AudioVolumeType volumeType, int32_t volumeLevel, int32_t volumeFlag = 0) override;
213 float GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType) override;
/foundation/multimedia/audio_framework/interfaces/inner_api/native/audiomanager/include/
H A Daudio_group_manager.h85 float GetSystemVolumeInDb(AudioVolumeType volumeType, int32_t volumeLevel, DeviceType deviceType);

Completed in 21 milliseconds

12