From 254588bfe6c3e70625b0f725b908598f30f476c8 Mon Sep 17 00:00:00 2001 From: Mattias Agren Date: Mon, 26 Mar 2012 08:25:00 -0700 Subject: Added new control and data path interface between audioflinger a2dp HAL and stack. Added support for suspend and a dedicated HAL callback notifying framework on audiopath events. Cleanup. Change-Id: I3b738611bc8e1d84794f7207413fd9e7dd1fc668 --- bta/av/bta_av_aact.c | 15 ++++++++++++--- bta/dm/bta_dm_act.c | 0 bta/dm/bta_dm_api.c | 0 bta/dm/bta_dm_int.h | 0 bta/dm/bta_dm_main.c | 0 bta/include/bta_api.h | 0 6 files changed, 12 insertions(+), 3 deletions(-) mode change 100755 => 100644 bta/dm/bta_dm_act.c mode change 100755 => 100644 bta/dm/bta_dm_api.c mode change 100755 => 100644 bta/dm/bta_dm_int.h mode change 100755 => 100644 bta/dm/bta_dm_main.c mode change 100755 => 100644 bta/include/bta_api.h (limited to 'bta') diff --git a/bta/av/bta_av_aact.c b/bta/av/bta_av_aact.c index 423c322..2bcbf01 100644 --- a/bta/av/bta_av_aact.c +++ b/bta/av/bta_av_aact.c @@ -1701,7 +1701,7 @@ void bta_av_do_start (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data) { bta_av_start_ok(p_scb, NULL); } - APPL_TRACE_DEBUG1("role:x%x", p_scb->role); + APPL_TRACE_DEBUG2("started %d role:x%x", p_scb->started, p_scb->role); } /******************************************************************************* @@ -1721,7 +1721,9 @@ void bta_av_str_stopped (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data) BT_HDR *p_buf; UINT8 policy = HCI_ENABLE_SNIFF_MODE; - APPL_TRACE_ERROR1("bta_av_str_stopped:audio_open_cnt=%d", bta_av_cb.audio_open_cnt); + APPL_TRACE_ERROR2("bta_av_str_stopped:audio_open_cnt=%d, p_data %x", + bta_av_cb.audio_open_cnt, p_data); + bta_sys_idle(BTA_ID_AV, bta_av_cb.audio_open_cnt, p_scb->peer_addr); if ((bta_av_cb.features & BTA_AV_FEAT_MASTER) == 0 || bta_av_cb.audio_open_cnt == 1) policy |= HCI_ENABLE_MASTER_SLAVE_SWITCH; @@ -1749,6 +1751,7 @@ void bta_av_str_stopped (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data) suspend_rsp.chnl = p_scb->chnl; suspend_rsp.hndl = p_scb->hndl; + if (p_data && p_data->api_stop.suspend) { APPL_TRACE_DEBUG2("suspending: %d, sup:%d", start, p_scb->suspend_sup); @@ -1768,6 +1771,10 @@ void bta_av_str_stopped (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data) } else { + suspend_rsp.status = BTA_AV_SUCCESS; + suspend_rsp.initiator = TRUE; + APPL_TRACE_EVENT1("bta_av_str_stopped status %d", suspend_rsp.status); + (*bta_av_cb.p_cback)(BTA_AV_STOP_EVT, (tBTA_AV *) &suspend_rsp); } } @@ -2075,7 +2082,9 @@ void bta_av_start_ok (tBTA_AV_SCB *p_scb, tBTA_AV_DATA *p_data) p_scb->p_cos->start(p_scb->hndl, p_scb->codec_type); p_scb->co_started = TRUE; - APPL_TRACE_ERROR2("bta_av_start_ok suspending: %d, role:x%x", suspend, p_scb->role); + APPL_TRACE_DEBUG3("bta_av_start_ok suspending: %d, role:x%x, init %d", + suspend, p_scb->role, initiator); + start.suspending = suspend; start.initiator = initiator; start.chnl = p_scb->chnl; diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c old mode 100755 new mode 100644 diff --git a/bta/dm/bta_dm_api.c b/bta/dm/bta_dm_api.c old mode 100755 new mode 100644 diff --git a/bta/dm/bta_dm_int.h b/bta/dm/bta_dm_int.h old mode 100755 new mode 100644 diff --git a/bta/dm/bta_dm_main.c b/bta/dm/bta_dm_main.c old mode 100755 new mode 100644 diff --git a/bta/include/bta_api.h b/bta/include/bta_api.h old mode 100755 new mode 100644 -- cgit v1.1