Loading system/audio_hal_interface/aidl/client_interface_aidl.cc +0 −25 Original line number Diff line number Diff line Loading @@ -258,31 +258,6 @@ bool BluetoothAudioClientInterface::SetLowLatencyModeAllowed(bool allowed) { return true; } int BluetoothAudioClientInterface::GetAidlInterfaceVersion() { int aidl_version = -1; if (!is_aidl_available()) { return aidl_version; } auto provider_factory = IBluetoothAudioProviderFactory::fromBinder( ::ndk::SpAIBinder(AServiceManager_waitForService( kDefaultAudioProviderFactoryInterface.c_str()))); if (provider_factory == nullptr) { LOG(ERROR) << __func__ << ", can't get aidl version from unknown factory"; return aidl_version; } auto aidl_retval = provider_factory->getInterfaceVersion(&aidl_version); if (!aidl_retval.isOk()) { LOG(FATAL) << __func__ << ": BluetoothAudioHal::getInterfaceVersion failure: " << aidl_retval.getDescription(); } return aidl_version; } int BluetoothAudioClientInterface::StartSession() { std::lock_guard<std::mutex> guard(internal_mutex_); if (provider_ == nullptr) { Loading system/audio_hal_interface/aidl/client_interface_aidl.h +0 −2 Original line number Diff line number Diff line Loading @@ -93,8 +93,6 @@ class BluetoothAudioClientInterface { static bool is_aidl_available(); static int GetAidlInterfaceVersion(); protected: mutable std::mutex internal_mutex_; /*** Loading system/audio_hal_interface/aidl/le_audio_software_aidl.cc +0 −4 Original line number Diff line number Diff line Loading @@ -643,10 +643,6 @@ AudioConfiguration offload_config_to_hal_audio_config( return AudioConfiguration(ucast_config); } int GetAidlInterfaceVersion() { return BluetoothAudioSinkClientInterface::GetAidlInterfaceVersion(); } } // namespace le_audio } // namespace aidl } // namespace audio Loading system/audio_hal_interface/aidl/le_audio_software_aidl.h +0 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ bool is_source_hal_enabled(); bool is_sink_hal_enabled(); std::vector<AudioSetConfiguration> get_offload_capabilities(); int GetAidlInterfaceVersion(); class LeAudioTransport { public: Loading system/audio_hal_interface/hal_version_manager.cc +38 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <memory> #include "aidl/audio_aidl_interfaces.h" #include "osi/include/log.h" namespace bluetooth { namespace audio { Loading @@ -45,6 +46,8 @@ BluetoothAudioHalVersion HalVersionManager::GetHalVersion() { BluetoothAudioHalTransport HalVersionManager::GetHalTransport() { switch (GetHalVersion()) { case BluetoothAudioHalVersion::VERSION_AIDL_V1: case BluetoothAudioHalVersion::VERSION_AIDL_V2: case BluetoothAudioHalVersion::VERSION_AIDL_V3: return BluetoothAudioHalTransport::AIDL; case BluetoothAudioHalVersion::VERSION_2_0: case BluetoothAudioHalVersion::VERSION_2_1: Loading Loading @@ -90,10 +93,44 @@ HalVersionManager::GetProvidersFactory_2_0() { return providers_factory; } BluetoothAudioHalVersion GetAidlInterfaceVersion() { int aidl_version = 0; auto provider_factory = IBluetoothAudioProviderFactory::fromBinder( ::ndk::SpAIBinder(AServiceManager_waitForService( kDefaultAudioProviderFactoryInterface.c_str()))); if (provider_factory == nullptr) { LOG_ERROR("Can't get aidl version from unknown factory"); return BluetoothAudioHalVersion::VERSION_UNAVAILABLE; } auto aidl_retval = provider_factory->getInterfaceVersion(&aidl_version); if (!aidl_retval.isOk()) { LOG_ERROR("BluetoothAudioHal::getInterfaceVersion failure: %s", aidl_retval.getDescription().c_str()); return BluetoothAudioHalVersion::VERSION_UNAVAILABLE; } switch (aidl_version) { case 1: return BluetoothAudioHalVersion::VERSION_AIDL_V1; case 2: return BluetoothAudioHalVersion::VERSION_AIDL_V2; case 3: return BluetoothAudioHalVersion::VERSION_AIDL_V3; default: LOG_ERROR("Unknown AIDL version %d", aidl_version); return BluetoothAudioHalVersion::VERSION_UNAVAILABLE; } return BluetoothAudioHalVersion::VERSION_UNAVAILABLE; } HalVersionManager::HalVersionManager() { if (AServiceManager_checkService( kDefaultAudioProviderFactoryInterface.c_str()) != nullptr) { hal_version_ = BluetoothAudioHalVersion::VERSION_AIDL_V1; hal_version_ = GetAidlInterfaceVersion(); return; } Loading Loading
system/audio_hal_interface/aidl/client_interface_aidl.cc +0 −25 Original line number Diff line number Diff line Loading @@ -258,31 +258,6 @@ bool BluetoothAudioClientInterface::SetLowLatencyModeAllowed(bool allowed) { return true; } int BluetoothAudioClientInterface::GetAidlInterfaceVersion() { int aidl_version = -1; if (!is_aidl_available()) { return aidl_version; } auto provider_factory = IBluetoothAudioProviderFactory::fromBinder( ::ndk::SpAIBinder(AServiceManager_waitForService( kDefaultAudioProviderFactoryInterface.c_str()))); if (provider_factory == nullptr) { LOG(ERROR) << __func__ << ", can't get aidl version from unknown factory"; return aidl_version; } auto aidl_retval = provider_factory->getInterfaceVersion(&aidl_version); if (!aidl_retval.isOk()) { LOG(FATAL) << __func__ << ": BluetoothAudioHal::getInterfaceVersion failure: " << aidl_retval.getDescription(); } return aidl_version; } int BluetoothAudioClientInterface::StartSession() { std::lock_guard<std::mutex> guard(internal_mutex_); if (provider_ == nullptr) { Loading
system/audio_hal_interface/aidl/client_interface_aidl.h +0 −2 Original line number Diff line number Diff line Loading @@ -93,8 +93,6 @@ class BluetoothAudioClientInterface { static bool is_aidl_available(); static int GetAidlInterfaceVersion(); protected: mutable std::mutex internal_mutex_; /*** Loading
system/audio_hal_interface/aidl/le_audio_software_aidl.cc +0 −4 Original line number Diff line number Diff line Loading @@ -643,10 +643,6 @@ AudioConfiguration offload_config_to_hal_audio_config( return AudioConfiguration(ucast_config); } int GetAidlInterfaceVersion() { return BluetoothAudioSinkClientInterface::GetAidlInterfaceVersion(); } } // namespace le_audio } // namespace aidl } // namespace audio Loading
system/audio_hal_interface/aidl/le_audio_software_aidl.h +0 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ bool is_source_hal_enabled(); bool is_sink_hal_enabled(); std::vector<AudioSetConfiguration> get_offload_capabilities(); int GetAidlInterfaceVersion(); class LeAudioTransport { public: Loading
system/audio_hal_interface/hal_version_manager.cc +38 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <memory> #include "aidl/audio_aidl_interfaces.h" #include "osi/include/log.h" namespace bluetooth { namespace audio { Loading @@ -45,6 +46,8 @@ BluetoothAudioHalVersion HalVersionManager::GetHalVersion() { BluetoothAudioHalTransport HalVersionManager::GetHalTransport() { switch (GetHalVersion()) { case BluetoothAudioHalVersion::VERSION_AIDL_V1: case BluetoothAudioHalVersion::VERSION_AIDL_V2: case BluetoothAudioHalVersion::VERSION_AIDL_V3: return BluetoothAudioHalTransport::AIDL; case BluetoothAudioHalVersion::VERSION_2_0: case BluetoothAudioHalVersion::VERSION_2_1: Loading Loading @@ -90,10 +93,44 @@ HalVersionManager::GetProvidersFactory_2_0() { return providers_factory; } BluetoothAudioHalVersion GetAidlInterfaceVersion() { int aidl_version = 0; auto provider_factory = IBluetoothAudioProviderFactory::fromBinder( ::ndk::SpAIBinder(AServiceManager_waitForService( kDefaultAudioProviderFactoryInterface.c_str()))); if (provider_factory == nullptr) { LOG_ERROR("Can't get aidl version from unknown factory"); return BluetoothAudioHalVersion::VERSION_UNAVAILABLE; } auto aidl_retval = provider_factory->getInterfaceVersion(&aidl_version); if (!aidl_retval.isOk()) { LOG_ERROR("BluetoothAudioHal::getInterfaceVersion failure: %s", aidl_retval.getDescription().c_str()); return BluetoothAudioHalVersion::VERSION_UNAVAILABLE; } switch (aidl_version) { case 1: return BluetoothAudioHalVersion::VERSION_AIDL_V1; case 2: return BluetoothAudioHalVersion::VERSION_AIDL_V2; case 3: return BluetoothAudioHalVersion::VERSION_AIDL_V3; default: LOG_ERROR("Unknown AIDL version %d", aidl_version); return BluetoothAudioHalVersion::VERSION_UNAVAILABLE; } return BluetoothAudioHalVersion::VERSION_UNAVAILABLE; } HalVersionManager::HalVersionManager() { if (AServiceManager_checkService( kDefaultAudioProviderFactoryInterface.c_str()) != nullptr) { hal_version_ = BluetoothAudioHalVersion::VERSION_AIDL_V1; hal_version_ = GetAidlInterfaceVersion(); return; } Loading