summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorMudumba Ananth <ananthm@broadcom.com>2015-03-25 05:20:02 -0700
committerChris Manton <cmanton@google.com>2015-03-26 11:59:28 -0700
commit6afb248849399cfba59fb1e683a06e31d88e5d1d (patch)
treeaa4805c9bcf9982d3f35de49f22334219d1725cd /main
parentf9fdf890ffe79c934958b56ab9120deb684481ad (diff)
downloadandroid_system_bt-6afb248849399cfba59fb1e683a06e31d88e5d1d.tar.gz
android_system_bt-6afb248849399cfba59fb1e683a06e31d88e5d1d.tar.bz2
android_system_bt-6afb248849399cfba59fb1e683a06e31d88e5d1d.zip
Resolved hardware error observed during SCO Connection setup
Hardware error was caused due to a faulty HCI command formed in the process of vendor specific pre-SCO setup in the stack(set_audio_state) Fixed the above problem and also added back the vendor (interface) mapping for the set_audio_state functionality to facilitate the sending of the pre-SCO vendor specific commands. Made common vendor library audio setting by moving to hci subsystem. General cleanup around this functionality. Bug: 19923226 Change-Id: I4a743f6725459f360bd2a90e0a46f08fcca2292d
Diffstat (limited to 'main')
-rwxr-xr-xmain/bte_main.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/main/bte_main.c b/main/bte_main.c
index 9343bad5c..de62232df 100755
--- a/main/bte_main.c
+++ b/main/bte_main.c
@@ -238,63 +238,6 @@ void bte_main_lpm_wake_bt_device()
}
#endif // HCILP_INCLUDED
-
-/* NOTICE:
- * Definitions for audio state structure, this type needs to match to
- * the bt_vendor_op_audio_state_t type defined in bt_vendor_lib.h
- */
-typedef struct {
- UINT16 handle;
- UINT16 peer_codec;
- UINT16 state;
-} bt_hc_audio_state_t;
-
-struct bt_audio_state_tag {
- BT_HDR hdr;
- bt_hc_audio_state_t audio;
-};
-
-/******************************************************************************
-**
-** Function set_audio_state
-**
-** Description Sets audio state on controller state for SCO (PCM, WBS, FM)
-**
-** Parameters handle: codec related handle for SCO: sco cb idx, unused for
-** codec: BTA_AG_CODEC_MSBC, BTA_AG_CODEC_CSVD or FM codec
-** state: codec state, eg. BTA_AG_CO_AUD_STATE_SETUP
-** param: future extensions, e.g. call-in structure/event.
-**
-** Returns None
-**
-******************************************************************************/
-int set_audio_state(UINT16 handle, UINT16 codec, UINT8 state, void *param)
-{
- struct bt_audio_state_tag *p_msg;
- int result = -1;
-
- APPL_TRACE_API("set_audio_state(handle: %d, codec: 0x%x, state: %d)", handle,
- codec, state);
- if (NULL != param)
- APPL_TRACE_WARNING("set_audio_state() non-null param not supported");
- p_msg = (struct bt_audio_state_tag *)GKI_getbuf(sizeof(*p_msg));
- if (!p_msg)
- return result;
- p_msg->audio.handle = handle;
- p_msg->audio.peer_codec = codec;
- p_msg->audio.state = state;
-
- p_msg->hdr.event = MSG_CTRL_TO_HC_CMD | (MSG_SUB_EVT_MASK & BT_HC_AUDIO_STATE);
- p_msg->hdr.len = sizeof(p_msg->audio);
- p_msg->hdr.offset = 0;
- /* layer_specific shall contain return path event! for BTA events!
- * 0 means no return message is expected. */
- p_msg->hdr.layer_specific = 0;
- hci->transmit_downward(MSG_STACK_TO_HC_HCI_CMD, p_msg);
- return result;
-}
-
-
/******************************************************************************
**
** Function bte_main_hci_send