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

Commit 1d1372e9 authored by Ugo Yu's avatar Ugo Yu Committed by Automerger Merge Worker
Browse files

Use system property for sniff idle time in HS am: 287ab116

parents ddff29f1 287ab116
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -26,12 +26,12 @@
#include <cstdint>

#include "bt_target.h"  // Must be first to define build configuration

#include "bta/dm/bta_dm_int.h"
#include "bta/include/bta_api.h"
#include "bta/include/bta_hh_api.h"
#include "bta/include/bta_jv_api.h"
#include "bta/sys/bta_sys.h"
#include "osi/include/properties.h"
#include "types/raw_address.h"

/* page timeout in 625uS */
@@ -127,6 +127,9 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_CFG
};

tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC* get_bta_dm_pm_spec() {
  static uint16_t hs_sniff_delay = uint16_t(
      osi_property_get_int32("bluetooth.bta_hs_sniff_delay_ms.config", 7000));

  static tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC
      bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = {
          /* AG : 0 */
@@ -405,7 +408,7 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC* get_bta_dm_pm_spec() {
          {(BTA_DM_PM_SNIFF | BTA_DM_PM_PARK), /* allow park & sniff */
           (BTA_DM_PM_SSR2),                   /* the SSR entry */
           {
               {{BTA_DM_PM_SNIFF, 7000},
               {{BTA_DM_PM_SNIFF, hs_sniff_delay},
                {BTA_DM_PM_NO_ACTION, 0}}, /* conn open sniff  */
               {{BTA_DM_PM_NO_PREF, 0},
                {BTA_DM_PM_NO_ACTION, 0}}, /* conn close  */
@@ -417,7 +420,8 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC* get_bta_dm_pm_spec() {
                {BTA_DM_PM_NO_ACTION, 0}}, /* sco open, active */
               {{BTA_DM_PM_SNIFF, 7000},
                {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff  */
               {{BTA_DM_PM_SNIFF, 7000}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */
               {{BTA_DM_PM_SNIFF, hs_sniff_delay},
                {BTA_DM_PM_NO_ACTION, 0}},                        /* idle */
               {{BTA_DM_PM_ACTIVE, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* busy */
               {{BTA_DM_PM_RETRY, 7000},
                {BTA_DM_PM_NO_ACTION, 0}} /* mode change retry */