Loading audio/aidl/default/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ cc_library { "audio_policy_engine_configuration_aidl_default", ], shared_libs: [ "android.hardware.bluetooth.audio-impl", "libaudio_aidl_conversion_common_ndk", "libbluetooth_audio_session_aidl", "libmedia_helper", Loading Loading @@ -127,6 +128,7 @@ cc_binary { "libaudioserviceexampleimpl", ], shared_libs: [ "android.hardware.bluetooth.audio-impl", "libaudio_aidl_conversion_common_ndk", "libbluetooth_audio_session_aidl", "libmedia_helper", Loading audio/aidl/default/bluetooth/ModuleBluetooth.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -33,8 +33,23 @@ using aidl::android::media::audio::common::MicrophoneInfo; using android::bluetooth::audio::aidl::BluetoothAudioPortAidl; using android::bluetooth::audio::aidl::BluetoothAudioPortAidlOut; // TODO(b/312265159) bluetooth audio should be in its own process // Remove this and the shared_libs when that happens extern "C" binder_status_t createIBluetoothAudioProviderFactory(); namespace aidl::android::hardware::audio::core { ModuleBluetooth::ModuleBluetooth(std::unique_ptr<Module::Configuration>&& config) : Module(Type::BLUETOOTH, std::move(config)) { // TODO(b/312265159) bluetooth audio should be in its own process // Remove this and the shared_libs when that happens binder_status_t status = createIBluetoothAudioProviderFactory(); if (status != STATUS_OK) { LOG(ERROR) << "Failed to create bluetooth audio provider factory. Status: " << ::android::statusToString(status); } } ndk::ScopedAStatus ModuleBluetooth::getBluetoothA2dp( std::shared_ptr<IBluetoothA2dp>* _aidl_return) { *_aidl_return = getBtA2dp().getInstance(); Loading audio/aidl/default/include/core-impl/ModuleBluetooth.h +1 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,7 @@ class ModuleBluetooth final : public Module { std::weak_ptr<IBluetoothLe>> BtProfileHandles; ModuleBluetooth(std::unique_ptr<Configuration>&& config) : Module(Type::BLUETOOTH, std::move(config)) {} ModuleBluetooth(std::unique_ptr<Configuration>&& config); private: ChildInterface<BluetoothA2dp>& getBtA2dp(); Loading Loading
audio/aidl/default/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ cc_library { "audio_policy_engine_configuration_aidl_default", ], shared_libs: [ "android.hardware.bluetooth.audio-impl", "libaudio_aidl_conversion_common_ndk", "libbluetooth_audio_session_aidl", "libmedia_helper", Loading Loading @@ -127,6 +128,7 @@ cc_binary { "libaudioserviceexampleimpl", ], shared_libs: [ "android.hardware.bluetooth.audio-impl", "libaudio_aidl_conversion_common_ndk", "libbluetooth_audio_session_aidl", "libmedia_helper", Loading
audio/aidl/default/bluetooth/ModuleBluetooth.cpp +15 −0 Original line number Diff line number Diff line Loading @@ -33,8 +33,23 @@ using aidl::android::media::audio::common::MicrophoneInfo; using android::bluetooth::audio::aidl::BluetoothAudioPortAidl; using android::bluetooth::audio::aidl::BluetoothAudioPortAidlOut; // TODO(b/312265159) bluetooth audio should be in its own process // Remove this and the shared_libs when that happens extern "C" binder_status_t createIBluetoothAudioProviderFactory(); namespace aidl::android::hardware::audio::core { ModuleBluetooth::ModuleBluetooth(std::unique_ptr<Module::Configuration>&& config) : Module(Type::BLUETOOTH, std::move(config)) { // TODO(b/312265159) bluetooth audio should be in its own process // Remove this and the shared_libs when that happens binder_status_t status = createIBluetoothAudioProviderFactory(); if (status != STATUS_OK) { LOG(ERROR) << "Failed to create bluetooth audio provider factory. Status: " << ::android::statusToString(status); } } ndk::ScopedAStatus ModuleBluetooth::getBluetoothA2dp( std::shared_ptr<IBluetoothA2dp>* _aidl_return) { *_aidl_return = getBtA2dp().getInstance(); Loading
audio/aidl/default/include/core-impl/ModuleBluetooth.h +1 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,7 @@ class ModuleBluetooth final : public Module { std::weak_ptr<IBluetoothLe>> BtProfileHandles; ModuleBluetooth(std::unique_ptr<Configuration>&& config) : Module(Type::BLUETOOTH, std::move(config)) {} ModuleBluetooth(std::unique_ptr<Configuration>&& config); private: ChildInterface<BluetoothA2dp>& getBtA2dp(); Loading