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

Commit 8b177431 authored by Henri Chataing's avatar Henri Chataing Committed by Automerger Merge Worker
Browse files

Merge "Flags 24Q3: asha_asrc" into main am: 666c1044

parents 2afe8651 666c1044
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
package: "com.android.bluetooth.flags"
container: "com.android.btservices"

flag {
    name: "asha_asrc"
    namespace: "bluetooth"
    description: "Sync audio stream with the bluetooth link clock"
    bug: "321057945"
}

flag {
    name: "asha_encrypted_l2c_coc"
    namespace: "bluetooth"
+4 −17
Original line number Diff line number Diff line
@@ -347,11 +347,6 @@ public:
  // Reset and configure the ASHA resampling context using the input device
  // devices as reference for the BT clock estimation.
  void ConfigureAsrc() {
    if (!com::android::bluetooth::flags::asha_asrc()) {
      log::info("Asha resampling disabled: feature flag off");
      return;
    }

    // Create a new ASRC context if required.
    if (asrc == nullptr) {
      log::info("Configuring Asha resampler");
@@ -1413,19 +1408,11 @@ public:
      }
    }

    uint16_t l2cap_flush_threshold = 0;

    // Skipping packets completely messes up the resampler context.
    // The condition for skipping packets seems to be easily triggered,
    // causing dropouts that could have been avoided.
    //
    // When the resampler is enabled, the flush threshold is set
    // to the number of credits specified for the ASHA l2cap streaming
    // channel. This will ensure it is only triggered in case of
    // critical failure.
    if (com::android::bluetooth::flags::asha_asrc()) {
      l2cap_flush_threshold = 8;
    }
    // The flush threshold is set to the number of credits specified for the
    // ASHA l2cap streaming channel. This will ensure it is only triggered in
    // case of critical failure.
    uint16_t l2cap_flush_threshold = 8;

    // TODO: monural, binarual check