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

Commit 2ab62cdd authored by En-Shuo Hsu's avatar En-Shuo Hsu Committed by Gerrit Code Review
Browse files

Merge "Log the write and read offset" into main

parents 2a588c3f b7f7369c
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -568,6 +568,8 @@ struct tBTM_MSBC_INFO {


  const uint8_t* sco_pkt_read_ptr() {
  const uint8_t* sco_pkt_read_ptr() {
    if (encode_buf_wo - encode_buf_ro < packet_size) {
    if (encode_buf_wo - encode_buf_ro < packet_size) {
      LOG_DEBUG("Insufficient data to dequeue. buf_wo:%zu, buf_ro:%zu",
                encode_buf_wo, encode_buf_ro);
      return nullptr;
      return nullptr;
    }
    }


@@ -726,7 +728,6 @@ size_t dequeue_packet(const uint8_t** output) {


  *output = msbc_info->sco_pkt_read_ptr();
  *output = msbc_info->sco_pkt_read_ptr();
  if (*output == nullptr) {
  if (*output == nullptr) {
    LOG_DEBUG("Insufficient data to dequeue.");
    return 0;
    return 0;
  }
  }


@@ -918,6 +919,8 @@ struct tBTM_LC3_INFO {


  const uint8_t* sco_pkt_read_ptr() {
  const uint8_t* sco_pkt_read_ptr() {
    if (encode_buf_wo - encode_buf_ro < packet_size) {
    if (encode_buf_wo - encode_buf_ro < packet_size) {
      LOG_DEBUG("Insufficient data to dequeue. buf_wo:%zu, buf_ro:%zu",
                encode_buf_wo, encode_buf_ro);
      return nullptr;
      return nullptr;
    }
    }


@@ -1062,7 +1065,6 @@ size_t dequeue_packet(const uint8_t** output) {


  *output = lc3_info->sco_pkt_read_ptr();
  *output = lc3_info->sco_pkt_read_ptr();
  if (*output == nullptr) {
  if (*output == nullptr) {
    LOG_DEBUG("Insufficient data to dequeue.");
    return 0;
    return 0;
  }
  }