mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Add default implementation and VTS for ISoundDose
The ISoundDose HAL interface is used for reporting the sound dose
relevant information from/to the HAL. This is necessary for all devices
that certify with the IEC62368-1 3rd edition and EN50332-3 standard
for safe hearing.
Bug: 248567177
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Ib89e09243a01cebc2f7996b6b572384a1471867a
Merged-In: Ib89e09243a01cebc2f7996b6b572384a1471867a
(cherry picked from commit 83a2146546)
This commit is contained in:
committed by
Mikhail Naganov
parent
83a6d82793
commit
943b7e2b91
@@ -26,6 +26,7 @@
|
||||
#include <aidl/android/media/audio/common/AudioOutputFlags.h>
|
||||
|
||||
#include "core-impl/Module.h"
|
||||
#include "core-impl/SoundDose.h"
|
||||
#include "core-impl/Telephony.h"
|
||||
#include "core-impl/utils.h"
|
||||
|
||||
@@ -932,8 +933,11 @@ ndk::ScopedAStatus Module::updateScreenState(bool in_isTurnedOn) {
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus Module::getSoundDose(std::shared_ptr<ISoundDose>* _aidl_return) {
|
||||
*_aidl_return = nullptr;
|
||||
LOG(DEBUG) << __func__ << ": ISoundDose not implemented";
|
||||
if (mSoundDose == nullptr) {
|
||||
mSoundDose = ndk::SharedRefBase::make<SoundDose>();
|
||||
}
|
||||
*_aidl_return = mSoundDose;
|
||||
LOG(DEBUG) << __func__ << ": returning instance of ISoundDose: " << _aidl_return->get();
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user