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

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

stack/a2dp: Remove unused or empty functions am: eaf57868

parents d7fc4326 eaf57868
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -314,11 +314,6 @@ static tA2DP_STATUS A2DP_CodecInfoMatchesCapabilityAac(const tA2DP_AAC_CIE* p_ca
  return A2DP_SUCCESS;
}

bool A2DP_UsesRtpHeaderAac(bool /* content_protection_enabled */,
                           const uint8_t* /* p_codec_info */) {
  return true;
}

const char* A2DP_CodecNameAac(const uint8_t* /* p_codec_info */) { return "AAC"; }

bool A2DP_CodecTypeEqualsAac(const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b) {
@@ -762,10 +757,6 @@ A2dpCodecConfigAacSource::A2dpCodecConfigAacSource(btav_a2dp_codec_priority_t co
A2dpCodecConfigAacSource::~A2dpCodecConfigAacSource() {}

bool A2dpCodecConfigAacSource::init() {
  if (!isValid()) {
    return false;
  }

  // Load the encoder
  if (!A2DP_LoadEncoderAac()) {
    log::error("cannot load the encoder");
@@ -1434,10 +1425,6 @@ A2dpCodecConfigAacSink::A2dpCodecConfigAacSink(btav_a2dp_codec_priority_t codec_
A2dpCodecConfigAacSink::~A2dpCodecConfigAacSink() {}

bool A2dpCodecConfigAacSink::init() {
  if (!isValid()) {
    return false;
  }

  // Load the decoder
  if (!A2DP_LoadDecoderAac()) {
    log::error("cannot load the decoder");
+2 −16
Original line number Diff line number Diff line
@@ -153,18 +153,6 @@ static void a2dp_sdp_cback(const RawAddress& /* bd_addr */, tSDP_STATUS status)
  return;
}

/*******************************************************************************
 *
 * Function         a2dp_set_avdt_sdp_ver
 *
 * Description      This function allows the script wrapper to change the
 *                  avdt version of a2dp.
 *
 * Returns          None
 *
 ******************************************************************************/
void a2dp_set_avdt_sdp_ver(uint16_t avdt_sdp_ver) { a2dp_cb.avdt_sdp_ver = avdt_sdp_ver; }

/******************************************************************************
 *
 * Function         A2DP_AddRecord
@@ -222,7 +210,7 @@ tA2DP_STATUS A2DP_AddRecord(uint16_t service_uuid, char* p_service_name, char* p
  proto_list[0].params[0] = AVDT_PSM;
  proto_list[1].protocol_uuid = UUID_PROTOCOL_AVDTP;
  proto_list[1].num_params = 1;
  proto_list[1].params[0] = a2dp_cb.avdt_sdp_ver;
  proto_list[1].params[0] = A2DP_GetAvdtpVersion();

  result &= get_legacy_stack_sdp_api()->handle.SDP_AddProtocolList(sdp_handle, A2DP_NUM_PROTO_ELEMS,
                                                                   proto_list);
@@ -377,8 +365,6 @@ uint8_t A2DP_BitsSet(uint64_t num) {
 ******************************************************************************/
void A2DP_Init(void) {
  memset(&a2dp_cb, 0, sizeof(tA2DP_CB));

  a2dp_cb.avdt_sdp_ver = AVDT_VERSION;
}

uint16_t A2DP_GetAvdtpVersion() { return a2dp_cb.avdt_sdp_ver; }
uint16_t A2DP_GetAvdtpVersion() { return AVDT_VERSION; }
+0 −2
Original line number Diff line number Diff line
@@ -253,8 +253,6 @@ bool A2dpCodecConfig::getCodecSpecificConfig(tBT_A2DP_OFFLOAD* p_a2dp_offload) {
  return true;
}

bool A2dpCodecConfig::isValid() const { return true; }

bool A2dpCodecConfig::copyOutOtaCodecConfig(uint8_t* p_codec_info) {
  std::lock_guard<std::recursive_mutex> lock(codec_mutex_);

+0 −4
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ typedef struct {

typedef struct {
  tA2DP_FIND_CB find;    /* find service control block */
  uint16_t avdt_sdp_ver; /* AVDTP version */
} tA2DP_CB;

/******************************************************************************
@@ -58,7 +57,4 @@ typedef struct {
 ******************************************************************************/
extern tA2DP_CB a2dp_cb;

/* Used only for conformance testing */
void a2dp_set_avdt_sdp_ver(uint16_t avdt_sdp_ver);

#endif /* A2DP_INT_H */
+0 −20
Original line number Diff line number Diff line
@@ -874,16 +874,6 @@ A2dpCodecConfigSbcSource::A2dpCodecConfigSbcSource(btav_a2dp_codec_priority_t co
A2dpCodecConfigSbcSource::~A2dpCodecConfigSbcSource() {}

bool A2dpCodecConfigSbcSource::init() {
  if (!isValid()) {
    return false;
  }

  // Load the encoder
  if (!A2DP_LoadEncoderSbc()) {
    log::error("cannot load the encoder");
    return false;
  }

  return true;
}

@@ -1501,16 +1491,6 @@ A2dpCodecConfigSbcSink::A2dpCodecConfigSbcSink(btav_a2dp_codec_priority_t codec_
A2dpCodecConfigSbcSink::~A2dpCodecConfigSbcSink() {}

bool A2dpCodecConfigSbcSink::init() {
  if (!isValid()) {
    return false;
  }

  // Load the decoder
  if (!A2DP_LoadDecoderSbc()) {
    log::error("cannot load the decoder");
    return false;
  }

  return true;
}

Loading