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

Commit 26a23a83 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: Change required MTU

Note, still MTU 517 will be requested by GATT, but with this
change, DLE will stay on 64 octects.
This could help controllers as for now we set max on DLE.

Bug: 257250188
Test: manual
Change-Id: I18d3b51c6ebf5bafad9e5dfd5fad58b5fe659578
parent e778518d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1848,7 +1848,11 @@ class LeAudioClientImpl : public LeAudioClient {
  void changeMtuIfPossible(LeAudioDevice* leAudioDevice) {
    if (leAudioDevice->mtu_ == GATT_DEF_BLE_MTU_SIZE) {
      LOG(INFO) << __func__ << ", Configure MTU";
      BtaGattQueue::ConfigureMtu(leAudioDevice->conn_id_, GATT_MAX_MTU_SIZE);
      /* Use here kBapMinimumAttMtu, because we know that GATT will request
       * GATT_MAX_MTU_SIZE on ATT anyways. We also know that GATT will use this
       * kBapMinimumAttMtu as an input for Data Length Update procedure in the controller.
       */
      BtaGattQueue::ConfigureMtu(leAudioDevice->conn_id_, kBapMinimumAttMtu);
    }
  }

@@ -4807,6 +4811,8 @@ class LeAudioClientImpl : public LeAudioClient {
  static constexpr char kNotifyUpperLayerAboutGroupBeingInIdleDuringCall[] =
      "persist.bluetooth.leaudio.notify.idle.during.call";

  static constexpr uint16_t kBapMinimumAttMtu = 64;

  /* Current stream configuration */
  LeAudioCodecConfiguration current_source_codec_config;
  LeAudioCodecConfiguration current_sink_codec_config;