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

Commit d044d3ec authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "Log presentation delay for the group"

parents 111ff202 951b6849
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());