diff options
author | Mattias Agren <magren@broadcom.com> | 2012-04-27 11:20:59 +0200 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:19 -0700 |
commit | af7cc1ec86fc440de57a146a2bfa81e567a1303b (patch) | |
tree | d951286a7cf71b3f80838f75591bbe3051aab56b /btif | |
parent | 7e1faaf64d9d362da70a3f4b4c1fca517fad7862 (diff) | |
download | external_bluetooth_bluedroid-af7cc1ec86fc440de57a146a2bfa81e567a1303b.zip external_bluetooth_bluedroid-af7cc1ec86fc440de57a146a2bfa81e567a1303b.tar.gz external_bluetooth_bluedroid-af7cc1ec86fc440de57a146a2bfa81e567a1303b.tar.bz2 |
Resolved too strict av state check when a2dp datapath is setup
Change-Id: Ibafb405e9aa79d8fbdd716c79e9000102f05f08d
Diffstat (limited to 'btif')
-rw-r--r-- | btif/src/btif_media_task.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/btif/src/btif_media_task.c b/btif/src/btif_media_task.c index b99f4d9..e1ab3cd 100644 --- a/btif/src/btif_media_task.c +++ b/btif/src/btif_media_task.c @@ -470,7 +470,7 @@ static void btif_recv_ctrl_data(void) return; } - APPL_TRACE_EVENT1("a2dp-ctrl-cmd : %s", dump_a2dp_ctrl_event(cmd)); + APPL_TRACE_DEBUG1("a2dp-ctrl-cmd : %s", dump_a2dp_ctrl_event(cmd)); btif_media_cb.a2dp_cmd_pending = cmd; @@ -484,8 +484,8 @@ static void btif_recv_ctrl_data(void) return; } - /* check whether avdtp is ready to start */ - if (btif_av_stream_ready() == TRUE) + /* check whether av is ready to setup a2dp datapath */ + if ((btif_av_stream_ready() == TRUE) || (btif_av_stream_started() == TRUE)) { a2dp_cmd_acknowledge(A2DP_CTRL_ACK_SUCCESS); } @@ -504,14 +504,11 @@ static void btif_recv_ctrl_data(void) /* post start event and wait for audio path to open */ btif_dispatch_sm_event(BTIF_AV_START_STREAM_REQ_EVT, NULL, 0); - - /* don't ack back until we are fully started */ - //a2dp_cmd_acknowledge(A2DP_CTRL_ACK_SUCCESS); - } else if (btif_av_stream_started()) { - /* setup audio data channel listener */ + /* already started, setup audio data channel listener + and ack back immediately */ UIPC_Open(UIPC_CH_ID_AV_AUDIO, btif_a2dp_data_cb); a2dp_cmd_acknowledge(A2DP_CTRL_ACK_SUCCESS); @@ -545,7 +542,7 @@ static void btif_recv_ctrl_data(void) a2dp_cmd_acknowledge(A2DP_CTRL_ACK_FAILURE); break; } - APPL_TRACE_EVENT1("a2dp-ctrl-cmd : %s DONE", dump_a2dp_ctrl_event(cmd)); + APPL_TRACE_DEBUG1("a2dp-ctrl-cmd : %s DONE", dump_a2dp_ctrl_event(cmd)); } static void btif_a2dp_ctrl_cb(tUIPC_CH_ID ch_id, tUIPC_EVENT event) |