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

Commit 377e43e7 authored by Jeremy Wu's avatar Jeremy Wu Committed by Gerrit Code Review
Browse files

Merge "Floss: clean SWB debug log" into main

parents ee79690a e80a1006
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -880,7 +880,6 @@ struct tBTM_LC3_INFO {

  const uint8_t* find_lc3_pkt_head() {
    if (read_corrupted) {
      LOG_DEBUG("Skip corrupted LC3 packets");
      read_corrupted = false;
      return nullptr;
    }
@@ -987,8 +986,6 @@ bool enqueue_packet(const std::vector<uint8_t>& data, bool corrupted) {

  lc3_info->read_corrupted |= corrupted;
  if (lc3_info->write(data) != data.size()) {
    LOG_DEBUG("Fail to write packet with size %lu to buffer",
              (unsigned long)data.size());
    return false;
  }

@@ -1009,16 +1006,10 @@ size_t decode(const uint8_t** out_data) {
  }

  if (lc3_info->decodable() < BTM_LC3_PKT_LEN) {
    LOG_DEBUG("No complete LC3 packet to decode");
    return 0;
  }

  frame_head = lc3_info->find_lc3_pkt_head();
  if (frame_head == nullptr) {
    LOG_DEBUG("No valid LC3 packet to decode %lu, %lu",
              (unsigned long)lc3_info->decode_buf_ro,
              (unsigned long)lc3_info->decode_buf_wo);
  }

  bool plc_conducted = !GetInterfaceToProfiles()->lc3Codec->decodePacket(
      frame_head, lc3_info->decoded_pcm_buf, sizeof(lc3_info->decoded_pcm_buf));
@@ -1047,16 +1038,11 @@ size_t encode(int16_t* data, size_t len) {
  }

  if (len < BTM_LC3_CODE_SIZE) {
    LOG_DEBUG(
        "PCM frames with size %lu is insufficient to be encoded into a LC3 "
        "packet",
        (unsigned long)len);
    return 0;
  }

  pkt_body = lc3_info->fill_lc3_pkt_template();
  if (pkt_body == nullptr) {
    LOG_DEBUG("Failed to fill the template to fill the LC3 packet");
    return 0;
  }

+0 −5
Original line number Diff line number Diff line
@@ -74,10 +74,5 @@ bool hfp_lc3_decoder_decode_packet(const uint8_t* i_buf, int16_t* o_buf,

  ASSERT(rc == 0 || rc == 1);

  if (rc == 1) {
    LOG_WARN("%s: PLC conducted", __func__);
    /* TODO(b/269970706): change this to debug log */
  }

  return !rc;
}
+0 −4
Original line number Diff line number Diff line
@@ -98,10 +98,6 @@ bool hfp_lc3_decoder_decode_packet(const uint8_t* i_buf, int16_t* o_buf,

  bool plc_conducted = o_packet[0];

  if (plc_conducted == 1) {
    LOG_DEBUG("%s: PLC conducted", __func__);
  }

  std::copy(o_packet + 1, o_packet + 1 + out_len, (uint8_t*)o_buf);

  delete[] o_packet;