Lines Matching refs:soundDoseManager
270 sp<SoundDoseManager> soundDoseManager; in onMomentaryExposureWarning() local
273 soundDoseManager = mSoundDoseManager.promote(); in onMomentaryExposureWarning()
274 if (soundDoseManager == nullptr) { in onMomentaryExposureWarning()
279 if (!soundDoseManager->useHalSoundDose()) { in onMomentaryExposureWarning()
284 auto id = soundDoseManager->getIdForAudioDevice(in_audioDevice); in onMomentaryExposureWarning()
292 float attenuation = soundDoseManager->getAttenuationForDeviceId(id); in onMomentaryExposureWarning()
295 soundDoseManager->onMomentaryExposure(in_currentDbA - attenuation, id); in onMomentaryExposureWarning()
303 sp<SoundDoseManager> soundDoseManager; in onNewMelValues() local
306 soundDoseManager = mSoundDoseManager.promote(); in onNewMelValues()
307 if (soundDoseManager == nullptr) { in onNewMelValues()
312 if (!soundDoseManager->useHalSoundDose()) { in onNewMelValues()
317 auto id = soundDoseManager->getIdForAudioDevice(in_audioDevice); in onNewMelValues()
326 soundDoseManager->onNewMelValues(in_melRecord.melValues, 0, in_melRecord.melValues.size(), in onNewMelValues()
335 auto soundDoseManager = mSoundDoseManager.promote(); in binderDied() local
336 if (soundDoseManager != nullptr) { in binderDied()
337 soundDoseManager->resetSoundDose(); in binderDied()
343 auto soundDoseManager = mSoundDoseManager.promote(); in setOutputRs2UpperBound() local
344 if (soundDoseManager != nullptr) { in setOutputRs2UpperBound()
345 soundDoseManager->setOutputRs2UpperBound(value); in setOutputRs2UpperBound()
353 auto soundDoseManager = mSoundDoseManager.promote(); in resetCsd() local
354 if (soundDoseManager != nullptr) { in resetCsd()
355 soundDoseManager->resetCsd(currentCsd, records); in resetCsd()
362 auto soundDoseManager = mSoundDoseManager.promote(); in updateAttenuation() local
363 if (soundDoseManager != nullptr) { in updateAttenuation()
364 soundDoseManager->updateAttenuation(attenuationDB, static_cast<audio_devices_t>(device)); in updateAttenuation()
371 auto soundDoseManager = mSoundDoseManager.promote(); in setCsdEnabled() local
372 if (soundDoseManager != nullptr) { in setCsdEnabled()
373 soundDoseManager->setCsdEnabled(enabled); in setCsdEnabled()
381 auto soundDoseManager = mSoundDoseManager.promote(); in initCachedAudioDeviceCategories() local
382 if (soundDoseManager != nullptr) { in initCachedAudioDeviceCategories()
383 soundDoseManager->initCachedAudioDeviceCategories(btDeviceCategories); in initCachedAudioDeviceCategories()
390 auto soundDoseManager = mSoundDoseManager.promote(); in setAudioDeviceCategory() local
391 if (soundDoseManager != nullptr) { in setAudioDeviceCategory()
392 soundDoseManager->setAudioDeviceCategory(btAudioDevice); in setAudioDeviceCategory()
399 auto soundDoseManager = mSoundDoseManager.promote(); in getOutputRs2UpperBound() local
400 if (soundDoseManager != nullptr) { in getOutputRs2UpperBound()
401 const std::lock_guard _l(soundDoseManager->mLock); in getOutputRs2UpperBound()
402 *value = soundDoseManager->mRs2UpperBound; in getOutputRs2UpperBound()
409 auto soundDoseManager = mSoundDoseManager.promote(); in getCsd() local
410 if (soundDoseManager != nullptr) { in getCsd()
411 *value = soundDoseManager->mMelAggregator->getCsd(); in getCsd()
418 auto soundDoseManager = mSoundDoseManager.promote(); in forceUseFrameworkMel() local
419 if (soundDoseManager != nullptr) { in forceUseFrameworkMel()
420 soundDoseManager->setUseFrameworkMel(useFrameworkMel); in forceUseFrameworkMel()
428 auto soundDoseManager = mSoundDoseManager.promote(); in forceComputeCsdOnAllDevices() local
429 if (soundDoseManager != nullptr) { in forceComputeCsdOnAllDevices()
430 soundDoseManager->setComputeCsdOnAllDevices(computeCsdOnAllDevices); in forceComputeCsdOnAllDevices()
438 auto soundDoseManager = mSoundDoseManager.promote(); in isSoundDoseHalSupported() local
439 if (soundDoseManager != nullptr) { in isSoundDoseHalSupported()
440 *value = soundDoseManager->isSoundDoseHalSupported(); in isSoundDoseHalSupported()