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

Commit 9430ebb8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[HFP1.9] Make sure LC3 is really supported in host side" into main am:...

Merge "[HFP1.9] Make sure LC3 is really supported in host side" into main am: 3cb46e30 am: 08ebc90a am: 4e90f5ba

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



Change-Id: I436aeaf340c42927b16004a60f5343032d608261
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents acb3c643 4e90f5ba
Loading
Loading
Loading
Loading
+4 −8
Original line number Original line Diff line number Diff line
@@ -160,7 +160,6 @@ bool bta_ag_add_record(uint16_t service_uuid, const char* p_service_name,
  uint8_t network;
  uint8_t network;
  bool result = true;
  bool result = true;
  bool codec_supported = false;
  bool codec_supported = false;
  bool swb_supported = false;
  uint8_t buf[2];
  uint8_t buf[2];


  APPL_TRACE_DEBUG("%s uuid: %x", __func__, service_uuid);
  APPL_TRACE_DEBUG("%s uuid: %x", __func__, service_uuid);
@@ -214,19 +213,16 @@ bool bta_ag_add_record(uint16_t service_uuid, const char* p_service_name,
        sdp_handle, ATTR_ID_DATA_STORES_OR_NETWORK, UINT_DESC_TYPE, 1,
        sdp_handle, ATTR_ID_DATA_STORES_OR_NETWORK, UINT_DESC_TYPE, 1,
        &network);
        &network);


    // check property for SWB support
    if (hfp_hal_interface::get_swb_supported()) {
      features |= BTA_AG_FEAT_SWB;
    }

    if (features & BTA_AG_FEAT_CODEC) codec_supported = true;
    if (features & BTA_AG_FEAT_CODEC) codec_supported = true;
    if (features & BTA_AG_FEAT_SWB) swb_supported = true;


    features &= BTA_AG_SDP_FEAT_SPEC;
    features &= BTA_AG_SDP_FEAT_SPEC;


    /* Codec bit position is different in SDP and in BRSF */
    /* Codec bit position is different in SDP and in BRSF */
    if (codec_supported) features |= BTA_AG_FEAT_WBS_SUPPORT;
    if (codec_supported) features |= BTA_AG_FEAT_WBS_SUPPORT;
    if (swb_supported) features |= BTA_AG_FEAT_SWB_SUPPORT;
    // check property for SWB support
    if (hfp_hal_interface::get_swb_supported()) {
      features |= BTA_AG_FEAT_SWB_SUPPORT;
    }


    UINT16_TO_BE_FIELD(buf, features);
    UINT16_TO_BE_FIELD(buf, features);
    result &= get_legacy_stack_sdp_api()->handle.SDP_AddAttribute(
    result &= get_legacy_stack_sdp_api()->handle.SDP_AddAttribute(
+1 −1
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@
#define BTA_AG_FEAT_ECC 0x00000080    /* Enhanced Call Control */
#define BTA_AG_FEAT_ECC 0x00000080    /* Enhanced Call Control */
#define BTA_AG_FEAT_EXTERR 0x00000100 /* Extended error codes */
#define BTA_AG_FEAT_EXTERR 0x00000100 /* Extended error codes */
#define BTA_AG_FEAT_CODEC 0x00000200  /* Codec Negotiation */
#define BTA_AG_FEAT_CODEC 0x00000200  /* Codec Negotiation */
#define BTA_AG_FEAT_SWB 0x00000400    /* Super Wide Band */
#define BTA_AG_FEAT_SWB 0x00001000    /* Super Wide Band */


/* AG SDP feature masks */
/* AG SDP feature masks */
#define BTA_AG_FEAT_WBS_SUPPORT 0x0020 /* Supports WBS */
#define BTA_AG_FEAT_WBS_SUPPORT 0x0020 /* Supports WBS */