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

Commit 60001cf1 authored by Bill Yi's avatar Bill Yi
Browse files

Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release

Change-Id: I2a349df7ad02b6b57044fe77d92b329e1a5afda0
parents 6a98b0c5 a04c86d5
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -133,6 +133,15 @@ message RFCommSession {
  optional int32 tx_bytes = 2;
}

enum A2dpSourceCodec {
  A2DP_SOURCE_CODEC_UNKNOWN = 0;
  A2DP_SOURCE_CODEC_SBC = 1;
  A2DP_SOURCE_CODEC_AAC = 2;
  A2DP_SOURCE_CODEC_APTX = 3;
  A2DP_SOURCE_CODEC_APTX_HD = 4;
  A2DP_SOURCE_CODEC_LDAC = 5;
}

// Session information that gets logged for A2DP session.
message A2DPSession {
  // Media timer in milliseconds.
@@ -158,6 +167,12 @@ message A2DPSession {

  // Total audio time in this A2DP session
  optional int64 audio_duration_millis = 8;

  // Audio codec used in this A2DP session in A2DP source role
  optional A2dpSourceCodec source_codec = 9;

  // Whether A2DP offload is enabled in this A2DP session
  optional bool is_a2dp_offload = 10;
}

message PairEvent {
+6 −0
Original line number Diff line number Diff line
@@ -370,6 +370,12 @@ static void bta_ag_create_sco(tBTA_AG_SCB* p_scb, bool is_orig) {
  if (!bta_ag_sco_is_active_device(p_scb->peer_addr)) {
    LOG(WARNING) << __func__ << ": device " << p_scb->peer_addr
                 << " is not active, active_device=" << active_device_addr;
    if (bta_ag_cb.sco.p_curr_scb != nullptr &&
        bta_ag_cb.sco.p_curr_scb->in_use && p_scb == bta_ag_cb.sco.p_curr_scb) {
      do_in_bta_thread(
          FROM_HERE, base::Bind(&bta_ag_sm_execute, p_scb, BTA_AG_SCO_CLOSE_EVT,
                                tBTA_AG_DATA::kEmpty));
    }
    return;
  }
  /* Make sure this SCO handle is not already in use */
+5 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@

#if defined(BTA_HD_INCLUDED) && (BTA_HD_INCLUDED == TRUE)

#include <log/log.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -124,6 +125,10 @@ extern void BTA_HdRegisterApp(tBTA_HD_APP_INFO* p_app_info,

  p_buf->subclass = p_app_info->subclass;

  if (p_app_info->descriptor.dl_len > BTA_HD_APP_DESCRIPTOR_LEN) {
    p_app_info->descriptor.dl_len = BTA_HD_APP_DESCRIPTOR_LEN;
    android_errorWriteLog(0x534e4554, "113111784");
  }
  p_buf->d_len = p_app_info->descriptor.dl_len;
  memcpy(p_buf->d_data, p_app_info->descriptor.dsc_list,
         p_app_info->descriptor.dl_len);
+3 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ cc_test {
    header_libs: ["libbluetooth_headers"],
    shared_libs: [
        "libaudioclient",
        "android.hardware.bluetooth.a2dp@1.0",
        "libhidlbase",
        "liblog",
        "libprotobuf-cpp-lite",
@@ -132,7 +133,9 @@ cc_test {
        "libbtcore",
        "libbt-stack",
        "libbt-sbc-encoder",
        "libbt-utils",
        "libFraunhoferAAC",
        "libg722codec",
        "libbtdevice",
        "libbt-hci",
        "libudrv-uipc",
+10 −1
Original line number Diff line number Diff line
@@ -88,6 +88,11 @@ bool btif_a2dp_on_started(const RawAddress& peer_addr,
          }
          ack = true;
        }
      } else {
        // We were started remotely
        if (btif_av_is_a2dp_offload_enabled()) {
          btif_av_stream_start_offload();
        }
      }

      /* media task is autostarted upon a2dp audiopath connection */
@@ -95,7 +100,11 @@ bool btif_a2dp_on_started(const RawAddress& peer_addr,
  } else if (pending_start) {
    LOG_ERROR(LOG_TAG, "%s: peer %s A2DP start request failed: status = %d",
              __func__, peer_addr.ToString().c_str(), p_av_start->status);
    if (btif_av_is_a2dp_offload_enabled()) {
      btif_a2dp_audio_on_started(p_av_start->status);
    } else {
      btif_a2dp_command_ack(A2DP_CTRL_ACK_FAILURE);
    }
    ack = true;
  }
  return ack;
Loading