Loading system/bta/av/bta_av_aact.cc +10 −9 Original line number Original line Diff line number Diff line Loading @@ -1148,6 +1148,7 @@ void bta_av_setconfig_rsp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { ******************************************************************************/ ******************************************************************************/ void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { tBTA_AV_CONN_CHG msg; tBTA_AV_CONN_CHG msg; char remote_name[BTM_MAX_REM_BD_NAME_LEN] = ""; uint8_t* p; uint8_t* p; APPL_TRACE_DEBUG("%s: peer %s bta_handle: 0x%x", __func__, APPL_TRACE_DEBUG("%s: peer %s bta_handle: 0x%x", __func__, Loading @@ -1161,6 +1162,15 @@ void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { /* set the congestion flag, so AV would not send media packets by accident */ /* set the congestion flag, so AV would not send media packets by accident */ p_scb->cong = true; p_scb->cong = true; p_scb->offload_start_pending = false; p_scb->offload_start_pending = false; // Don't use AVDTP SUSPEND for restrict listed devices btif_storage_get_stored_remote_name(p_scb->PeerAddress(), remote_name); if (interop_match_name(INTEROP_DISABLE_AVDTP_SUSPEND, remote_name) || interop_match_addr(INTEROP_DISABLE_AVDTP_SUSPEND, &p_scb->PeerAddress())) { LOG_INFO("%s: disable AVDTP SUSPEND: interop matched name %s address %s", __func__, remote_name, p_scb->PeerAddress().ToString().c_str()); p_scb->suspend_sup = false; } p_scb->stream_mtu = p_scb->stream_mtu = p_data->str_msg.msg.open_ind.peer_mtu - AVDT_MEDIA_HDR_SIZE; p_data->str_msg.msg.open_ind.peer_mtu - AVDT_MEDIA_HDR_SIZE; Loading Loading @@ -2468,10 +2478,6 @@ void bta_av_suspend_cfm(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { suspend_rsp.status = BTA_AV_SUCCESS; suspend_rsp.status = BTA_AV_SUCCESS; if (err_code && (err_code != AVDT_ERR_BAD_STATE)) { if (err_code && (err_code != AVDT_ERR_BAD_STATE)) { /* Disable suspend feature only with explicit rejection(not with timeout) */ if (err_code != AVDT_ERR_TIMEOUT) { p_scb->suspend_sup = false; } suspend_rsp.status = BTA_AV_FAIL; suspend_rsp.status = BTA_AV_FAIL; APPL_TRACE_ERROR("%s: suspend failed, closing connection", __func__); APPL_TRACE_ERROR("%s: suspend failed, closing connection", __func__); Loading Loading @@ -2685,11 +2691,6 @@ void bta_av_suspend_cont(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { bta_av_ssm_execute(p_scb, BTA_AV_STR_DISC_FAIL_EVT, NULL); bta_av_ssm_execute(p_scb, BTA_AV_STR_DISC_FAIL_EVT, NULL); } else { } else { APPL_TRACE_ERROR("%s: suspend rejected, try close", __func__); APPL_TRACE_ERROR("%s: suspend rejected, try close", __func__); /* Disable suspend feature only with explicit rejection(not with timeout) */ if (err_code != AVDT_ERR_TIMEOUT) { p_scb->suspend_sup = false; } /* drop the buffers queued in L2CAP */ /* drop the buffers queued in L2CAP */ L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_ALL); L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_ALL); Loading system/device/include/interop.h +5 −1 Original line number Original line Diff line number Diff line Loading @@ -107,7 +107,11 @@ typedef enum { // Disable sniff mode for headsets/car-kits // Disable sniff mode for headsets/car-kits // Some car kits supports sniff mode but when DUT initiates sniff req // 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. // Remote will go to bad state and its leads to LMP time out. INTEROP_DISABLE_SNIFF INTEROP_DISABLE_SNIFF, // Do not send AVDTP SUSPEND while the playback is paused. // Some older A2DP Sink devices might not support to pause the streaming. INTEROP_DISABLE_AVDTP_SUSPEND } interop_feature_t; } interop_feature_t; // Check if a given |addr| matches a known interoperability workaround as // Check if a given |addr| matches a known interoperability workaround as Loading system/device/src/interop.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -133,6 +133,7 @@ static const char* interop_feature_string_(const interop_feature_t feature) { CASE_RETURN_STR(INTEROP_DISABLE_NAME_REQUEST) CASE_RETURN_STR(INTEROP_DISABLE_NAME_REQUEST) CASE_RETURN_STR(INTEROP_AVRCP_1_4_ONLY) CASE_RETURN_STR(INTEROP_AVRCP_1_4_ONLY) CASE_RETURN_STR(INTEROP_DISABLE_SNIFF) CASE_RETURN_STR(INTEROP_DISABLE_SNIFF) CASE_RETURN_STR(INTEROP_DISABLE_AVDTP_SUSPEND) } } return "UNKNOWN"; return "UNKNOWN"; Loading Loading
system/bta/av/bta_av_aact.cc +10 −9 Original line number Original line Diff line number Diff line Loading @@ -1148,6 +1148,7 @@ void bta_av_setconfig_rsp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { ******************************************************************************/ ******************************************************************************/ void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { tBTA_AV_CONN_CHG msg; tBTA_AV_CONN_CHG msg; char remote_name[BTM_MAX_REM_BD_NAME_LEN] = ""; uint8_t* p; uint8_t* p; APPL_TRACE_DEBUG("%s: peer %s bta_handle: 0x%x", __func__, APPL_TRACE_DEBUG("%s: peer %s bta_handle: 0x%x", __func__, Loading @@ -1161,6 +1162,15 @@ void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { /* set the congestion flag, so AV would not send media packets by accident */ /* set the congestion flag, so AV would not send media packets by accident */ p_scb->cong = true; p_scb->cong = true; p_scb->offload_start_pending = false; p_scb->offload_start_pending = false; // Don't use AVDTP SUSPEND for restrict listed devices btif_storage_get_stored_remote_name(p_scb->PeerAddress(), remote_name); if (interop_match_name(INTEROP_DISABLE_AVDTP_SUSPEND, remote_name) || interop_match_addr(INTEROP_DISABLE_AVDTP_SUSPEND, &p_scb->PeerAddress())) { LOG_INFO("%s: disable AVDTP SUSPEND: interop matched name %s address %s", __func__, remote_name, p_scb->PeerAddress().ToString().c_str()); p_scb->suspend_sup = false; } p_scb->stream_mtu = p_scb->stream_mtu = p_data->str_msg.msg.open_ind.peer_mtu - AVDT_MEDIA_HDR_SIZE; p_data->str_msg.msg.open_ind.peer_mtu - AVDT_MEDIA_HDR_SIZE; Loading Loading @@ -2468,10 +2478,6 @@ void bta_av_suspend_cfm(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { suspend_rsp.status = BTA_AV_SUCCESS; suspend_rsp.status = BTA_AV_SUCCESS; if (err_code && (err_code != AVDT_ERR_BAD_STATE)) { if (err_code && (err_code != AVDT_ERR_BAD_STATE)) { /* Disable suspend feature only with explicit rejection(not with timeout) */ if (err_code != AVDT_ERR_TIMEOUT) { p_scb->suspend_sup = false; } suspend_rsp.status = BTA_AV_FAIL; suspend_rsp.status = BTA_AV_FAIL; APPL_TRACE_ERROR("%s: suspend failed, closing connection", __func__); APPL_TRACE_ERROR("%s: suspend failed, closing connection", __func__); Loading Loading @@ -2685,11 +2691,6 @@ void bta_av_suspend_cont(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) { bta_av_ssm_execute(p_scb, BTA_AV_STR_DISC_FAIL_EVT, NULL); bta_av_ssm_execute(p_scb, BTA_AV_STR_DISC_FAIL_EVT, NULL); } else { } else { APPL_TRACE_ERROR("%s: suspend rejected, try close", __func__); APPL_TRACE_ERROR("%s: suspend rejected, try close", __func__); /* Disable suspend feature only with explicit rejection(not with timeout) */ if (err_code != AVDT_ERR_TIMEOUT) { p_scb->suspend_sup = false; } /* drop the buffers queued in L2CAP */ /* drop the buffers queued in L2CAP */ L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_ALL); L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_ALL); Loading
system/device/include/interop.h +5 −1 Original line number Original line Diff line number Diff line Loading @@ -107,7 +107,11 @@ typedef enum { // Disable sniff mode for headsets/car-kits // Disable sniff mode for headsets/car-kits // Some car kits supports sniff mode but when DUT initiates sniff req // 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. // Remote will go to bad state and its leads to LMP time out. INTEROP_DISABLE_SNIFF INTEROP_DISABLE_SNIFF, // Do not send AVDTP SUSPEND while the playback is paused. // Some older A2DP Sink devices might not support to pause the streaming. INTEROP_DISABLE_AVDTP_SUSPEND } interop_feature_t; } interop_feature_t; // Check if a given |addr| matches a known interoperability workaround as // Check if a given |addr| matches a known interoperability workaround as Loading
system/device/src/interop.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -133,6 +133,7 @@ static const char* interop_feature_string_(const interop_feature_t feature) { CASE_RETURN_STR(INTEROP_DISABLE_NAME_REQUEST) CASE_RETURN_STR(INTEROP_DISABLE_NAME_REQUEST) CASE_RETURN_STR(INTEROP_AVRCP_1_4_ONLY) CASE_RETURN_STR(INTEROP_AVRCP_1_4_ONLY) CASE_RETURN_STR(INTEROP_DISABLE_SNIFF) CASE_RETURN_STR(INTEROP_DISABLE_SNIFF) CASE_RETURN_STR(INTEROP_DISABLE_AVDTP_SUSPEND) } } return "UNKNOWN"; return "UNKNOWN"; Loading