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

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

Merge "stack/a2dp: Improve typing for constants" into main am: a2d0dab7 am: cfab8637

parents 51e8966e cfab8637
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ static tA2DP_STATUS A2DP_ParseInfoAac(tA2DP_AAC_CIE* p_ie, const uint8_t* p_code
  }

  media_type = (*p_codec_info++) >> 4;
  codec_type = *p_codec_info++;
  codec_type = static_cast<tA2DP_CODEC_TYPE>(*p_codec_info++);
  /* Check the Media Type and Media Codec Type */
  if (media_type != AVDT_MEDIA_TYPE_AUDIO || codec_type != A2DP_MEDIA_CT_AAC) {
    return A2DP_WRONG_CODEC;
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ static void init_btav_a2dp_codec_config(btav_a2dp_codec_config_t* codec_config,
  codec_config->codec_priority = codec_priority;
}

A2dpCodecConfig::A2dpCodecConfig(btav_a2dp_codec_index_t codec_index, uint64_t codec_id,
A2dpCodecConfig::A2dpCodecConfig(btav_a2dp_codec_index_t codec_index, tA2DP_CODEC_ID codec_id,
                                 const std::string& name, btav_a2dp_codec_priority_t codec_priority)
    : codec_index_(codec_index),
      codec_id_(codec_id),
@@ -1582,7 +1582,7 @@ std::string A2DP_CodecInfoString(const uint8_t* p_codec_info) {
      break;
  }

  return "Unsupported codec type: " + loghex(codec_type);
  return fmt::format("Unsupported codec type: {:x}", codec_type);
}

int A2DP_GetEecoderEffectiveFrameSize(const uint8_t* p_codec_info) {
+2 −2
Original line number Diff line number Diff line
@@ -25,11 +25,11 @@

using namespace bluetooth;

static uint64_t codec_id(btav_a2dp_codec_index_t codec_index) {
static tA2DP_CODEC_ID codec_id(btav_a2dp_codec_index_t codec_index) {
  uint64_t id = 0;
  auto result = ::bluetooth::audio::a2dp::provider::codec_info(codec_index, &id, nullptr, nullptr);
  log::assert_that(result, "provider::codec_info unexpectdly failed");
  return id;
  return static_cast<tA2DP_CODEC_ID>(id);
}

A2dpCodecConfigExt::A2dpCodecConfigExt(btav_a2dp_codec_index_t codec_index, bool is_source)
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ static tA2DP_STATUS A2DP_ParseInfoSbc(tA2DP_SBC_CIE* p_ie, const uint8_t* p_code
  }

  media_type = (*p_codec_info++) >> 4;
  codec_type = *p_codec_info++;
  codec_type = static_cast<tA2DP_CODEC_TYPE>(*p_codec_info++);
  /* Check the Media Type and Media Codec Type */
  if (media_type != AVDT_MEDIA_TYPE_AUDIO || codec_type != A2DP_MEDIA_CT_SBC) {
    return A2DP_WRONG_CODEC;
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ static tA2DP_STATUS A2DP_ParseInfoAptx(tA2DP_APTX_CIE* p_ie, const uint8_t* p_co
  }

  media_type = (*p_codec_info++) >> 4;
  codec_type = *p_codec_info++;
  codec_type = static_cast<tA2DP_CODEC_TYPE>(*p_codec_info++);
  /* Check the Media Type and Media Codec Type */
  if (media_type != AVDT_MEDIA_TYPE_AUDIO || codec_type != A2DP_MEDIA_CT_NON_A2DP) {
    return A2DP_WRONG_CODEC;
Loading