Loading system/audio_hal_interface/aidl/hfp_client_interface_aidl.cc +8 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #include "btm_api_types.h" #include "hardware/bluetooth.h" #include "hardware/bluetooth_headset_interface.h" #include "provider_info.h" #include "types/raw_address.h" namespace bluetooth { Loading Loading @@ -61,6 +62,13 @@ tBTA_AG_SCB* get_hfp_active_device_callback() { return cb; } std::unordered_map<int, ::hfp::sco_config> HfpTransport::GetHfpScoConfig( SessionType sessionType) { auto providerInfo = ::bluetooth::audio::aidl::ProviderInfo::GetProviderInfo(sessionType); return providerInfo->GetHfpScoConfig(); } HfpTransport::HfpTransport() { hfp_pending_cmd_ = HFP_CTRL_CMD_NONE; } BluetoothAudioCtrlAck HfpTransport::StartRequest() { Loading system/audio_hal_interface/aidl/hfp_client_interface_aidl.h +5 −0 Original line number Diff line number Diff line Loading @@ -17,7 +17,9 @@ #pragma once #include <cstdint> #include <unordered_map> #include "bta/ag/bta_ag_int.h" #include "client_interface_aidl.h" namespace bluetooth { Loading Loading @@ -68,6 +70,9 @@ class HfpTransport { void LogBytesProcessed(size_t bytes_read); static std::unordered_map<int, ::hfp::sco_config> GetHfpScoConfig( SessionType sessionType); private: tHFP_CTRL_CMD hfp_pending_cmd_; }; Loading system/audio_hal_interface/hfp_client_interface.cc +6 −0 Original line number Diff line number Diff line Loading @@ -506,6 +506,12 @@ void HfpClientInterface::Offload::CancelStreamingRequest() { } } std::unordered_map<int, ::hfp::sco_config> HfpClientInterface::Offload::GetHfpScoConfig() { return aidl::hfp::HfpTransport::GetHfpScoConfig( aidl::SessionType::HFP_HARDWARE_OFFLOAD_DATAPATH); } HfpClientInterface::Offload* HfpClientInterface::GetOffload( bluetooth::common::MessageLoopThread* /*message_loop*/) { if (!is_aidl_support_hfp()) { Loading system/audio_hal_interface/hfp_client_interface.h +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ class HfpClientInterface { void UpdateAudioConfigToHal(const ::hfp::offload_config& config) override; void ConfirmStreamingRequest() override; void CancelStreamingRequest() override; std::unordered_map<int, ::hfp::sco_config> GetHfpScoConfig(); }; // Get HFP software decoding client interface if it's not previously acquired Loading system/audio_hal_interface/hfp_client_interface_host.cc +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ bool HfpClientInterface::ReleaseOffload(HfpClientInterface::Offload* offload) { HfpClientInterface* HfpClientInterface::Get() { return nullptr; } std::unordered_map<int, ::hfp::sco_config> HfpClientInterface::Offload::GetHfpScoConfig() { return std::unordered_map<int, ::hfp::sco_config>(); } } // namespace hfp } // namespace audio } // namespace bluetooth Loading
system/audio_hal_interface/aidl/hfp_client_interface_aidl.cc +8 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ #include "btm_api_types.h" #include "hardware/bluetooth.h" #include "hardware/bluetooth_headset_interface.h" #include "provider_info.h" #include "types/raw_address.h" namespace bluetooth { Loading Loading @@ -61,6 +62,13 @@ tBTA_AG_SCB* get_hfp_active_device_callback() { return cb; } std::unordered_map<int, ::hfp::sco_config> HfpTransport::GetHfpScoConfig( SessionType sessionType) { auto providerInfo = ::bluetooth::audio::aidl::ProviderInfo::GetProviderInfo(sessionType); return providerInfo->GetHfpScoConfig(); } HfpTransport::HfpTransport() { hfp_pending_cmd_ = HFP_CTRL_CMD_NONE; } BluetoothAudioCtrlAck HfpTransport::StartRequest() { Loading
system/audio_hal_interface/aidl/hfp_client_interface_aidl.h +5 −0 Original line number Diff line number Diff line Loading @@ -17,7 +17,9 @@ #pragma once #include <cstdint> #include <unordered_map> #include "bta/ag/bta_ag_int.h" #include "client_interface_aidl.h" namespace bluetooth { Loading Loading @@ -68,6 +70,9 @@ class HfpTransport { void LogBytesProcessed(size_t bytes_read); static std::unordered_map<int, ::hfp::sco_config> GetHfpScoConfig( SessionType sessionType); private: tHFP_CTRL_CMD hfp_pending_cmd_; }; Loading
system/audio_hal_interface/hfp_client_interface.cc +6 −0 Original line number Diff line number Diff line Loading @@ -506,6 +506,12 @@ void HfpClientInterface::Offload::CancelStreamingRequest() { } } std::unordered_map<int, ::hfp::sco_config> HfpClientInterface::Offload::GetHfpScoConfig() { return aidl::hfp::HfpTransport::GetHfpScoConfig( aidl::SessionType::HFP_HARDWARE_OFFLOAD_DATAPATH); } HfpClientInterface::Offload* HfpClientInterface::GetOffload( bluetooth::common::MessageLoopThread* /*message_loop*/) { if (!is_aidl_support_hfp()) { Loading
system/audio_hal_interface/hfp_client_interface.h +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ class HfpClientInterface { void UpdateAudioConfigToHal(const ::hfp::offload_config& config) override; void ConfirmStreamingRequest() override; void CancelStreamingRequest() override; std::unordered_map<int, ::hfp::sco_config> GetHfpScoConfig(); }; // Get HFP software decoding client interface if it's not previously acquired Loading
system/audio_hal_interface/hfp_client_interface_host.cc +5 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,11 @@ bool HfpClientInterface::ReleaseOffload(HfpClientInterface::Offload* offload) { HfpClientInterface* HfpClientInterface::Get() { return nullptr; } std::unordered_map<int, ::hfp::sco_config> HfpClientInterface::Offload::GetHfpScoConfig() { return std::unordered_map<int, ::hfp::sco_config>(); } } // namespace hfp } // namespace audio } // namespace bluetooth