Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f6882ff authored by Cheney Ni's avatar Cheney Ni Committed by Hansong Zhang
Browse files

Register Bluetooth Audio Hal v2 within Audio HAL

Register Bluetooth Audio Hal v2 by Audio HAL service so Bluetooth stack
can fetch the service interface as well.

Bug: 111519504
Test: manual

Change-Id: I3ac8c0472c58dd4d8a9b1ad8408313b80282cc85
parent 47a83097
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -44,6 +44,7 @@ LOCAL_SHARED_LIBRARIES := \
    android.hardware.audio.effect@2.0 \
    android.hardware.audio.effect@2.0 \
    android.hardware.audio.effect@4.0 \
    android.hardware.audio.effect@4.0 \
    android.hardware.bluetooth.a2dp@1.0 \
    android.hardware.bluetooth.a2dp@1.0 \
    android.hardware.bluetooth.audio@2.0 \
    android.hardware.soundtrigger@2.0 \
    android.hardware.soundtrigger@2.0 \
    android.hardware.soundtrigger@2.1
    android.hardware.soundtrigger@2.1


+6 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@
#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
#include <android/hardware/audio/effect/4.0/IEffectsFactory.h>
#include <android/hardware/audio/effect/4.0/IEffectsFactory.h>
#include <android/hardware/bluetooth/a2dp/1.0/IBluetoothAudioOffload.h>
#include <android/hardware/bluetooth/a2dp/1.0/IBluetoothAudioOffload.h>
#include <android/hardware/bluetooth/audio/2.0/IBluetoothAudioProvidersFactory.h>
#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
#include <android/hardware/soundtrigger/2.1/ISoundTriggerHw.h>
#include <android/hardware/soundtrigger/2.1/ISoundTriggerHw.h>
#include <binder/ProcessState.h>
#include <binder/ProcessState.h>
@@ -48,6 +49,11 @@ int main(int /* argc */, char* /* argv */ []) {
           registerPassthroughServiceImplementation<soundtrigger::V2_0::ISoundTriggerHw>() != OK,
           registerPassthroughServiceImplementation<soundtrigger::V2_0::ISoundTriggerHw>() != OK,
    ALOGW_IF(fail, "Could not register soundtrigger API 2.0 nor 2.1");
    ALOGW_IF(fail, "Could not register soundtrigger API 2.0 nor 2.1");


    fail = registerPassthroughServiceImplementation<
                   bluetooth::audio::V2_0::IBluetoothAudioProvidersFactory>() != OK;
    ALOGW_IF(fail, "Could not register Bluetooth Audio API 2.0");

    // remove the old HIDL when Bluetooth Audio Hal V2 has offloading supported
    fail =
    fail =
        registerPassthroughServiceImplementation<bluetooth::a2dp::V1_0::IBluetoothAudioOffload>() !=
        registerPassthroughServiceImplementation<bluetooth::a2dp::V1_0::IBluetoothAudioOffload>() !=
        OK;
        OK;