Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-broadcom-libbt: Commit

hardware/broadcom/libbt


Commit MetaInfo

Revision58e14ce0317a1741f0482a722a4cd25c1af974bd (tree)
Time2013-06-16 23:53:25
Authorravindranath <ravindranathx.doddi@inte...>
CommiterChih-Wei Huang

Log Message

libbt: BT USB support

1. Skip baud rate configuration
2. Read BD Address from device
3. No specific configuration is required for SCO
4. SCO does not use I2S interface

Issue: AXIA-1459
Issue: AXIA-1460
Change-Id: I22a8cdde2b5b2ad11b21e7d1d2578b4323e812b2
Signed-off-by: Ravindranath Doddi <ravindranathx.doddi@wipro.com>

Change Summary

Incremental Difference

--- /dev/null
+++ b/include/vnd_generic_usb.txt
@@ -0,0 +1,8 @@
1+BLUETOOTH_HCI_USE_USB = TRUE
2+USE_CONTROLLER_BDADDR = TRUE
3+SCO_USE_I2S_INTERFACE = FALSE
4+FW_PATCHFILE_LOCATION = "/system/lib/firmware"
5+BTVND_DBG = FALSE
6+BTHW_DBG = TRUE
7+VNDUSERIAL_DBG = FALSE
8+UPIO_DBG = FALSE
--- a/src/hardware.c
+++ b/src/hardware.c
@@ -680,7 +680,11 @@ void hw_config_cback(void *p_mem)
680680
681681 if (is_proceeding == FALSE)
682682 {
683+#if (BLUETOOTH_HCI_USE_USB == TRUE)
684+ is_proceeding = hw_config_read_bdaddr(p_buf);
685+#else
683686 is_proceeding = hw_config_set_bdaddr(p_buf);
687+#endif
684688 }
685689 break;
686690
@@ -732,6 +736,18 @@ void hw_config_cback(void *p_mem)
732736
733737 /* fall through intentionally */
734738 case HW_CFG_START:
739+#if (BLUETOOTH_HCI_USE_USB == TRUE)
740+ /* read local name */
741+ UINT16_TO_STREAM(p, HCI_READ_LOCAL_NAME);
742+ *p = 0; /* parameter length */
743+
744+ p_buf->len = HCI_CMD_PREAMBLE_SIZE;
745+ hw_cfg_cb.state = HW_CFG_READ_LOCAL_NAME;
746+
747+ is_proceeding = bt_vendor_cbacks->xmit_cb(HCI_READ_LOCAL_NAME, \
748+ p_buf, hw_config_cback);
749+ break;
750+#endif
735751 if (UART_TARGET_BAUD_RATE > 3000000)
736752 {
737753 /* set UART clock to 48MHz */
@@ -1124,6 +1140,13 @@ void hw_sco_config(void)
11241140 HC_BT_HDR *p_buf = NULL;
11251141 uint8_t *p, ret;
11261142
1143+#if (BLUETOOTH_HCI_USE_USB == TRUE)
1144+ /* Nothing specific is required for SCO connection, return SUCCESS */
1145+ if (bt_vendor_cbacks)
1146+ bt_vendor_cbacks->scocfg_cb(BT_VND_OP_RESULT_SUCCESS);
1147+ return;
1148+#endif
1149+
11271150 #if (!defined(SCO_USE_I2S_INTERFACE) || (SCO_USE_I2S_INTERFACE == FALSE))
11281151 uint16_t cmd_u16 = HCI_CMD_PREAMBLE_SIZE + SCO_PCM_PARAM_SIZE;
11291152 #else
--- a/vnd_buildcfg.mk
+++ b/vnd_buildcfg.mk
@@ -3,8 +3,12 @@ intermediates := $(local-intermediates-dir)
33 SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix .txt,$(basename $(TARGET_DEVICE))))
44 ifeq (,$(wildcard $(SRC)))
55 # configuration file does not exist. Use default one
6+ifeq ($(BLUETOOTH_HCI_USE_USB), true)
7+SRC := $(call my-dir)/include/vnd_generic_usb.txt
8+else
69 SRC := $(call my-dir)/include/vnd_generic.txt
710 endif
11+endif
812 GEN := $(intermediates)/vnd_buildcfg.h
913 TOOL := $(TOP_DIR)external/bluetooth/bluedroid/tools/gen-buildcfg.sh
1014
Show on old repository browser