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

Commit 7d59ac66 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "bta_av_co: Remove unused parameter from BtaAvCo::SetCodecOtaConfig" into main

parents aaf42f91 7fe9208b
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -488,12 +488,9 @@ void BtaAvCo::ProcessSetConfig(tBTA_AV_HNDL bta_av_handle, const RawAddress& pee
    }
    if (t_local_sep == AVDT_TSEP_SRC) {
      log::verbose("peer {} is A2DP SINK", p_peer->addr);
      // Ignore the restart_output flag: accepting the remote device's
      // codec selection should not trigger codec reconfiguration.
      bool dummy_restart_output = false;
      if ((p_peer->GetCodecs() == nullptr) ||
          !SetCodecOtaConfig(p_peer, p_codec_info, num_protect, p_protect_info,
                             &dummy_restart_output, t_local_sep)) {
                             t_local_sep)) {
        log::error("cannot set source codec {} for peer {}", A2DP_CodecName(p_codec_info),
                   p_peer->addr);
      } else {
@@ -1334,7 +1331,7 @@ BtaAvCoState* BtaAvCo::getStateFromPeer(const BtaAvCoPeer* p_peer) {

bool BtaAvCo::SetCodecOtaConfig(BtaAvCoPeer* p_peer, const uint8_t* p_ota_codec_config,
                                uint8_t num_protect, const uint8_t* p_protect_info,
                                bool* p_restart_output, const uint8_t t_local_sep) {
                                const uint8_t t_local_sep) {
  uint8_t result_codec_config[AVDT_CODEC_SIZE];
  bool restart_input = false;
  bool restart_output = false;
@@ -1342,8 +1339,6 @@ bool BtaAvCo::SetCodecOtaConfig(BtaAvCoPeer* p_peer, const uint8_t* p_ota_codec_

  log::info("peer_address={}, codec: {}", p_peer->addr, A2DP_CodecInfoString(p_ota_codec_config));

  *p_restart_output = false;

  // Find the peer SEP codec to use
  const BtaAvCoSep* p_sink = peer_cache_->FindPeerSink(
          p_peer, A2DP_SourceCodecIndex(p_ota_codec_config), ContentProtectFlag());
@@ -1366,7 +1361,6 @@ bool BtaAvCo::SetCodecOtaConfig(BtaAvCoPeer* p_peer, const uint8_t* p_ota_codec_
  if (restart_output) {
    log::verbose("restart output for codec: {}", A2DP_CodecInfoString(result_codec_config));

    *p_restart_output = true;
    p_peer->p_sink = p_sink;
    SaveNewCodecConfig(p_peer, result_codec_config, num_protect, p_protect_info, t_local_sep);
  }
+1 −4
Original line number Diff line number Diff line
@@ -449,14 +449,11 @@ private:
   * capability, but the codec configuration that the peer would like to use.
   * @param num_protect is the number of content protection methods to use
   * @param p_protect_info contains the content protection information to use.
   * @param p_restart_output if there is a change in the encoder configuration
   * that requires restarting of the A2DP connection, flag |p_restart_output|
   * is set to true.
   * @param t_local_sep the profile for which ota config needs to be set.
   * @return true on success, otherwise false
   */
  bool SetCodecOtaConfig(BtaAvCoPeer* p_peer, const uint8_t* p_ota_codec_config,
                         uint8_t num_protect, const uint8_t* p_protect_info, bool* p_restart_output,
                         uint8_t num_protect, const uint8_t* p_protect_info,
                         const uint8_t t_local_sep);

  /**