OSDN Git Service

Resolved hardware error observed during SCO Connection setup
authorMudumba Ananth <ananthm@broadcom.com>
Wed, 25 Mar 2015 12:20:02 +0000 (05:20 -0700)
committerMudumba Ananth <ananthm@broadcom.com>
Wed, 25 Mar 2015 12:22:55 +0000 (05:22 -0700)
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.

Bug: 19923226
Change-Id: I03c6a1c048c21549b7326a783b70588686283eb3

hci/include/vendor.h
main/bte_main.c

index 6e4c070..3181e62 100644 (file)
@@ -31,7 +31,8 @@ typedef enum {
   VENDOR_OPEN_USERIAL         = BT_VND_OP_USERIAL_OPEN,
   VENDOR_CLOSE_USERIAL        = BT_VND_OP_USERIAL_CLOSE,
   VENDOR_GET_LPM_IDLE_TIMEOUT = BT_VND_OP_GET_LPM_IDLE_TIMEOUT,
-  VENDOR_SET_LPM_WAKE_STATE   = BT_VND_OP_LPM_WAKE_SET_STATE
+  VENDOR_SET_LPM_WAKE_STATE   = BT_VND_OP_LPM_WAKE_SET_STATE,
+  VENDOR_SET_AUDIO_STATE      = BT_VND_OP_SET_AUDIO_STATE
 } vendor_opcode_t;
 
 typedef enum {
index 9343bad..a442101 100755 (executable)
@@ -55,6 +55,7 @@
 #include "osi/include/log.h"
 #include "stack_config.h"
 #include "osi/include/thread.h"
+#include "vendor.h"
 
 /*******************************************************************************
 **  Constants & Macros
@@ -290,7 +291,7 @@ int set_audio_state(UINT16 handle, UINT16 codec, UINT8 state, void *param)
     /* 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);
+    vendor_get_interface()->send_command(VENDOR_SET_AUDIO_STATE, &(p_msg->audio));
     return result;
 }