******************************************************************************/
void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
tBTA_AV_CONN_CHG msg;
+ char remote_name[BTM_MAX_REM_BD_NAME_LEN] = "";
uint8_t* p;
APPL_TRACE_DEBUG("%s: peer %s bta_handle: 0x%x", __func__,
/* set the congestion flag, so AV would not send media packets by accident */
p_scb->cong = true;
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_data->str_msg.msg.open_ind.peer_mtu - AVDT_MEDIA_HDR_SIZE;
suspend_rsp.status = BTA_AV_SUCCESS;
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;
APPL_TRACE_ERROR("%s: suspend failed, closing connection", __func__);
bta_av_ssm_execute(p_scb, BTA_AV_STR_DISC_FAIL_EVT, NULL);
} else {
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 */
L2CA_FlushChannel(p_scb->l2c_cid, L2CAP_FLUSH_CHANS_ALL);
// 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_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;
// Check if a given |addr| matches a known interoperability workaround as