Loading system/device/include/interop.h +6 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,12 @@ typedef enum { INTEROP_DISABLE_NAME_REQUEST, // Respond AVRCP profile version only 1.4 for some device. INTEROP_AVRCP_1_4_ONLY INTEROP_AVRCP_1_4_ONLY, // Disable sniff mode for headsets/car-kits // Some car kits supports sniff mode but when DUT initiates sniff req // Remote will go to bad state and its leads to LMP time out. INTEROP_DISABLE_SNIFF } interop_feature_t; // Check if a given |addr| matches a known interoperability workaround as Loading system/device/src/interop.cc +1 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,7 @@ static const char* interop_feature_string_(const interop_feature_t feature) { CASE_RETURN_STR(INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL) CASE_RETURN_STR(INTEROP_DISABLE_NAME_REQUEST) CASE_RETURN_STR(INTEROP_AVRCP_1_4_ONLY) CASE_RETURN_STR(INTEROP_DISABLE_SNIFF) } return "UNKNOWN"; Loading system/stack/acl/btm_acl.cc +4 −0 Original line number Diff line number Diff line Loading @@ -624,6 +624,10 @@ static void check_link_policy(uint16_t* settings) { static void btm_set_link_policy(tACL_CONN* conn, uint16_t policy) { conn->link_policy = policy; check_link_policy(&conn->link_policy); if ((conn->link_policy & HCI_ENABLE_CENTRAL_PERIPHERAL_SWITCH) && interop_match_addr(INTEROP_DISABLE_SNIFF, &(conn->remote_addr))) { conn->link_policy &= (~HCI_ENABLE_SNIFF_MODE); } btsnd_hcic_write_policy_set(conn->hci_handle, conn->link_policy); } Loading system/stack/acl/btm_pm.cc +3 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #include "btm_int.h" #include "btm_int_types.h" #include "device/include/controller.h" #include "device/include/interop.h" #include "hcidefs.h" #include "hcimsgs.h" #include "osi/include/log.h" Loading Loading @@ -160,7 +161,8 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda, const controller_t* controller = controller_get_interface(); if ((mode == BTM_PM_MD_HOLD && !controller->supports_hold_mode()) || (mode == BTM_PM_MD_SNIFF && !controller->supports_sniff_mode()) || (mode == BTM_PM_MD_PARK && !controller->supports_park_mode())) { (mode == BTM_PM_MD_PARK && !controller->supports_park_mode()) || interop_match_addr(INTEROP_DISABLE_SNIFF, &remote_bda)) { LOG_ERROR("pm_id %u mode %u is not supported for %s", pm_id, mode, remote_bda.ToString().c_str()); return BTM_MODE_UNSUPPORTED; Loading Loading
system/device/include/interop.h +6 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,12 @@ typedef enum { INTEROP_DISABLE_NAME_REQUEST, // Respond AVRCP profile version only 1.4 for some device. INTEROP_AVRCP_1_4_ONLY INTEROP_AVRCP_1_4_ONLY, // Disable sniff mode for headsets/car-kits // Some car kits supports sniff mode but when DUT initiates sniff req // Remote will go to bad state and its leads to LMP time out. INTEROP_DISABLE_SNIFF } interop_feature_t; // Check if a given |addr| matches a known interoperability workaround as Loading
system/device/src/interop.cc +1 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,7 @@ static const char* interop_feature_string_(const interop_feature_t feature) { CASE_RETURN_STR(INTEROP_HID_HOST_LIMIT_SNIFF_INTERVAL) CASE_RETURN_STR(INTEROP_DISABLE_NAME_REQUEST) CASE_RETURN_STR(INTEROP_AVRCP_1_4_ONLY) CASE_RETURN_STR(INTEROP_DISABLE_SNIFF) } return "UNKNOWN"; Loading
system/stack/acl/btm_acl.cc +4 −0 Original line number Diff line number Diff line Loading @@ -624,6 +624,10 @@ static void check_link_policy(uint16_t* settings) { static void btm_set_link_policy(tACL_CONN* conn, uint16_t policy) { conn->link_policy = policy; check_link_policy(&conn->link_policy); if ((conn->link_policy & HCI_ENABLE_CENTRAL_PERIPHERAL_SWITCH) && interop_match_addr(INTEROP_DISABLE_SNIFF, &(conn->remote_addr))) { conn->link_policy &= (~HCI_ENABLE_SNIFF_MODE); } btsnd_hcic_write_policy_set(conn->hci_handle, conn->link_policy); } Loading
system/stack/acl/btm_pm.cc +3 −1 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ #include "btm_int.h" #include "btm_int_types.h" #include "device/include/controller.h" #include "device/include/interop.h" #include "hcidefs.h" #include "hcimsgs.h" #include "osi/include/log.h" Loading Loading @@ -160,7 +161,8 @@ tBTM_STATUS BTM_SetPowerMode(uint8_t pm_id, const RawAddress& remote_bda, const controller_t* controller = controller_get_interface(); if ((mode == BTM_PM_MD_HOLD && !controller->supports_hold_mode()) || (mode == BTM_PM_MD_SNIFF && !controller->supports_sniff_mode()) || (mode == BTM_PM_MD_PARK && !controller->supports_park_mode())) { (mode == BTM_PM_MD_PARK && !controller->supports_park_mode()) || interop_match_addr(INTEROP_DISABLE_SNIFF, &remote_bda)) { LOG_ERROR("pm_id %u mode %u is not supported for %s", pm_id, mode, remote_bda.ToString().c_str()); return BTM_MODE_UNSUPPORTED; Loading