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

Commit 5dea2fa5 authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

Clean up log spam in avrcp and a2dp am: f2ec285d am: 7642a1a6

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1472565

Change-Id: I78f7b3a1fcc3463cd39da09a30f17e81421d83b7
parents b478c943 7642a1a6
Loading
Loading
Loading
Loading
+22 −22
Original line number Diff line number Diff line
@@ -412,7 +412,7 @@ void ConnectionHandler::MessageCb(uint8_t handle, uint8_t label, uint8_t opcode,
void ConnectionHandler::SdpCb(const RawAddress& bdaddr, SdpCallback cb,
                              tSDP_DISCOVERY_DB* disc_db, bool retry,
                              uint16_t status) {
  LOG(INFO) << __PRETTY_FUNCTION__ << ": SDP lookup callback received";
  VLOG(1) << __PRETTY_FUNCTION__ << ": SDP lookup callback received";

  if (status == SDP_CONN_FAILED and !retry) {
    LOG(WARNING) << __PRETTY_FUNCTION__ << ": SDP Failure retry again";
@@ -444,34 +444,34 @@ void ConnectionHandler::SdpCb(const RawAddress& bdaddr, SdpCallback cb,
      /* get profile version (if failure, version parameter is not updated) */
      sdp_->FindProfileVersionInRec(
          sdp_record, UUID_SERVCLASS_AV_REMOTE_CONTROL, &peer_avrcp_version);
      LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
      VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
              << " peer avrcp version=" << loghex(peer_avrcp_version);

      if (peer_avrcp_version >= AVRC_REV_1_3) {
        // These are the standard features, another way to check this is to
        // search for CAT1 on the remote device
        LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
        VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
                << " supports metadata";
        peer_features |= (BTA_AV_FEAT_VENDOR | BTA_AV_FEAT_METADATA);
      }
      if (peer_avrcp_version >= AVRC_REV_1_4) {
        /* get supported categories */
        LOG(INFO) << __PRETTY_FUNCTION__ << " Get Supported categories";
        VLOG(1) << __PRETTY_FUNCTION__ << " Get Supported categories";
        tSDP_DISC_ATTR* sdp_attribute =
            sdp_->FindAttributeInRec(sdp_record, ATTR_ID_SUPPORTED_FEATURES);
        if (sdp_attribute != NULL) {
          LOG(INFO) << __PRETTY_FUNCTION__
          VLOG(1) << __PRETTY_FUNCTION__
                  << "Get Supported categories SDP ATTRIBUTES != null";
          uint16_t categories = sdp_attribute->attr_value.v.u16;
          if (categories & AVRC_SUPF_CT_CAT2) {
            LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
                    << " supports advanced control";
            if (IsAbsoluteVolumeEnabled(&bdaddr)) {
              peer_features |= (BTA_AV_FEAT_ADV_CTRL);
            }
          }
          if (categories & AVRC_SUPF_CT_BROWSE) {
            LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
                    << " supports browsing";
            peer_features |= (BTA_AV_FEAT_BROWSE);
          }
@@ -483,13 +483,13 @@ void ConnectionHandler::SdpCb(const RawAddress& bdaddr, SdpCallback cb,
  sdp_record = sdp_->FindServiceInDb(disc_db, UUID_SERVCLASS_AV_REM_CTRL_TARGET,
                                     nullptr);
  if (sdp_record != nullptr) {
    LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
    VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            << " supports remote control target";

    uint16_t peer_avrcp_target_version = 0;
    sdp_->FindProfileVersionInRec(sdp_record, UUID_SERVCLASS_AV_REMOTE_CONTROL,
                                  &peer_avrcp_target_version);
    LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
    VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            << " peer avrcp target version="
            << loghex(peer_avrcp_target_version);

@@ -497,15 +497,15 @@ void ConnectionHandler::SdpCb(const RawAddress& bdaddr, SdpCallback cb,
        NULL) {
      if (peer_avrcp_target_version >= AVRC_REV_1_4) {
        /* get supported categories */
        LOG(INFO) << __PRETTY_FUNCTION__ << " Get Supported categories";
        VLOG(1) << __PRETTY_FUNCTION__ << " Get Supported categories";
        tSDP_DISC_ATTR* sdp_attribute =
            sdp_->FindAttributeInRec(sdp_record, ATTR_ID_SUPPORTED_FEATURES);
        if (sdp_attribute != NULL) {
          LOG(INFO) << __PRETTY_FUNCTION__
          VLOG(1) << __PRETTY_FUNCTION__
                  << "Get Supported categories SDP ATTRIBUTES != null";
          uint16_t categories = sdp_attribute->attr_value.v.u16;
          if (categories & AVRC_SUPF_CT_CAT2) {
            LOG(INFO) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
            VLOG(1) << __PRETTY_FUNCTION__ << ": Device " << bdaddr.ToString()
                    << " supports advanced control";
            if (IsAbsoluteVolumeEnabled(&bdaddr)) {
              peer_features |= (BTA_AV_FEAT_ADV_CTRL);
+3 −3
Original line number Diff line number Diff line
@@ -328,11 +328,11 @@ static void a2dp_sbc_encoder_update(uint16_t peer_mtu,

    if (s16BitPool < 0) s16BitPool = 0;

    LOG_INFO("%s: bitpool candidate: %d (%d kbps)", __func__, s16BitPool,
    LOG_VERBOSE("%s: bitpool candidate: %d (%d kbps)", __func__, s16BitPool,
                p_encoder_params->u16BitRate);

    if (s16BitPool > max_bitpool) {
      LOG_INFO("%s: computed bitpool too large (%d)", __func__, s16BitPool);
      LOG_VERBOSE("%s: computed bitpool too large (%d)", __func__, s16BitPool);
      /* Decrease bitrate */
      p_encoder_params->u16BitRate -= A2DP_SBC_BITRATE_STEP;
      /* Record that we have decreased the bitrate */