From 03378a55ba4c099e53d838d2beb2bc09910cee98 Mon Sep 17 00:00:00 2001 From: Ravi Nagarajan Date: Tue, 26 Jun 2012 03:36:51 -0700 Subject: Fix for carkits that send PLAY without AVDTP START Some carkits after send AVDTP SUSPEND right after RC PAUSE Per the whitepaper, the device sending AVDTP SUSPEND should send AVDTP START. However a few carkits send AVRCP PLAY without sending AVDTP START. Added a workaround to reset the remote suspend flag when an AVRCP PLAY is received Change-Id: If12e55b4d905b03890c69c2137f363986482ab1a --- btif/src/btif_av.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c index 80bee96..f7811a3 100644 --- a/btif/src/btif_av.c +++ b/btif/src/btif_av.c @@ -478,6 +478,13 @@ static BOOLEAN btif_av_state_opened_handler(btif_sm_event_t event, void *p_data) BTIF_TRACE_DEBUG3("%s event:%s flags %x", __FUNCTION__, dump_av_sm_event_name(event), btif_av_cb.flags); + if ( (event == BTA_AV_REMOTE_CMD_EVT) && (btif_av_cb.flags & BTIF_AV_FLAG_REMOTE_SUSPEND) && + (p_av->remote_cmd.rc_id == BTA_AV_RC_PLAY) ) + { + BTIF_TRACE_EVENT1("%s: Resetting remote suspend flag on RC PLAY", __FUNCTION__); + btif_av_cb.flags &= ~BTIF_AV_FLAG_REMOTE_SUSPEND; + } + switch (event) { case BTIF_SM_ENTER_EVT: -- cgit v1.1