hardware/broadcom/libbt
Revisión | 58e14ce0317a1741f0482a722a4cd25c1af974bd (tree) |
---|---|
Tiempo | 2013-06-16 23:53:25 |
Autor | ravindranath <ravindranathx.doddi@inte...> |
Commiter | Chih-Wei Huang |
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>
@@ -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 |
@@ -680,7 +680,11 @@ void hw_config_cback(void *p_mem) | ||
680 | 680 | |
681 | 681 | if (is_proceeding == FALSE) |
682 | 682 | { |
683 | +#if (BLUETOOTH_HCI_USE_USB == TRUE) | |
684 | + is_proceeding = hw_config_read_bdaddr(p_buf); | |
685 | +#else | |
683 | 686 | is_proceeding = hw_config_set_bdaddr(p_buf); |
687 | +#endif | |
684 | 688 | } |
685 | 689 | break; |
686 | 690 |
@@ -732,6 +736,18 @@ void hw_config_cback(void *p_mem) | ||
732 | 736 | |
733 | 737 | /* fall through intentionally */ |
734 | 738 | 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 | |
735 | 751 | if (UART_TARGET_BAUD_RATE > 3000000) |
736 | 752 | { |
737 | 753 | /* set UART clock to 48MHz */ |
@@ -1124,6 +1140,13 @@ void hw_sco_config(void) | ||
1124 | 1140 | HC_BT_HDR *p_buf = NULL; |
1125 | 1141 | uint8_t *p, ret; |
1126 | 1142 | |
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 | + | |
1127 | 1150 | #if (!defined(SCO_USE_I2S_INTERFACE) || (SCO_USE_I2S_INTERFACE == FALSE)) |
1128 | 1151 | uint16_t cmd_u16 = HCI_CMD_PREAMBLE_SIZE + SCO_PCM_PARAM_SIZE; |
1129 | 1152 | #else |
@@ -3,8 +3,12 @@ intermediates := $(local-intermediates-dir) | ||
3 | 3 | SRC := $(call my-dir)/include/$(addprefix vnd_, $(addsuffix .txt,$(basename $(TARGET_DEVICE)))) |
4 | 4 | ifeq (,$(wildcard $(SRC))) |
5 | 5 | # 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 | |
6 | 9 | SRC := $(call my-dir)/include/vnd_generic.txt |
7 | 10 | endif |
11 | +endif | |
8 | 12 | GEN := $(intermediates)/vnd_buildcfg.h |
9 | 13 | TOOL := $(TOP_DIR)external/bluetooth/bluedroid/tools/gen-buildcfg.sh |
10 | 14 |