mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-01-28 13:48:48 +00:00
Template and schema of HFP provider info
Bug: 322280104 Test: make Change-Id: Iac4f96db08b3b7fb2c5f0b080ba3e972e6020982
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <aidl/android/hardware/bluetooth/audio/SbcChannelMode.h>
|
||||
#include <android-base/logging.h>
|
||||
|
||||
#include "BluetoothHfpCodecsProvider.h"
|
||||
#include "BluetoothLeAudioAseConfigurationSettingProvider.h"
|
||||
#include "BluetoothLeAudioCodecsProvider.h"
|
||||
|
||||
@@ -100,6 +101,7 @@ const std::vector<CodecCapabilities> kDefaultOffloadA2dpCodecCapabilities = {
|
||||
std::vector<LeAudioCodecCapabilitiesSetting> kDefaultOffloadLeAudioCapabilities;
|
||||
std::unordered_map<SessionType, std::vector<CodecInfo>>
|
||||
kDefaultOffloadLeAudioCodecInfoMap;
|
||||
std::vector<CodecInfo> kDefaultOffloadHfpCodecInfo;
|
||||
|
||||
template <class T>
|
||||
bool BluetoothAudioCodecs::ContainedInVector(
|
||||
@@ -439,6 +441,17 @@ std::vector<CodecInfo> BluetoothAudioCodecs::GetLeAudioOffloadCodecInfo(
|
||||
return codec_info_map_iter->second;
|
||||
}
|
||||
|
||||
std::vector<CodecInfo> BluetoothAudioCodecs::GetHfpOffloadCodecInfo() {
|
||||
if (kDefaultOffloadHfpCodecInfo.empty()) {
|
||||
auto hfp_offload_setting =
|
||||
BluetoothHfpCodecsProvider::ParseFromHfpOffloadSettingFile();
|
||||
// Load file into list
|
||||
kDefaultOffloadHfpCodecInfo =
|
||||
BluetoothHfpCodecsProvider::GetHfpAudioCodecInfo(hfp_offload_setting);
|
||||
}
|
||||
return kDefaultOffloadHfpCodecInfo;
|
||||
}
|
||||
|
||||
std::vector<LeAudioAseConfigurationSetting>
|
||||
BluetoothAudioCodecs::GetLeAudioAseConfigurationSettings() {
|
||||
return AudioSetConfigurationProviderJson::
|
||||
|
||||
Reference in New Issue
Block a user