summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Nagarajan <nravi@broadcom.com>2012-04-09 20:27:13 +0530
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:15 -0700
commit48253de5c3dffcc3884f9c2b349354f9a8acf174 (patch)
tree10cb0a9053a225108e655963fdfc3d8b246cd5b8
parentb5dc70a1f69f8607f28956cf4bbe94e6183e982f (diff)
downloadexternal_bluetooth_bluedroid-48253de5c3dffcc3884f9c2b349354f9a8acf174.zip
external_bluetooth_bluedroid-48253de5c3dffcc3884f9c2b349354f9a8acf174.tar.gz
external_bluetooth_bluedroid-48253de5c3dffcc3884f9c2b349354f9a8acf174.tar.bz2
Fix the SCO routing for crespo. Should use PCM, and clock rate is 128 kBps (0)
Change-Id: Iee2242ea2387bf4006e1afda73e4a9f45e9a69be
-rw-r--r--vendor/libvendor/include/vnd_crespo.txt1
-rw-r--r--vendor/libvendor/src/hardware.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/vendor/libvendor/include/vnd_crespo.txt b/vendor/libvendor/include/vnd_crespo.txt
index 9296738..68f45b3 100644
--- a/vendor/libvendor/include/vnd_crespo.txt
+++ b/vendor/libvendor/include/vnd_crespo.txt
@@ -9,3 +9,4 @@ USERIAL_DBG = TRUE
HCIH4_DBG = TRUE
UPIO_DBG = TRUE
BTSNOOP_DBG = FALSE
+SCO_PCM_IF_CLOCK_RATE = 0
diff --git a/vendor/libvendor/src/hardware.c b/vendor/libvendor/src/hardware.c
index c65caa4..f5865c8 100644
--- a/vendor/libvendor/src/hardware.c
+++ b/vendor/libvendor/src/hardware.c
@@ -226,7 +226,7 @@ static bt_lpm_param_t lpm_param =
LPM_PULSED_HOST_WAKE
};
-#if (SCO_USE_I2S_INTERFACE == FALSE)
+#if (!defined(SCO_USE_I2S_INTERFACE) || (SCO_USE_I2S_INTERFACE == FALSE))
static uint8_t bt_sco_param[SCO_PCM_PARAM_SIZE] =
{
SCO_PCM_ROUTING,
@@ -985,7 +985,7 @@ void hw_sco_cfg_cback(VND_BT_HDR *p_evt_buf)
if (bt_vendor_cbacks)
bt_vendor_cbacks->dealloc((TRANSAC) p_evt_buf, (char *) (p_evt_buf+1));
-#if (SCO_USE_I2S_INTERFACE == FALSE)
+#if (!defined(SCO_USE_I2S_INTERFACE) || (SCO_USE_I2S_INTERFACE == FALSE))
if (opcode == HCI_VSC_WRITE_SCO_PCM_INT_PARAM)
{
uint8_t ret = FALSE;
@@ -1279,7 +1279,7 @@ void hw_sco_config(void)
VND_BT_HDR *p_buf = NULL;
uint8_t *p, ret;
-#if (SCO_USE_I2S_INTERFACE == FALSE)
+#if (!defined(SCO_USE_I2S_INTERFACE) || (SCO_USE_I2S_INTERFACE == FALSE))
uint16_t cmd_u16 = HCI_CMD_PREAMBLE_SIZE + SCO_PCM_PARAM_SIZE;
#else
uint16_t cmd_u16 = HCI_CMD_PREAMBLE_SIZE + SCO_I2SPCM_PARAM_SIZE;
@@ -1296,7 +1296,7 @@ void hw_sco_config(void)
p_buf->len = cmd_u16;
p = (uint8_t *) (p_buf + 1);
-#if (SCO_USE_I2S_INTERFACE == FALSE)
+#if (!defined(SCO_USE_I2S_INTERFACE) || (SCO_USE_I2S_INTERFACE == FALSE))
UINT16_TO_STREAM(p, HCI_VSC_WRITE_SCO_PCM_INT_PARAM);
*p++ = SCO_PCM_PARAM_SIZE;
memcpy(p, &bt_sco_param, SCO_PCM_PARAM_SIZE);