Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f1a6668 authored by Jack He's avatar Jack He Committed by Gerrit Code Review
Browse files

Merge "LeAudio: Ase configuration data refactor - part 2" into main

parents 07395ffb b43465af
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <bluetooth/log.h>

#include <atomic>
#include <bitset>
#include <unordered_map>
#include <vector>

@@ -767,14 +768,17 @@ bluetooth::audio::le_audio::OffloadCapabilities get_offload_capabilities() {
      str_capability_log += " Decode Capability: " + hal_decode_cap.toString();
    }

    audio_set_config.topology_info = {
        {{static_cast<uint8_t>(hal_decode_cap.deviceCount),
          static_cast<uint8_t>(hal_encode_cap.deviceCount)}}};

    if (hal_bcast_capability_to_stack_format(hal_bcast_cap, bcast_cap)) {
      // Set device_cnt, ase_cnt to zero to ignore these fields for broadcast
      audio_set_config.topology_info = {{{0, 0}}};
      AudioSetConfiguration audio_set_config = {
          .name = "broadcast offload capability"};
      // Note: The offloader config supports multiple channels per stream
      //       (subgroup), corresponding to the number of BISes, where each BIS
      //       has a single channel.
      bcast_cap.channel_count_per_iso_stream = 1;
      auto bis_cnt = hal_bcast_cap.channelCountPerStream;
      while (bis_cnt--) {
        audio_set_config.confs.sink.push_back(AseConfiguration(bcast_cap));
      }
      broadcast_offload_capabilities.push_back(audio_set_config);
      str_capability_log +=
          " Broadcast Capability: " + hal_bcast_cap.toString();
+1 −2
Original line number Diff line number Diff line
@@ -56,10 +56,9 @@ enum AudioSetConfigurationTargetLatency : byte {
    HIGH_RELIABILITY = 0x03,
}
table AudioSetSubConfiguration {
    device_cnt: ubyte;
    ase_channel_cnt: ubyte;
    ase_cnt: ubyte;
    direction: AudioSetConfigurationDirection = SINK;
    configuration_strategy: AudioSetConfigurationStrategy;
    codec_id : CodecId (required);
    codec_configuration: [CodecSpecificConfiguration] (required);
}
+1554 −4216

File changed.

Preview size limit exceeded, changes collapsed.

+213 −250

File changed.

Preview size limit exceeded, changes collapsed.

+22 −27
Original line number Diff line number Diff line
@@ -3134,10 +3134,6 @@ class LeAudioClientImpl : public LeAudioClient {
      return;
    }

    auto num_of_devices =
        get_num_of_devices_in_configuration(stream_conf->conf.get());

    if (num_of_devices < group->NumOfConnected()) {
    for (auto direction :
         {bluetooth::le_audio::types::kLeAudioDirectionSink,
          bluetooth::le_audio::types::kLeAudioDirectionSource}) {
@@ -3150,8 +3146,8 @@ class LeAudioClientImpl : public LeAudioClient {
      for (const auto& ent : stream_conf->conf->confs.get(direction)) {
        if (!bluetooth::le_audio::utils::GetConfigurationSupportedPac(
                pacs, ent.codec)) {
            log::info("Configuration is not supported by device %s",
                      ADDRESS_TO_LOGGABLE_CSTR(leAudioDevice->address_));
          log::info("Configuration is not supported by device {}",
                    leAudioDevice->address_);

          /* Reconfigure if newly connected member device cannot support
           * current codec configuration */
@@ -3163,7 +3159,6 @@ class LeAudioClientImpl : public LeAudioClient {
        }
      }
    }
    }

    /* Do not put the TBS CCID when not using Telecom for the VoIP calls. */
    auto ccid_contexts = group->GetMetadataContexts();
Loading