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

Commit 4e7414c1 authored by Łukasz Rymanowski (xWF)'s avatar Łukasz Rymanowski (xWF) Committed by Gerrit Code Review
Browse files

Merge "leaudio: Mechanical refactor" into main

parents c21d8cee d26759b8
Loading
Loading
Loading
Loading
+24 −19
Original line number Diff line number Diff line
@@ -4814,9 +4814,8 @@ public:
    return remote_metadata;
  }

  /* Return true if stream is started */
  bool ReconfigureOrUpdateRemote(LeAudioDeviceGroup* group, int remote_direction) {
    if (stack_config_get_interface()->get_pts_force_le_audio_multiple_contexts_metadata()) {
  bool ReconfigureOrUpdateRemoteForPTS(LeAudioDeviceGroup* group, int remote_direction) {
    log::info("{}", group->group_id_);
    // Use common audio stream contexts exposed by the PTS
    auto override_contexts = AudioContexts(0xFFFF);
    for (auto device = group->GetFirstDevice(); device != nullptr;
@@ -4838,6 +4837,12 @@ public:
    return GroupStream(active_group_id_, new_configuration_context, remote_contexts);
  }

  /* Return true if stream is started */
  bool ReconfigureOrUpdateRemote(LeAudioDeviceGroup* group, int remote_direction) {
    if (stack_config_get_interface()->get_pts_force_le_audio_multiple_contexts_metadata()) {
      return ReconfigureOrUpdateRemoteForPTS(group, remote_direction);
    }

    /* When the local sink and source update their metadata, we need to come up
     * with a coherent set of contexts for either one or both directions,
     * especially when bidirectional scenarios can be triggered be either sink