summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--Android.mk49
-rw-r--r--conf/asus/grouper/Android.mk14
-rw-r--r--conf/asus/grouper/bt_vendor.conf5
-rw-r--r--conf/meson/Android.mk14
-rw-r--r--conf/meson/bt_vendor.conf5
-rw-r--r--conf/moto/wingray/Android.mk14
-rw-r--r--conf/moto/wingray/bt_vendor.conf5
-rw-r--r--conf/samsung/crespo/Android.mk14
-rw-r--r--conf/samsung/crespo/bt_vendor.conf5
-rw-r--r--conf/samsung/crespo4g/Android.mk14
-rw-r--r--conf/samsung/crespo4g/bt_vendor.conf5
-rw-r--r--conf/samsung/maguro/Android.mk14
-rw-r--r--conf/samsung/maguro/bt_vendor.conf5
-rwxr-xr-xgen-buildcfg.sh25
-rwxr-xr-xinclude/bt_vendor_brcm.h103
-rw-r--r--[-rwxr-xr-x]include/vnd_40183_lpm.txt0
-rw-r--r--include/vnd_angler.txt17
-rw-r--r--include/vnd_anthias.txt10
-rw-r--r--include/vnd_bass.txt16
-rw-r--r--include/vnd_carp.txt14
-rw-r--r--include/vnd_crespo.txt8
-rw-r--r--include/vnd_crespo4g.txt8
-rw-r--r--include/vnd_dory.txt14
-rw-r--r--include/vnd_dragon.txt9
-rw-r--r--include/vnd_flounder.txt10
-rw-r--r--include/vnd_flounder64.txt10
-rw-r--r--include/vnd_flounder_lte.txt10
-rw-r--r--include/vnd_fugu.txt11
-rw-r--r--[-rwxr-xr-x]include/vnd_generic.txt1
-rw-r--r--[-rwxr-xr-x]include/vnd_generic_x86.txt1
-rw-r--r--include/vnd_grouper.txt10
-rw-r--r--include/vnd_hammerhead.txt15
-rw-r--r--include/vnd_lenok.txt16
-rw-r--r--include/vnd_maguro.txt8
-rw-r--r--include/vnd_mako.txt8
-rw-r--r--include/vnd_manta.txt10
-rw-r--r--[-rwxr-xr-x]include/vnd_meson6.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_meson6_lpm.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_meson8.txt0
-rw-r--r--[-rwxr-xr-x]include/vnd_meson8_lpm.txt0
-rw-r--r--include/vnd_nemo.txt16
-rw-r--r--include/vnd_phantasm.txt8
-rw-r--r--include/vnd_puffer.txt15
-rw-r--r--include/vnd_shamu.txt14
-rw-r--r--include/vnd_smelt.txt14
-rw-r--r--include/vnd_sparrow.txt10
-rw-r--r--include/vnd_sprat.txt21
-rw-r--r--include/vnd_stingray.txt8
-rw-r--r--include/vnd_sturgeon.txt14
-rw-r--r--include/vnd_tetra.txt15
-rw-r--r--include/vnd_tilapia.txt10
-rw-r--r--include/vnd_toro.txt9
-rw-r--r--include/vnd_tuna.txt9
-rw-r--r--include/vnd_wingray.txt8
-rw-r--r--include/vnd_wren.txt10
-rwxr-xr-xsrc/bt_vendor_brcm.c23
-rwxr-xr-xsrc/hardware.c543
-rwxr-xr-xsrc/upio.c93
-rwxr-xr-xsrc/userial_vendor.c29
-rwxr-xr-xvnd_buildcfg.mk4
60 files changed, 1223 insertions, 147 deletions
diff --git a/include/bt_vendor_brcm.h b/include/bt_vendor_brcm.h
index b8b693b..545e76e 100755
--- a/include/bt_vendor_brcm.h
+++ b/include/bt_vendor_brcm.h
@@ -56,16 +56,16 @@
/* Device port name where Bluetooth controller attached */
#ifndef BLUETOOTH_UART_DEVICE_PORT
-#define BLUETOOTH_UART_DEVICE_PORT "/dev/ttyS1" /* maguro */
+#define BLUETOOTH_UART_DEVICE_PORT "/dev/ttyO1" /* maguro */
#endif
/* Location of firmware patch files */
#ifndef FW_PATCHFILE_LOCATION
-#define FW_PATCHFILE_LOCATION "/etc/bluetooth/" /* maguro */
+#define FW_PATCHFILE_LOCATION "/vendor/firmware/" /* maguro */
#endif
#ifndef UART_TARGET_BAUD_RATE
-#define UART_TARGET_BAUD_RATE 2000000
+#define UART_TARGET_BAUD_RATE 3000000
#endif
/* The millisecond delay pauses on HCI transport after firmware patches
@@ -79,7 +79,7 @@
* baud.
*/
#ifndef FW_PATCH_SETTLEMENT_DELAY_MS
-#define FW_PATCH_SETTLEMENT_DELAY_MS 200
+#define FW_PATCH_SETTLEMENT_DELAY_MS 0
#endif
/* The Bluetooth Device Aaddress source switch:
@@ -106,7 +106,7 @@
1: UART with Host wake/BT wake out of band signals
*/
#ifndef LPM_SLEEP_MODE
-#define LPM_SLEEP_MODE 0
+#define LPM_SLEEP_MODE 1
#endif
/* Host Stack Idle Threshold in 300ms or 25ms
@@ -202,14 +202,34 @@
#define BT_WAKE_VIA_USERIAL_IOCTL FALSE
#endif
+/* BT_WAKE_USERIAL_LDISC
+
+ Use line discipline if the BT_WAKE control is in line discipline
+*/
+#ifndef BT_WAKE_USERIAL_LDISC
+#define BT_WAKE_USERIAL_LDISC FALSE
+#endif
+
/* BT_WAKE_VIA_PROC
-
+
LPM & BT_WAKE control through PROC nodes
- */
+*/
#ifndef BT_WAKE_VIA_PROC
#define BT_WAKE_VIA_PROC FALSE
#endif
+#ifndef BT_WAKE_VIA_PROC_NOTIFY_DEASSERT
+#define BT_WAKE_VIA_PROC_NOTIFY_DEASSERT FALSE
+#endif
+
+/* N_BRCM_HCI
+
+ UART ioctl line discipline
+*/
+#ifndef N_BRCM_HCI
+#define N_BRCM_HCI 25
+#endif
+
/* SCO_CFG_INCLUDED
Do SCO configuration by default. If the firmware patch had been embedded
@@ -224,9 +244,22 @@
#define SCO_USE_I2S_INTERFACE FALSE
#endif
-#if (SCO_USE_I2S_INTERFACE == TRUE)
#define SCO_I2SPCM_PARAM_SIZE 4
+/* SCO_WBS_SAMPLE_RATE
+ 0 : 8K
+ 1 : 16K
+ 2 : 4K
+ This macro is used for setting WBS sampling rate for a SCO connection
+ If the mobile network supports WBS, we need to use 16KHz as default
+ but if the platform doesn't support 16KHz, the sample rate can be
+ overriden to 8KHz by setting this to 0.
+*/
+#ifndef SCO_WBS_SAMPLE_RATE
+#define SCO_WBS_SAMPLE_RATE 1
+#endif
+
+
/* SCO_I2SPCM_IF_MODE - 0=Disable, 1=Enable */
#ifndef SCO_I2SPCM_IF_MODE
#define SCO_I2SPCM_IF_MODE 1
@@ -258,7 +291,18 @@
#ifndef SCO_I2SPCM_IF_CLOCK_RATE
#define SCO_I2SPCM_IF_CLOCK_RATE 1
#endif
-#endif // SCO_USE_I2S_INTERFACE
+
+/* SCO_I2SPCM_IF_CLOCK_RATE4WBS
+
+ 0 : 128K
+ 1 : 256K
+ 2 : 512K
+ 3 : 1024K
+ 4 : 2048K
+*/
+#ifndef SCO_I2SPCM_IF_CLOCK_RATE4WBS
+#define SCO_I2SPCM_IF_CLOCK_RATE4WBS 2
+#endif
#define SCO_PCM_PARAM_SIZE 5
@@ -276,6 +320,8 @@
/* SCO_PCM_IF_CLOCK_RATE
+ NOTICE: suggested to be consistent with SCO_I2SPCM_IF_CLOCK_RATE
+
0 : 128K
1 : 256K
2 : 512K
@@ -283,22 +329,35 @@
4 : 2048K
*/
#ifndef SCO_PCM_IF_CLOCK_RATE
-#define SCO_PCM_IF_CLOCK_RATE 0
+#define SCO_PCM_IF_CLOCK_RATE 4
#endif
/* SCO_PCM_IF_FRAME_TYPE - 0=Short, 1=Long */
#ifndef SCO_PCM_IF_FRAME_TYPE
-#define SCO_PCM_IF_FRAME_TYPE 1
+#define SCO_PCM_IF_FRAME_TYPE 0
#endif
-/* SCO_PCM_IF_SYNC_MODE - 0=Slave, 1=Master */
+/* SCO_PCM_IF_SYNC_MODE
+
+ NOTICE: in most usage cases the value will be the same as
+ SCO_PCM_IF_CLOCK_MODE setting
+
+ 0 : Slave
+ 1 : Master
+*/
#ifndef SCO_PCM_IF_SYNC_MODE
-#define SCO_PCM_IF_SYNC_MODE 1
+#define SCO_PCM_IF_SYNC_MODE 0
#endif
-/* SCO_PCM_IF_CLOCK_MODE - 0=Slave, 1=Master */
+/* SCO_PCM_IF_CLOCK_MODE
+
+ NOTICE: suggested to be consistent with SCO_I2SPCM_IF_ROLE
+
+ 0 : Slave
+ 1 : Master
+*/
#ifndef SCO_PCM_IF_CLOCK_MODE
-#define SCO_PCM_IF_CLOCK_MODE 1
+#define SCO_PCM_IF_CLOCK_MODE 0
#endif
#define PCM_DATA_FORMAT_PARAM_SIZE 5
@@ -318,7 +377,7 @@
if Fill_Method is set to programmable
*/
#ifndef PCM_DATA_FMT_FILL_BITS
-#define PCM_DATA_FMT_FILL_BITS 3
+#define PCM_DATA_FMT_FILL_BITS 0
#endif
/* PCM_DATA_FMT_FILL_METHOD
@@ -349,11 +408,23 @@
#define PCM_DATA_FMT_JUSTIFY_MODE 0
#endif
+/* HW_END_WITH_HCI_RESET
+
+ Sample code implementation of sending a HCI_RESET command during the epilog
+ process. It calls back to the callers after command complete of HCI_RESET
+ is received.
+*/
+#ifndef HW_END_WITH_HCI_RESET
+#define HW_END_WITH_HCI_RESET TRUE
+#endif
+
/******************************************************************************
** Extern variables and functions
******************************************************************************/
extern bt_vendor_callbacks_t *bt_vendor_cbacks;
+extern int hw_set_audio_state(bt_vendor_op_audio_state_t *p_state);
+
#endif /* BT_VENDOR_BRCM_H */