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

Commit d6ae725c authored by Henri Chataing's avatar Henri Chataing
Browse files

Remove the support for the legacy A2DP HAL

system/btif/src/btif_a2dp_control.cc implements support for
the legacy HAL which uses UIPC to exchange commands with the
audio_a2dp_hw service (see audio.a2dp.default)

Bug: 349688122
Test: m com.android.btservices
Flag: EXEMPT, dead code removal
Change-Id: I3e0d891bf2b526601d1cbd83574edd0cd9747900
parent dbe6aeec
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -647,6 +647,10 @@ void end_session() {
}

void ack_stream_started(const tA2DP_CTRL_ACK& ack) {
  if (!is_hal_enabled()) {
    log::error("BluetoothAudio HAL is not enabled");
    return;
  }
  auto ctrl_ack = a2dp_ack_to_bt_audio_ctrl_ack(ack);
  log::info("result={}", ctrl_ack);
  auto a2dp_sink =
@@ -664,6 +668,10 @@ void ack_stream_started(const tA2DP_CTRL_ACK& ack) {
}

void ack_stream_suspended(const tA2DP_CTRL_ACK& ack) {
  if (!is_hal_enabled()) {
    log::error("BluetoothAudio HAL is not enabled");
    return;
  }
  auto ctrl_ack = a2dp_ack_to_bt_audio_ctrl_ack(ack);
  log::info("result={}", ctrl_ack);
  auto a2dp_sink =
@@ -687,7 +695,8 @@ size_t read(uint8_t* p_buf, uint32_t len) {
  if (!is_hal_enabled()) {
    log::error("BluetoothAudio HAL is not enabled");
    return 0;
  } else if (is_hal_offloading()) {
  }
  if (is_hal_offloading()) {
    log::error(
        "session_type={} is not A2DP_SOFTWARE_ENCODING_DATAPATH",
        toString(
+10 −1
Original line number Diff line number Diff line
@@ -495,6 +495,10 @@ void end_session() {
}

void ack_stream_started(const tA2DP_CTRL_ACK& ack) {
  if (!is_hal_2_0_enabled()) {
    log::error("BluetoothAudio HAL is not enabled");
    return;
  }
  auto ctrl_ack = a2dp_ack_to_bt_audio_ctrl_ack(ack);
  log::info("result={}", ctrl_ack);
  auto a2dp_sink =
@@ -512,6 +516,10 @@ void ack_stream_started(const tA2DP_CTRL_ACK& ack) {
}

void ack_stream_suspended(const tA2DP_CTRL_ACK& ack) {
  if (!is_hal_2_0_enabled()) {
    log::error("BluetoothAudio HAL is not enabled");
    return;
  }
  auto ctrl_ack = a2dp_ack_to_bt_audio_ctrl_ack(ack);
  log::info("result={}", ctrl_ack);
  auto a2dp_sink =
@@ -535,7 +543,8 @@ size_t read(uint8_t* p_buf, uint32_t len) {
  if (!is_hal_2_0_enabled()) {
    log::error("BluetoothAudio HAL is not enabled");
    return 0;
  } else if (is_hal_2_0_offloading()) {
  }
  if (is_hal_2_0_offloading()) {
    log::error(
        "session_type={} is not A2DP_SOFTWARE_ENCODING_DATAPATH",
        toString(
+0 −1
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ cc_library_static {
        "src/bluetooth.cc",
        // BTIF implementation
        "src/btif_a2dp.cc",
        "src/btif_a2dp_control.cc",
        "src/btif_a2dp_sink.cc",
        "src/btif_a2dp_source.cc",
        "src/btif_av.cc",
+0 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ static_library("btif") {
    # BTIF implementation
    "src/btif_a2dp.cc",

    "src/btif_a2dp_control.cc",
    "src/btif_a2dp_sink.cc",
    "src/btif_a2dp_source.cc",
    "src/btif_av.cc",
+0 −1
Original line number Diff line number Diff line
@@ -593,7 +593,6 @@ void BtaAvCo::ProcessOpen(tBTA_AV_HNDL bta_av_handle,
void BtaAvCo::ProcessClose(tBTA_AV_HNDL bta_av_handle,
                           const RawAddress& peer_address) {
  log::verbose("peer {} bta_av_handle: 0x{:x}", peer_address, bta_av_handle);
  btif_av_reset_audio_delay();

  // Find the peer
  BtaAvCoPeer* p_peer =
Loading