diff options
author | ravindranath <ravindranathx.doddi@intel.com> | 2013-02-22 19:03:06 -0500 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-07-14 00:42:41 +0100 |
commit | 94e39fa0c9a78d302e03461df5c31dee6dccf251 (patch) | |
tree | ca88e20dcf4e627eab3d0059178e3896ce02384e /libbt/src | |
parent | 3fd03785ae85df41b661b1508dc0f6ec60a18f8a (diff) | |
download | device_common-94e39fa0c9a78d302e03461df5c31dee6dccf251.zip device_common-94e39fa0c9a78d302e03461df5c31dee6dccf251.tar.gz device_common-94e39fa0c9a78d302e03461df5c31dee6dccf251.tar.bz2 |
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>
Diffstat (limited to 'libbt/src')
-rw-r--r-- | libbt/src/hardware.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/libbt/src/hardware.c b/libbt/src/hardware.c index bfb1cf7..392704e 100644 --- a/libbt/src/hardware.c +++ b/libbt/src/hardware.c @@ -776,7 +776,11 @@ void hw_config_cback(void *p_mem) if (is_proceeding == FALSE) { - is_proceeding = hw_config_set_bdaddr(p_buf); +#if (BLUETOOTH_HCI_USE_USB == TRUE) + is_proceeding = hw_config_read_bdaddr(p_buf); +#else + is_proceeding = hw_config_set_bdaddr(p_buf); +#endif } break; @@ -832,6 +836,18 @@ void hw_config_cback(void *p_mem) /* fall through intentionally */ case HW_CFG_START: +#if (BLUETOOTH_HCI_USE_USB == TRUE) + /* read local name */ + UINT16_TO_STREAM(p, HCI_READ_LOCAL_NAME); + *p = 0; /* parameter length */ + + p_buf->len = HCI_CMD_PREAMBLE_SIZE; + hw_cfg_cb.state = HW_CFG_READ_LOCAL_NAME; + + is_proceeding = bt_vendor_cbacks->xmit_cb(HCI_READ_LOCAL_NAME, \ + p_buf, hw_config_cback); + break; +#endif if (UART_TARGET_BAUD_RATE > 3000000) { /* set UART clock to 48MHz */ @@ -1224,6 +1240,13 @@ void hw_sco_config(void) HC_BT_HDR *p_buf = NULL; uint8_t *p, ret; +#if (BLUETOOTH_HCI_USE_USB == TRUE) + /* Nothing specific is required for SCO connection, return SUCCESS */ + if (bt_vendor_cbacks) + bt_vendor_cbacks->scocfg_cb(BT_VND_OP_RESULT_SUCCESS); + return; +#endif + #if (!defined(SCO_USE_I2S_INTERFACE) || (SCO_USE_I2S_INTERFACE == FALSE)) uint16_t cmd_u16 = HCI_CMD_PREAMBLE_SIZE + SCO_PCM_PARAM_SIZE; #else |