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

Commit 56366d77 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "Log presentation delay for the group" am: d044d3ec am: 98354a4c am: dde61ec4

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1934967

Change-Id: I3dceaa2a23baea7da2fdde588e3d8c67abae686d
parents 87d3c8cd dde61ec4
Loading
Loading
Loading
Loading
+20 −2
Original line number Original line Diff line number Diff line
@@ -1198,8 +1198,26 @@ void LeAudioDeviceGroup::Dump(int fd) {
         << "      number of sources in the configuration "
         << "      number of sources in the configuration "
         << stream_conf.source_num_of_devices << "\n"
         << stream_conf.source_num_of_devices << "\n"
         << "      number of source_streams connected: "
         << "      number of source_streams connected: "
         << stream_conf.source_streams.size() << "\n"
         << stream_conf.source_streams.size() << "\n";
         << "      === devices: ===\n";

  if (GetFirstActiveDevice() != nullptr) {
    uint32_t sink_delay;
    stream << "      presentation_delay for sink (speaker): ";
    if (GetPresentationDelay(&sink_delay, le_audio::types::kLeAudioDirectionSink)) {
      stream << sink_delay << " us";
    }
    stream << "\n      presentation_delay for source (microphone): ";
    uint32_t source_delay;
    if (GetPresentationDelay(&source_delay, le_audio::types::kLeAudioDirectionSource)) {
      stream << source_delay << " us";
    }
    stream << "\n";
  } else {
    stream << "      presentation_delay for sink (speaker):\n"
           << "      presentation_delay for source (microphone): \n";
  }

  stream << "      === devices: ===\n";


  dprintf(fd, "%s", stream.str().c_str());
  dprintf(fd, "%s", stream.str().c_str());