Loading system/internal_include/bt_target.h +1 −7 Original line number Diff line number Diff line Loading @@ -404,14 +404,8 @@ #define BTM_PM_DEBUG FALSE #endif /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */ #ifndef BTM_SCO_WAKE_PARKED_LINK #define BTM_SCO_WAKE_PARKED_LINK TRUE #endif /* If the user does not respond to security process requests within this many * seconds, * a negative response would be sent automatically. * seconds, a negative response would be sent automatically. * 30 is LMP response timeout value */ #ifndef BTM_SEC_TIMEOUT_VALUE #define BTM_SEC_TIMEOUT_VALUE 35 Loading system/stack/btm/btm_sco.cc +1 −10 Original line number Diff line number Diff line Loading @@ -483,8 +483,7 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, if (p->state == SCO_ST_UNUSED) { if (remote_bda) { if (is_orig) { /* can not create SCO link if in park mode */ #if (BTM_SCO_WAKE_PARKED_LINK == TRUE) // can not create SCO link if in park mode tBTM_PM_STATE state; if ((btm_read_power_mode_state(*remote_bda, &state) == BTM_SUCCESS)) { if (state == BTM_PM_ST_SNIFF || state == BTM_PM_ST_PARK || Loading @@ -501,12 +500,6 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, LOG(ERROR) << __func__ << ": failed to read power mode for " << *remote_bda; } #else // BTM_SCO_WAKE_PARKED_LINK uint8_t mode; if ((BTM_ReadPowerMode(*remote_bda, &mode) == BTM_SUCCESS) && (mode == BTM_PM_MD_PARK)) return (BTM_WRONG_MODE); #endif // BTM_SCO_WAKE_PARKED_LINK } p->esco.data.bd_addr = *remote_bda; p->rem_bd_known = true; Loading Loading @@ -578,7 +571,6 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, return BTM_NO_RESOURCES; } #if (BTM_SCO_WAKE_PARKED_LINK == TRUE) /******************************************************************************* * * Function btm_sco_chk_pend_unpark Loading Loading @@ -612,7 +604,6 @@ void btm_sco_chk_pend_unpark(uint8_t hci_status, uint16_t hci_handle) { } #endif // BTM_MAX_SCO_LINKS } #endif // BTM_SCO_WAKE_PARKED_LINK /******************************************************************************* * Loading system/stack/btu/btu_hcif.cc +0 −4 Original line number Diff line number Diff line Loading @@ -1028,7 +1028,6 @@ static void btu_hcif_hdl_command_status(uint16_t opcode, uint8_t status, switch (opcode) { case HCI_EXIT_SNIFF_MODE: case HCI_EXIT_PARK_MODE: #if (BTM_SCO_WAKE_PARKED_LINK == TRUE) if (status != HCI_SUCCESS) { /* Allow SCO initiation to continue if waiting for change mode event */ if (p_cmd != NULL) { Loading @@ -1037,7 +1036,6 @@ static void btu_hcif_hdl_command_status(uint16_t opcode, uint8_t status, btm_sco_chk_pend_unpark(status, handle); } } #endif FALLTHROUGH_INTENDED; /* FALLTHROUGH */ case HCI_HOLD_MODE: Loading Loading @@ -1279,9 +1277,7 @@ static void btu_hcif_mode_change_evt(uint8_t* p) { STREAM_TO_UINT16(handle, p); STREAM_TO_UINT8(current_mode, p); STREAM_TO_UINT16(interval, p); #if (BTM_SCO_WAKE_PARKED_LINK == TRUE) btm_sco_chk_pend_unpark(status, handle); #endif btm_pm_proc_mode_change(status, handle, current_mode, interval); #if (HID_DEV_INCLUDED == TRUE && HID_DEV_PM_INCLUDED == TRUE) Loading Loading
system/internal_include/bt_target.h +1 −7 Original line number Diff line number Diff line Loading @@ -404,14 +404,8 @@ #define BTM_PM_DEBUG FALSE #endif /* This is set to TRUE if link is to be unparked due to BTM_CreateSCO API. */ #ifndef BTM_SCO_WAKE_PARKED_LINK #define BTM_SCO_WAKE_PARKED_LINK TRUE #endif /* If the user does not respond to security process requests within this many * seconds, * a negative response would be sent automatically. * seconds, a negative response would be sent automatically. * 30 is LMP response timeout value */ #ifndef BTM_SEC_TIMEOUT_VALUE #define BTM_SEC_TIMEOUT_VALUE 35 Loading
system/stack/btm/btm_sco.cc +1 −10 Original line number Diff line number Diff line Loading @@ -483,8 +483,7 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, if (p->state == SCO_ST_UNUSED) { if (remote_bda) { if (is_orig) { /* can not create SCO link if in park mode */ #if (BTM_SCO_WAKE_PARKED_LINK == TRUE) // can not create SCO link if in park mode tBTM_PM_STATE state; if ((btm_read_power_mode_state(*remote_bda, &state) == BTM_SUCCESS)) { if (state == BTM_PM_ST_SNIFF || state == BTM_PM_ST_PARK || Loading @@ -501,12 +500,6 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, LOG(ERROR) << __func__ << ": failed to read power mode for " << *remote_bda; } #else // BTM_SCO_WAKE_PARKED_LINK uint8_t mode; if ((BTM_ReadPowerMode(*remote_bda, &mode) == BTM_SUCCESS) && (mode == BTM_PM_MD_PARK)) return (BTM_WRONG_MODE); #endif // BTM_SCO_WAKE_PARKED_LINK } p->esco.data.bd_addr = *remote_bda; p->rem_bd_known = true; Loading Loading @@ -578,7 +571,6 @@ tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig, return BTM_NO_RESOURCES; } #if (BTM_SCO_WAKE_PARKED_LINK == TRUE) /******************************************************************************* * * Function btm_sco_chk_pend_unpark Loading Loading @@ -612,7 +604,6 @@ void btm_sco_chk_pend_unpark(uint8_t hci_status, uint16_t hci_handle) { } #endif // BTM_MAX_SCO_LINKS } #endif // BTM_SCO_WAKE_PARKED_LINK /******************************************************************************* * Loading
system/stack/btu/btu_hcif.cc +0 −4 Original line number Diff line number Diff line Loading @@ -1028,7 +1028,6 @@ static void btu_hcif_hdl_command_status(uint16_t opcode, uint8_t status, switch (opcode) { case HCI_EXIT_SNIFF_MODE: case HCI_EXIT_PARK_MODE: #if (BTM_SCO_WAKE_PARKED_LINK == TRUE) if (status != HCI_SUCCESS) { /* Allow SCO initiation to continue if waiting for change mode event */ if (p_cmd != NULL) { Loading @@ -1037,7 +1036,6 @@ static void btu_hcif_hdl_command_status(uint16_t opcode, uint8_t status, btm_sco_chk_pend_unpark(status, handle); } } #endif FALLTHROUGH_INTENDED; /* FALLTHROUGH */ case HCI_HOLD_MODE: Loading Loading @@ -1279,9 +1277,7 @@ static void btu_hcif_mode_change_evt(uint8_t* p) { STREAM_TO_UINT16(handle, p); STREAM_TO_UINT8(current_mode, p); STREAM_TO_UINT16(interval, p); #if (BTM_SCO_WAKE_PARKED_LINK == TRUE) btm_sco_chk_pend_unpark(status, handle); #endif btm_pm_proc_mode_change(status, handle, current_mode, interval); #if (HID_DEV_INCLUDED == TRUE && HID_DEV_PM_INCLUDED == TRUE) Loading