Some remote supports sniff but when dut initiates sniff req,
remote wont respond and acl connection will be terminated
from soc with LMP responce time out
Tag: #compatibility
Bug:
163109241
Test: Manual
Change-Id: I77b5c0daf22c9f3adaf2a7b75c20bc8e27d8990c
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
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";
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);
}
#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"
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;