CSD: add logic for selecting ISoundDose interface
There are two options for supporting sound dose. 1) the hardware
implements the standalone AIDL sound dose interface together with the
legacy audio HIDL HAL or 2) the hardware implements the new sound dose
methods as part of the audio AIDL HAL. The new logic selects the
implementation to use depending on the audio HAL that is active.
Test: bluejay-userdebug logs
Bug: 264254879
Change-Id: I0af9cd31c2e97bb9c9895439f55bbfa50e87e159
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index f8d7c70..7bb0fd3 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -2573,7 +2573,7 @@
ALOGE("loadHwModule() error %d loading module %s", rc, name);
return AUDIO_MODULE_HANDLE_NONE;
}
- if (!mMelReporter->activateHalSoundDoseComputation(name)) {
+ if (!mMelReporter->activateHalSoundDoseComputation(name, dev)) {
ALOGW("loadHwModule() sound dose reporting is not available");
}