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

Commit 29b62b57 authored by Henri Chataing's avatar Henri Chataing Committed by Automerger Merge Worker
Browse files

Merge changes Ia6632bc2,I58ea52b6,I134695be into main am: dd94bd05

parents 7ae3a785 dd94bd05
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <base/logging.h>
#include <base/strings/stringprintf.h>
#include <bluetooth/log.h>

#include <algorithm>
#include <cmath>
@@ -439,11 +440,11 @@ SourceAudioHalAsrc::SourceAudioHalAsrc(int channels, int sample_rate,
      !check_bounds(interval_us, 1 * 1000, 100 * 1000) ||
      !check_bounds(num_burst_buffers, 0, 10) ||
      !check_bounds(burst_delay_ms, 0, 1000)) {
    LOG(ERROR) << "Bad parameters:"
               << " channels: " << channels << " sample_rate: " << sample_rate
               << " bit_depth: " << bit_depth << " interval_us: " << interval_us
               << " num_burst_buffers: " << num_burst_buffers
               << " burst_delay_ms: " << burst_delay_ms << std::endl;
    log::error(
        "Bad parameters: channels: {} sample_rate: {} bit_depth: {} "
        "interval_us: {} num_burst_buffers: {} burst_delay_ms: {}",
        channels, sample_rate, bit_depth, interval_us, num_burst_buffers,
        burst_delay_ms);

    return;
  }
@@ -561,8 +562,8 @@ SourceAudioHalAsrc::Run(const std::vector<uint8_t>& in) {
  std::vector<const std::vector<uint8_t>*> out;

  if (in.size() != buffers_size_) {
    LOG(ERROR) << "Inconsistent input buffer size: " << in.size() << " ("
               << buffers_size_ << " expected)" << std::endl;
    log::error("Inconsistent input buffer size: {} ({} expected)", in.size(),
               buffers_size_);
    return out;
  }

@@ -611,11 +612,9 @@ SourceAudioHalAsrc::Run(const std::vector<uint8_t>& in) {
                                     int(output_us - local_us));

  if (0)
    LOG(INFO) << base::StringPrintf(
                     "[%6u.%06u]  Fs: %.2f Hz  drift: %d us",
    log::info("[{:6}.{:06}]  Fs: {:.2f} Hz  drift: {} us",
              output_us / (1000 * 1000), output_us % (1000 * 1000),
                     ratio * sample_rate_, int(output_us - local_us))
              << std::endl;
              ratio * sample_rate_, int(output_us - local_us));

  return out;
}
+2 −2
Original line number Diff line number Diff line
@@ -2306,7 +2306,7 @@ static bool bta_hh_le_iso_data_callback(const RawAddress& addr,
                                        uint16_t cis_conn_hdl, uint8_t* data,
                                        uint16_t size, uint32_t timestamp) {
  if (!IS_FLAG_ENABLED(leaudio_dynamic_spatial_audio)) {
    LOG_WARN("DSA not supported");
    log::warn("DSA not supported");
    return false;
  }

@@ -2316,7 +2316,7 @@ static bool bta_hh_le_iso_data_callback(const RawAddress& addr,

  tBTA_HH_DEV_CB* p_dev_cb = bta_hh_le_find_dev_cb_by_bda(link_spec);
  if (p_dev_cb == nullptr) {
    LOG_WARN("Device not connected: %s", ADDRESS_TO_LOGGABLE_CSTR(link_spec));
    log::warn("Device not connected: {}", ADDRESS_TO_LOGGABLE_CSTR(link_spec));
    return false;
  }

+1 −1
Original line number Diff line number Diff line
@@ -443,7 +443,7 @@ class RasServerImpl : public bluetooth::ras::RasServer {
        SendResponseCode(ResponseCodeValue::OP_CODE_NOT_SUPPORTED, tracker);
      } break;
      default:
        LOG_WARN("Unknown opcode:0x%02x", (uint16_t)command.opcode_);
        log::warn("Unknown opcode:0x{:02x}", (uint16_t)command.opcode_);
        SendResponseCode(ResponseCodeValue::OP_CODE_NOT_SUPPORTED, tracker);
    }
  }
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ bool ParseControlPointCommand(ControlPointCommand* command,
                              const uint8_t* value, uint16_t len) {
  // Check for minimum expected length
  if (len != kControlPointCommandSize) {
    LOG_WARN("Invalid len %d", len);
    log::warn("Invalid len {}", len);
    return false;
  }
  command->opcode_ = static_cast<Opcode>(value[0]);
+3 −3
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ bt_status_t btif_storage_add_hid_device_info(
  }

  if (link_spec.transport == BT_TRANSPORT_AUTO) {
    LOG_ERROR("Unexpected transport!");
    log::error("Unexpected transport!");
    return BT_STATUS_FAIL;
  }
  btif_config_set_int(bdstr, BTIF_STORAGE_KEY_HID_DB_VERSION,
@@ -1233,7 +1233,7 @@ bt_status_t btif_storage_set_hid_connection_policy(
    btif_config_set_int(bdstr, BTIF_STORAGE_KEY_HID_RECONNECT_ALLOWED,
                        reconnect_allowed);
  } else {
    LOG_ERROR("Unexpected!");
    log::error("Unexpected!");
  }

  return BT_STATUS_SUCCESS;
@@ -1258,7 +1258,7 @@ bt_status_t btif_storage_get_hid_connection_policy(
  } else if (link_spec.transport == BT_TRANSPORT_BR_EDR) {
    btif_config_get_int(bdstr, BTIF_STORAGE_KEY_HID_RECONNECT_ALLOWED, &value);
  } else {
    LOG_ERROR("Un expected!");
    log::error("Un expected!");
  }
  *reconnect_allowed = value ? true : false;

Loading