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

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

Merge changes I450634af,Ifa12df68,I354095d1,Ib88a5957,I754d1bc2, ... into main...

Merge changes I450634af,Ifa12df68,I354095d1,Ib88a5957,I754d1bc2, ... into main am: cc89dd93 am: c7dc02f4

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



Change-Id: Icbce83508664064dd9d97f9b7bda7c369475bb60
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a383a5b2 c7dc02f4
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,6 @@ cc_library_shared {
        "libbluetooth_audio_session",
        "libbluetooth_audio_session",
        "libhidlbase",
        "libhidlbase",
    ],
    ],
    cflags: ["-Wno-unused-parameter"],
    visibility: [
    visibility: [
        "//device/generic/goldfish/audio",
        "//device/generic/goldfish/audio",
    ],
    ],
+17 −11
Original line number Original line Diff line number Diff line
@@ -51,43 +51,49 @@ static int adev_set_parameters(struct audio_hw_device* dev, const char* kvpairs)
  return 0;
  return 0;
}
}


static char* adev_get_parameters(const struct audio_hw_device* dev, const char* keys) {
static char* adev_get_parameters(const struct audio_hw_device* /*dev*/, const char* keys) {
  LOG(VERBOSE) << __func__ << ": keys=[" << keys << "]";
  LOG(VERBOSE) << __func__ << ": keys=[" << keys << "]";
  return strdup("");
  return strdup("");
}
}


static int adev_init_check(const struct audio_hw_device* dev) { return 0; }
static int adev_init_check(const struct audio_hw_device* /*dev*/) { return 0; }


static int adev_set_voice_volume(struct audio_hw_device* dev, float volume) {
static int adev_set_voice_volume(struct audio_hw_device* /*dev*/, float volume) {
  LOG(VERBOSE) << __func__ << ": volume=" << volume;
  LOG(VERBOSE) << __func__ << ": volume=" << volume;
  return -ENOSYS;
  return -ENOSYS;
}
}


static int adev_set_master_volume(struct audio_hw_device* dev, float volume) {
static int adev_set_master_volume(struct audio_hw_device* /*dev*/, float volume) {
  LOG(VERBOSE) << __func__ << ": volume=" << volume;
  LOG(VERBOSE) << __func__ << ": volume=" << volume;
  return -ENOSYS;
  return -ENOSYS;
}
}


static int adev_get_master_volume(struct audio_hw_device* dev, float* volume) { return -ENOSYS; }
static int adev_get_master_volume(struct audio_hw_device* /*dev*/, float* /*volume*/) {
  return -ENOSYS;
}


static int adev_set_master_mute(struct audio_hw_device* dev, bool muted) {
static int adev_set_master_mute(struct audio_hw_device* /*dev*/, bool muted) {
  LOG(VERBOSE) << __func__ << ": mute=" << muted;
  LOG(VERBOSE) << __func__ << ": mute=" << muted;
  return -ENOSYS;
  return -ENOSYS;
}
}


static int adev_get_master_mute(struct audio_hw_device* dev, bool* muted) { return -ENOSYS; }
static int adev_get_master_mute(struct audio_hw_device* /*dev*/, bool* /*muted*/) {
  return -ENOSYS;
}


static int adev_set_mode(struct audio_hw_device* dev, audio_mode_t mode) {
static int adev_set_mode(struct audio_hw_device* /*dev*/, audio_mode_t mode) {
  LOG(VERBOSE) << __func__ << ": mode=" << mode;
  LOG(VERBOSE) << __func__ << ": mode=" << mode;
  return 0;
  return 0;
}
}


static int adev_set_mic_mute(struct audio_hw_device* dev, bool state) {
static int adev_set_mic_mute(struct audio_hw_device* /*dev*/, bool state) {
  LOG(VERBOSE) << __func__ << ": state=" << state;
  LOG(VERBOSE) << __func__ << ": state=" << state;
  return -ENOSYS;
  return -ENOSYS;
}
}


static int adev_get_mic_mute(const struct audio_hw_device* dev, bool* state) { return -ENOSYS; }
static int adev_get_mic_mute(const struct audio_hw_device* /*dev*/, bool* /*state*/) {
  return -ENOSYS;
}


static int adev_create_audio_patch(struct audio_hw_device* device, unsigned int num_sources,
static int adev_create_audio_patch(struct audio_hw_device* device, unsigned int num_sources,
                                   const struct audio_port_config* sources, unsigned int num_sinks,
                                   const struct audio_port_config* sources, unsigned int num_sinks,
@@ -145,7 +151,7 @@ static int adev_get_audio_port(struct audio_hw_device* device, struct audio_port
  return -ENOSYS;
  return -ENOSYS;
}
}


static int adev_dump(const audio_hw_device_t* device, int fd) { return 0; }
static int adev_dump(const audio_hw_device_t* /*device*/, int /*fd*/) { return 0; }


static int adev_close(hw_device_t* device) {
static int adev_close(hw_device_t* device) {
  auto* bluetooth_device = reinterpret_cast<BluetoothAudioDevice*>(device);
  auto* bluetooth_device = reinterpret_cast<BluetoothAudioDevice*>(device);
+1 −1
Original line number Original line Diff line number Diff line
@@ -140,7 +140,7 @@ bool BluetoothAudioPortAidl::SetUp(audio_devices_t devices) {


  state_ = BluetoothStreamState::STANDBY;
  state_ = BluetoothStreamState::STANDBY;


  auto control_result_cb = [port = this](uint16_t cookie, bool start_resp,
  auto control_result_cb = [port = this](uint16_t cookie, bool /*start_resp*/,
                                         const BluetoothAudioStatus& status) {
                                         const BluetoothAudioStatus& status) {
    if (!port->in_use()) {
    if (!port->in_use()) {
      LOG(ERROR) << "control_result_cb: BluetoothAudioPortAidl is not in use";
      LOG(ERROR) << "control_result_cb: BluetoothAudioPortAidl is not in use";
+4 −4
Original line number Original line Diff line number Diff line
@@ -101,16 +101,16 @@ public:
  /***
  /***
   * Set the current BluetoothStreamState
   * Set the current BluetoothStreamState
   ***/
   ***/
  virtual void SetState(BluetoothStreamState state) {}
  virtual void SetState(BluetoothStreamState /*state*/) {}


  virtual bool IsA2dp() const { return false; }
  virtual bool IsA2dp() const { return false; }


  virtual bool IsLeAudio() const { return false; }
  virtual bool IsLeAudio() const { return false; }


  virtual bool GetPreferredDataIntervalUs(size_t* interval_us) const { return false; }
  virtual bool GetPreferredDataIntervalUs(size_t* /*interval_us*/) const { return false; }


  virtual size_t WriteData(const void* buffer, size_t bytes) const { return 0; }
  virtual size_t WriteData(const void* /*buffer*/, size_t /*bytes*/) const { return 0; }
  virtual size_t ReadData(void* buffer, size_t bytes) const { return 0; }
  virtual size_t ReadData(void* /*buffer*/, size_t /*bytes*/) const { return 0; }
};
};


namespace aidl {
namespace aidl {
+1 −1
Original line number Original line Diff line number Diff line
@@ -137,7 +137,7 @@ bool BluetoothAudioPortHidl::SetUp(audio_devices_t devices) {


  state_ = BluetoothStreamState::STANDBY;
  state_ = BluetoothStreamState::STANDBY;


  auto control_result_cb = [port = this](uint16_t cookie, bool start_resp,
  auto control_result_cb = [port = this](uint16_t cookie, bool /*start_resp*/,
                                         const BluetoothAudioStatusHidl& status) {
                                         const BluetoothAudioStatusHidl& status) {
    if (!port->in_use()) {
    if (!port->in_use()) {
      LOG(ERROR) << "control_result_cb: BluetoothAudioPort is not in use";
      LOG(ERROR) << "control_result_cb: BluetoothAudioPort is not in use";
Loading