Update HAL structure to include offload capability for broadcast
Bug: 205806028
Bug: 150670922
Test: make build
Change-Id: Ife4a3585474999855ffb04f3946462a137fdc181
diff --git a/bluetooth/audio/2.2/default/BluetoothAudioProvidersFactory.cpp b/bluetooth/audio/2.2/default/BluetoothAudioProvidersFactory.cpp
index 2fe31d5..9dfc828 100644
--- a/bluetooth/audio/2.2/default/BluetoothAudioProvidersFactory.cpp
+++ b/bluetooth/audio/2.2/default/BluetoothAudioProvidersFactory.cpp
@@ -239,7 +239,7 @@
LE_AUDIO_HARDWARE_OFFLOAD_ENCODING_DATAPATH ||
sessionType == V2_1::SessionType::
LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH) {
- std::vector<LeAudioCodecCapabilitiesPair> db_codec_capabilities =
+ std::vector<LeAudioCodecCapabilitiesSetting> db_codec_capabilities =
android::bluetooth::audio::GetLeAudioOffloadCodecCapabilities(
sessionType);
if (db_codec_capabilities.size()) {
diff --git a/bluetooth/audio/2.2/types.hal b/bluetooth/audio/2.2/types.hal
index 8ec3660..6755899 100644
--- a/bluetooth/audio/2.2/types.hal
+++ b/bluetooth/audio/2.2/types.hal
@@ -83,23 +83,22 @@
safe_union AudioCapabilities {
PcmParameters pcmCapabilities;
CodecCapabilities codecCapabilities;
- LeAudioCodecCapabilitiesPair leAudioCapabilities;
+ LeAudioCodecCapabilitiesSetting leAudioCapabilities;
};
/**
- * Used to specify th le audio capabilities pair of the Hardware offload encode and decode.
+ * Used to specify the le audio capabilities for unicast and broadcast hardware offload.
*/
-struct LeAudioCodecCapabilitiesPair{
- LeAudioMode mode;
- LeAudioCodecCapability encodeCapability;
- LeAudioCodecCapability decodeCapability;
+struct LeAudioCodecCapabilitiesSetting{
+ UnicastCapability unicastEncodeCapability;
+ UnicastCapability unicastDecodeCapability;
+ BroadcastCapability broadcastCapability;
};
/**
- * Used to specify the le audio capabilities of the codecs supported by Hardware offload
- * for encode or decode.
+ * Used to specify the le audio unicast codec capabilities for hardware offload.
*/
-struct LeAudioCodecCapability {
+struct UnicastCapability {
CodecType codecType;
AudioLocation supportedChannel;
@@ -112,3 +111,17 @@
// Should use safe union when there is more than one codec
Lc3Parameters capabilities;
};
+
+/**
+ * Used to specify the le audio broadcast codec capabilities for hardware offload.
+ */
+struct BroadcastCapability {
+ CodecType codecType;
+ AudioLocation supportedChannel;
+
+ // Supported channel count for each stream
+ uint8_t channelCountPerStream;
+
+ // Should use safe union when there is more than one codec
+ vec<Lc3Parameters> capabilities;
+};