OSDN Git Service
Jaap Jan Meijer [Tue, 15 Nov 2016 00:58:34 +0000 (01:58 +0100)]
[REVERT ME] Ignore time out for HCI_WRITE_SCAN_ENABLE command
Sometimes the HCI_WRITE_SCAN_ENABLE command times out on HCI USB BT devices but
the device works properly so ignore it for now.
Change-Id: I90518233a689538d9067e7e09fa67347063fbd2a
Jaap Jan Meijer [Mon, 31 Oct 2016 23:37:56 +0000 (00:37 +0100)]
Do not read BLE vendor capability to restore AOSP behaviour
This makes it possible to support multiple device types. Otherwise devices
that do not support this command will cause enabling BT to time out.
This is a combination of 2 commits.
Revert "BT: Fix up device not turning on due to BLE command"
This reverts commit
1a2f814383ffde3cc77e8dbd5d4fa675d1211d04.
Revert "Bluetooth: Read BLE vendor capability to proceed on Secure conn"
This reverts commit
e787d761ab50bae45c15a0c74bf9a43f44e7076c.
Conflicts:
hci/src/hci_layer.c
Change-Id: I71584f538ffe0aee506212ba0a4507586d6964c6
Hashcode [Tue, 8 Nov 2016 00:33:26 +0000 (16:33 -0800)]
bt: Use HCI H4 HAL for BT SOC ATH3K
The Kindle HDX devices use an Atheros SoC for WIFI/BT and previously used the
H4 HCI driver in the system/bt HAL. However, due to CAF commit:
https://github.com/CyanogenMod/android_system_bt/commit/
eb46fdb217ac117b83202d7471199e6042ed18a9
The logic changed from using a BLUETOOTH_HCI_USE_MCT define to instead
looking at BT SOC chip property. Unfortunately, it looks like CAF left
BT_SOC_ATH3K out of the H4 selection check (it's not a common configuration
now in QCOM devices). Adding it to the H4 HAL check fixes bluetooth on
the HDX devices.
Change-Id: Ic8ebfb83627537d71b117dfc83a07e0a1f9f4749
Jaap Jan Meijer [Mon, 31 Oct 2016 22:42:28 +0000 (23:42 +0100)]
Merge remote-tracking branch 'github/cm-14.0' into cm-14.0-x86
Steve Kondik [Tue, 18 Oct 2016 04:41:59 +0000 (21:41 -0700)]
Merge tag 'LA.UM.5.5.r1-00900-8x96.0' of git://codeaurora.org/platform/system/bt into cm-14.0
"LA.UM.5.5.r1-00900-8x96.0"
Linux Build Service Account [Mon, 10 Oct 2016 15:16:40 +0000 (09:16 -0600)]
Merge
f3be84555a575f8ab6089a54df927364231972e3 on remote branch
Change-Id: I7345485ad7aef5b964fdda23a1cc008f536e4ff9
Jaap Jan Meijer [Mon, 10 Oct 2016 10:46:35 +0000 (12:46 +0200)]
[FOR UPSTEAM] Fix Linux libbt-vendor build
Fix enumeration values not explicitly handled in switch;
Fix unused variables;
Fix int64 printf.
Schischu [Sat, 3 May 2014 12:43:52 +0000 (14:43 +0200)]
bt: Add wiimote pairing support
Change-Id: Ie1e9fa445cc1967679f3d74277df4c594fca5330
Chih-Wei Huang [Thu, 6 Oct 2016 16:34:46 +0000 (00:34 +0800)]
Merge remote-tracking branch 'cm/cm-14.0' into cm-14.0-x86
Pavlin Radoslavov [Wed, 18 May 2016 22:22:55 +0000 (15:22 -0700)]
Add a missing OSI_NO_INTR() wrapper around socket read()
Also, print a better error message.
Change-Id: I22da05fd5e9b10a5122705105ea7a45855eb144d
Stefan Stanacar [Mon, 16 May 2016 11:25:39 +0000 (14:25 +0300)]
Add missing include for OSI_NO_INTR
Fixes building bt_vendor_linux since
OSI_NO_INTR is defined in osi.h
Change-Id: Ib95a3126ed4a7b8f0bdc7db3dd2ef162825f2cbe
Signed-off-by: Stefan Stanacar <stefan.stanacar@intel.com>
Cristian Iorga [Tue, 15 Mar 2016 14:33:08 +0000 (16:33 +0200)]
vendor_libs: create Android.mk
all-subdir-makefiles call works for only one
nested sublevels, so we need to add a default
Android.mk in order to be able to build libbt-vendor module.
BUG=
28014054
Change-Id: I7cc004d2a4dd6216a80d13c6384d9dcde328323e
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Cristian Iorga [Wed, 30 Mar 2016 17:14:36 +0000 (20:14 +0300)]
Fix Linux libbt-vendor build
Fix enumeration values not explicitly handled in switch;
Fix the undefined reference to functions from libosi.
Change-Id: I64ab3d57d1c4879ad47ae1a03f8996287877535d
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Steve Kondik [Tue, 4 Oct 2016 23:24:56 +0000 (16:24 -0700)]
Merge tag 'android-7.0.0_r14' of https://android.googlesource.com/platform/system/bt into cm-14.0
Android 7.0.0 Release 14 (NBD90Z)
Change-Id: I634414c79b6cb207d22bb29dfb2854e96ae77e46
Ethan Chen [Mon, 3 Oct 2016 22:39:10 +0000 (15:39 -0700)]
bt: Fix HCI driver selection logic for Qualcomm Bluetooth
* Previously BT_SOC_SMD was the same as BT_SOC_DEFAULT, which
is no longer true.
* The iteration to determine SOC type only worked due to the specific
values of BT_SOC_DEFAULT and BT_SOC_SMD previously. Fix the iteration
to actually check all SOC types.
Change-Id: If282200737099d6587f3dc6fcd0a7e70b93996cb
Linux Build Service Account [Mon, 3 Oct 2016 18:14:07 +0000 (12:14 -0600)]
Promotion of bt.lnx.2.1-00018.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1066335 Ic96205b5c304acb44eab53f4e2cb150726643bda BT: Serialize stack shutdown, state change callback and
1063890 I9afb5fec10a23725126e472c84b573dcdeacbfe0 BT: Calling HCI reset when Hardware error event occurs
1066796 I29bb6ae17dc5a83459cc5cd4c8cfc6ae59bb4504 GAP : PIN popup shown for dead legacy remotes
1070434 Ib4e8494270cea976d4549e903e78ec8b3398ec39 BT: Changing l2cap sock mutex lock type to static.
1071866 Bluetooth: split-a2dp: APTx-HD support
1068541 Ic3be9669c7cad52e0282a9947313659ef9056a02 Update Interop datatbase to prevent preferred conn updat
Change-Id: Idfe2fb86d32554d9f3ec4582d0f8611655e6a203
CRs-Fixed:
1066796,
1071866,
1070434,
1068541,
1063890,
1066335
Zhao Wei Liew [Sun, 25 Sep 2016 02:54:34 +0000 (10:54 +0800)]
bt: Select H4 HCI driver when QC bluetooth prop is unset
This restores the default AOSP behaviour, which also happens
to be the behaviour we had in CM 13.
Change-Id: I5a23575467fa0f823f0d778b7cf127ad1565916e
Linux Build Service Account [Mon, 3 Oct 2016 10:00:43 +0000 (03:00 -0700)]
Merge "BT: Changing l2cap sock mutex lock type to static." into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 3 Oct 2016 10:00:42 +0000 (03:00 -0700)]
Merge "BT: Serialize stack shutdown, state change callback and cleanup" into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 3 Oct 2016 10:00:42 +0000 (03:00 -0700)]
Merge "BT: Calling HCI reset when Hardware error event occurs" into bt.lnx.2.1-dev
Venkata Jagadeesh Garaga [Wed, 14 Sep 2016 10:33:29 +0000 (16:03 +0530)]
GAP : PIN popup shown for dead legacy remotes
When repairing initiated for legcay remotes pin popup
shown even remote is not in page mode.
As dev record sm4 flag not reset during unpair,pin pop
up shown in UI based on prev sm4.
Change-Id: I29bb6ae17dc5a83459cc5cd4c8cfc6ae59bb4504
CRs-Fixed:
1066796
Linux Build Service Account [Mon, 3 Oct 2016 09:36:45 +0000 (02:36 -0700)]
Merge "Update Interop datatbase to prevent preferred conn updates" into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 3 Oct 2016 09:36:39 +0000 (02:36 -0700)]
Merge "Bluetooth: split-a2dp: APTx-HD support" into bt.lnx.2.1-dev
Ivan Ivanich [Sat, 1 Oct 2016 18:34:30 +0000 (11:34 -0700)]
Revert "Fix the command timeout issue with TX idle timer"
This reverts commit
5a234ca06c185f336a6398efe09f78c4d0dacf0b.
Change-Id: I2cec99e8cc119a9f8142f7370db1d4e1ff880e97
Linux Build Service Account [Sat, 1 Oct 2016 15:26:06 +0000 (09:26 -0600)]
Promotion of bt.lnx.2.1-00017.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1060064 I4dca2b13f5eea4d51117bf7041f7816ba2dcdb1c Do not set uid_set to NULL in RFCOMM layer
1059643 Ib5040d8ca27cecd43cba12b3fca3383cefa9e9fe Add Gatt listen and adv mode support for Gatt Certificat
Change-Id: I7e2327c2b622d5b3bbbdb9160870f07f6896db64
CRs-Fixed:
1059643,
1060064
Bandari Ramesh [Mon, 26 Sep 2016 14:13:24 +0000 (19:43 +0530)]
BT: Calling HCI reset when Hardware error event occurs
Use Case: During SSR cleanup.
Failure: Crash in Bluetooth process while turning off Bluetooth
Root Cause: In HW error event, controller module was being started
which sends various hci commands. It Is happening during the
shutdown path, hci commands sent by controller initialization causes
crash as hci queue is cleared.
Fix: Sending HCI reset command instead of starting controller
module as part of HW error event.
Change-Id: I9afb5fec10a23725126e472c84b573dcdeacbfe0
CRs-Fixed:
1063890
Steve Kondik [Thu, 29 Sep 2016 12:43:07 +0000 (05:43 -0700)]
Merge branch 'bt.lnx.2.1.r5-rel' of git://codeaurora.org/platform/system/bt into cm-14.0
Change-Id: I149f61cfa37c4930d54f6451aaff4405936daa8b
Linux Build Service Account [Thu, 29 Sep 2016 12:36:26 +0000 (05:36 -0700)]
Merge "Do not set uid_set to NULL in RFCOMM layer" into bt.lnx.2.1-dev
Linux Build Service Account [Wed, 28 Sep 2016 10:20:11 +0000 (03:20 -0700)]
Promotion of bt.lnx.2.1-00015.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1050999 Idf8e2bebdc2ca7621aef06dd5f2075ef2c5fa08c Bluetooth: Set alarm's queue to NULL on alarm expired
1070444 Ie5b8b89b5d499e999167ad599fa587cea5dde2e7 GAP: Host sending two sdp req during legacy pairing
1063748 1069656 Iba694e2547abc8e6161997cd136064fe3a411abc aptXHD codec support
1069198 I4a2e429484378d23c996caffb6495407793548d2 SDP: Crash in sdp due to invalid length
Change-Id: I2d4755c678374e1233d3663262894780b25f3340
CRs-Fixed:
1069656,
1050999,
1070444,
1063748,
1069198
Satish kumar sugasi [Sat, 20 Jun 2015 00:35:49 +0000 (17:35 -0700)]
Add Gatt listen and adv mode support for Gatt Certification
Modifies single instance advertisements using gatt listen api and
logic to support differnt advertisement modes.
Change-Id: I9629b2ea03fcefd39702ab2ae6869a4cdebbab83
Modifies Gatt listen to add support for non-connectable adv mode
changes for qualification to do non-connectable advertisement
Change-Id: I26db3040a94edd9742a6c07b430e3ef285c864f6
Add config option to enable LE non-connectable adv mode
This is needed for LE certification test case where LE non-con
nectable advertisement is supported. added runtime config option
to enable this mode, by default in stack this will be off.
Change-Id: Ib5040d8ca27cecd43cba12b3fca3383cefa9e9fe
Bhakthavatsala Raghavendra [Fri, 23 Sep 2016 21:54:42 +0000 (14:54 -0700)]
Bluetooth: split-a2dp: APTx-HD support
Add APTx-HD support in split-a2dp mode
Linux Build Service Account [Tue, 27 Sep 2016 14:57:10 +0000 (07:57 -0700)]
Merge "GAP: Host sending two sdp req during legacy pairing" into bt.lnx.2.1-dev
Linux Build Service Account [Tue, 27 Sep 2016 14:57:10 +0000 (07:57 -0700)]
Merge "SDP: Crash in sdp due to invalid length" into bt.lnx.2.1-dev
Linux Build Service Account [Tue, 27 Sep 2016 14:57:06 +0000 (07:57 -0700)]
Merge "Bluetooth: Set alarm's queue to NULL on alarm expired" into bt.lnx.2.1-dev
Rupesh Tatiya [Mon, 26 Sep 2016 09:59:36 +0000 (15:29 +0530)]
Do not set uid_set to NULL in RFCOMM layer
The resource is created and freed at BTIF layer. Align this code with
L2CAP layer.
CRs-Fixed:
1060064
Change-Id: I4dca2b13f5eea4d51117bf7041f7816ba2dcdb1c
Linux Build Service Account [Fri, 23 Sep 2016 10:43:23 +0000 (04:43 -0600)]
Promotion of bt.lnx.2.1-00014.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1064374 I538e38c4fef81a1210a015b0fc89b9772fc5c288 Fixes for Errors reported by Static Analysis Tool.
Change-Id: I553e207603974797e1e76157cea2fc085608f26f
CRs-Fixed:
1064374
Gurpreet Ghai [Tue, 20 Sep 2016 13:39:03 +0000 (19:09 +0530)]
BT: Changing l2cap sock mutex lock type to static.
Use Case: Bluetooth On/Off scenario, User switch
Steps:
1. Turn ON Bluetooth
2. Switch user
Failure: ANR occurs after switching user.
Root Cause: During user switch, because of unsynchronized state
change event and state change broadcast, all l2cap sockets are
not closed during bredr shutdown. When server close happens after
l2cap sock cleanup, it gets stuck while waiting for mutex which
is destroyed while l2cap sock cleanup.
Fix: Changed the l2cap sock mutex type to static as some functions
using it can be called after l2cap sock cleanup.
CRs-Fixed:
1070434
Change-Id: Ib4e8494270cea976d4549e903e78ec8b3398ec39
Gurpreet Ghai [Mon, 12 Sep 2016 12:06:53 +0000 (17:36 +0530)]
BT: Serialize stack shutdown, state change callback and cleanup
Use Case: Bluetooth On/Off scenario, User switch
Steps:
1. Turn ON Bluetooth
2. Switch user
Also observed on occurrence of enable/disable timeout during On/Off testing.
Failure: Crash while sending state change HAL callback.
Root Cause: In the event when stack cleanup is queued to stack manager
thread when stack shutdown is being processed, stack cleanup starts
execution as soon as stack shutdown is finished.
If the function event_signal_stack_down posted to btif thread at the
end of stack shutdown is executed after stack cleanup crash occurs.
Fix: Serialized the execution of stack shutdown, state change callback
execution and stack cleanup to happen in same order.
CRs-Fixed:
1066335
Change-Id: Ic96205b5c304acb44eab53f4e2cb150726643bda
Venkata Jagadeesh Garaga [Mon, 12 Sep 2016 13:24:42 +0000 (18:54 +0530)]
GAP: Host sending two sdp req during legacy pairing
Host sends sdp req from l2cap closed state without
info res from remote,and one more sdp req triggered
after info rsp from remote.
Hence host went to bad state and not responding to
sdp response from remote
Don't allow sdp req without info rsp from l2cap
closed state to fix this issue
Change-Id: Ie5b8b89b5d499e999167ad599fa587cea5dde2e7
CRs-Fixed:
1070444
Linux Build Service Account [Thu, 22 Sep 2016 12:23:38 +0000 (05:23 -0700)]
Merge
5a0ac00f886e075518eab9f0aec50aa61661b4d4 on remote branch
Change-Id: Iba010a68fa2a47cb4b11915043d9e00b164e999b
Umesh Vats [Fri, 2 Sep 2016 21:19:08 +0000 (14:19 -0700)]
aptXHD codec support
Feature support for aptXHD codec negotiation for a2dp streaming
added
Change-Id: Iba694e2547abc8e6161997cd136064fe3a411abc
Satheesh Kumar Pallemoni [Thu, 8 Sep 2016 05:50:22 +0000 (11:20 +0530)]
Fixes for Errors reported by Static Analysis Tool.
Fixes for Errors reported by Static Analysis Tool.
CRs-Fixed:
1064374
Change-Id: I538e38c4fef81a1210a015b0fc89b9772fc5c288
Linux Build Service Account [Wed, 21 Sep 2016 10:32:20 +0000 (03:32 -0700)]
Promotion of bt.lnx.2.1-00013.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1059557 If72fb066ad984ba4acfe63d1fc3f0453ad6e7588 Split A2p: Fix for stream failure in remote initiated co
1008733 I174b0c44cdef8b5d174a2e39fa34fefc55d4807b Bluetooth: Add AAC codec Support in Split-a2dp mode
1058210 I9c0fc2b9725d6bb6336e9d5cb549104799723ff8 For false A2DPSuspend only change A2DP state to standy
1052605 I242dc42868dee7c27bd778dabbfe1dc06de1a93f Bluetooth: Handle sink cleanup gracefully
Change-Id: Iedffc98ce6294b7d2b9b7db507463d55b0ed77f5
CRs-Fixed:
1059557,
1052605,
1058210,
1008733
Venkata Jagadeesh Garaga [Thu, 15 Sep 2016 10:21:40 +0000 (15:51 +0530)]
SDP: Crash in sdp due to invalid length
Crashed in memcpy as there is no boundary check
for copy length and length exceeds the allocated
buffer size.
Align copy length with source buffer offset
so that copy length will be in boundary of the
allocated buffer size
Change-Id: I4a2e429484378d23c996caffb6495407793548d2
CRs-Fixed:
1069198
Linux Build Service Account [Tue, 20 Sep 2016 07:08:41 +0000 (00:08 -0700)]
Merge "For false A2DPSuspend only change A2DP state to standy" into bt.lnx.2.1-dev
Nitin Arora [Tue, 13 Sep 2016 00:58:21 +0000 (17:58 -0700)]
Update Interop datatbase to prevent preferred conn updates
This patch prevents specific devices from being sent the
connection updated based on the device's preferred connection
updates as indicated by the "Peripheral preferred connection
parameters" characteristic.
CRs-Fixed:
1068541
Change-Id: Ic3be9669c7cad52e0282a9947313659ef9056a02
Kamal Negi [Mon, 19 Sep 2016 08:46:56 +0000 (14:16 +0530)]
Bluetooth: Set alarm's queue to NULL on alarm expired
For non-periodic alarms, set alarm's queue to NULL once alarm
expired. If alarm is not set again after expiry and shutdown happens in
parallel, queue on which alarm set is freed and we eventually try
to take lock on destroyed queue's mutex, resulting in ANR.
CRs-Fixed:
1050999
Change-Id: Idf8e2bebdc2ca7621aef06dd5f2075ef2c5fa08c
Bhakthavatsala Raghavendra [Sat, 30 Jul 2016 02:11:28 +0000 (19:11 -0700)]
Bluetooth: Add AAC codec Support in Split-a2dp mode
Add AAC codec support in split-a2dp mode
Change-Id: I174b0c44cdef8b5d174a2e39fa34fefc55d4807b
Linux Build Service Account [Thu, 15 Sep 2016 22:33:56 +0000 (15:33 -0700)]
Promotion of bt.lnx.2.1-00012.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1055999 I827a0d3e4d31e58b3e508d844b714d5059aeb462 A2DP: Check pending a2dp ctrl cmd
1048502 I8e41d118d1334db39f26eea730b6a6c8e2486c3a Enbale Audio track for user builds
1065659 Ie8b1c060687a7c677dda1ab6b886ff91326d5b89 BT: Updating bt_config on local adapter property change
1065123 Ia3dfb3b4846b8c47980a502d474c349c34b8439b GAP: Accept incoming connection as slave
Change-Id: I82b0e6dcfa3b2ef8d3f3c52d1bdb03382defba2c
CRs-Fixed:
1065659,
1055999,
1048502,
1065123
Venkateshwarlu Domakonda [Fri, 12 Aug 2016 10:31:31 +0000 (16:01 +0530)]
Bluetooth: Handle sink cleanup gracefully
Cleanup the SM during turn off.
Change-Id: I242dc42868dee7c27bd778dabbfe1dc06de1a93f
Linux Build Service Account [Thu, 15 Sep 2016 14:28:39 +0000 (07:28 -0700)]
Merge "Split A2p: Fix for stream failure in remote initiated connection" into bt.lnx.2.1-dev
Linux Build Service Account [Thu, 15 Sep 2016 10:53:58 +0000 (03:53 -0700)]
Merge "GAP: Accept incoming connection as slave" into bt.lnx.2.1-dev
Linux Build Service Account [Thu, 15 Sep 2016 03:00:15 +0000 (20:00 -0700)]
Merge "BT: Updating bt_config on local adapter property change" into bt.lnx.2.1-dev
Linux Build Service Account [Thu, 15 Sep 2016 03:00:13 +0000 (20:00 -0700)]
Merge "Enbale Audio track for user builds" into bt.lnx.2.1-dev
Pramod Sivaraman [Fri, 9 Sep 2016 05:23:50 +0000 (10:53 +0530)]
GAP: Accept incoming connection as slave
Accepting the incoming connection with DUT in slave role
as some remotes can not establish connections in slave role
and incoming connection always fails with these remotes.
Change-Id: Ia3dfb3b4846b8c47980a502d474c349c34b8439b
CRs-Fixed:
1065123
Sagar Verma [Mon, 22 Aug 2016 12:28:38 +0000 (17:58 +0530)]
For false A2DPSuspend only change A2DP state to standy
Allow going to standby only for key A2DPSuspend false value.
CRs-Fixed:
1058210
Change-Id: I9c0fc2b9725d6bb6336e9d5cb549104799723ff8
William Bellavance [Wed, 31 Aug 2016 11:34:46 +0000 (07:34 -0400)]
BT: Fix up defines
Change-Id: I5218e78e0220a97993cedacd8f1994c2f4012706
Luke Zhang [Fri, 6 Nov 2015 02:23:07 +0000 (18:23 -0800)]
Fix the command timeout issue with TX idle timer
Start the idle timer after sending out each command to prevent power
collapse.
CRs-fixed:926763
Change-Id: I98e649fa40a4622e3c6bce4ea5c53d51e25413b3
Shantur Rathore [Sun, 21 Feb 2016 20:39:08 +0000 (20:39 +0000)]
l2cap: Set transport even if BLE_INCLUDED = FALSE
transport is checked in code later even when BLE_INCLUDED = FALSE
Fixes pairing and connection in old non BLE devices
Change-Id: I6eaaad1242e943835b6e040687562801451cfc2a
William Bellavance [Wed, 30 Dec 2015 01:19:55 +0000 (20:19 -0500)]
BT: Fix up device not turning on due to BLE command
Change-Id: I5ba237e5d1ab920179143e1652aee6384670f6f6
Cal Archer [Sun, 17 Jul 2016 19:11:30 +0000 (21:11 +0200)]
Bluetooth: fix stuttering audio
commit
2772d76990d8424ef3c629dba164fc7111b37db3 caused
a regression in A2DP for Broadcom Bluetooth chipsets
by not sending the HCI_BRCM_SET_ACL_PRIORITY command.
Change this logic so the ACL priority adjustment occurs
unconditionally for non-Broadcom chipsets only.
Reproduction steps: Entering Bluetooth settings which
triggers inquiry and makes the device discoverable while
simultaneously using 2.4GHz WiFi.
Change-Id: Ic40dc8d66ae30c71e0ddf1a2eaeb19fee1e87ecb
Ricardo Cerqueira [Fri, 15 Apr 2016 15:18:06 +0000 (16:18 +0100)]
bt-vendor: Fix sporadic crashes on shutdown
The core was unconditionally calling a vendor method that few
implementations have. Don't do that, it's evil.
Change-Id: I96df83760fd07805de37832f7ee315ee1f721948
Steve Kondik [Sun, 24 Jan 2016 07:07:07 +0000 (23:07 -0800)]
bluetooth: Check legacy location for NV file
* This location differs between BSP releases. Check both.
Change-Id: Id5838518e4ae5701ebc95b4dd67826aaea78936b
Aaron Kling [Wed, 6 Jan 2016 19:48:26 +0000 (13:48 -0600)]
bt: Enable Bluedroid debugging only on eng.
Debugging enables memory allocation tracking and audio track usage,
which does not need to be enabled on most end user devices.
Change-Id: I8848d37cc2d6d4e080118882bb4be55d6e731922
Arne Coucheron [Tue, 22 Dec 2015 01:40:00 +0000 (02:40 +0100)]
btsnoop: Enable snoop logging by default only on eng builds
* It can be enabled otherwise in developer settings if needed.
Change-Id: Ib504d912114991eae96704329237356b53486d2d
Markus Schmidt [Mon, 17 Dec 2012 17:30:07 +0000 (18:30 +0100)]
Bluetooth losing HF connection to car-kit after 5 seconds
This patch adresses a change in bluetooth which causes a possible
loss of connection within 5 seconds after connecting. This new
behavior appeared with android 4.2 (4.1.2 worked fine in this regard).
I traced down the disconnects to an BTA_AG_SVC_TOUT_EVT via a timer
that checks if a service connection was made within a few seconds.
Essentially bta_ag_svc_conn_open() was not called on AT+CMER because
android thought the car kit supported 3WAY but the car kit did not
set the 3WAY flag via AT commands and did not send AT+CHLD either.
Android otoh used the flag obtained by SDP and expected 3WAY behavior
and eventually disconnected when AT+CHLD did not arrive.
This may be a bordeline case, because in the Bluetooth Specification
(page 20), assuming service level initialization via SDP is only
mentioned on the HF side while there is no such mention (but could
probably be implied) on page 21 for the AG.
Fact is however, that the use of SDP features value for peer_features
is new since Android 4.2 and breaks existing good behavior on a BMW
2005/E46 car kit (navi professional). This kit never asks for AT+CHLD
and never via AT commands suggests it supports 3WAY (although it seems
to have the flag set via SDP).
Also, having essential behavior (like making the connection or not)
depend on circumstances that may be prone to race conditions, may be
a good reason to not use the SDP flag also (or at least masking out
the 3WAY bit when using it).
(An alternative approach could be to hook into bta_ag_timer_cback() and
when the timer exipres, but when also AT+CMER has been seen meanwhile,
to continue and assume a service level connection without 3WAY,
i.e. clearing the 3-way flags but calling bta_ag_svc_conn_open() anyway.)
Change-Id: I95dcdc5f46e7af723a655afd3d707764603c96c3
Signed-off-by: Markus Schmidt <shimodax@gmail.com>
(cherry picked from commit
662eaddd47bca1de03018fbcbe57ca2bfabaa5ac)
Steve Kondik [Fri, 19 Dec 2014 07:34:55 +0000 (23:34 -0800)]
bluedroid: Disable the test interface
* Not needed unless running cert tests
Change-Id: I8f34e76cd4090be2d9606b596fa5ee590b44fecb
Steve Kondik [Fri, 2 Aug 2013 07:54:23 +0000 (00:54 -0700)]
Add I2S-PCM slave mode for SCO
* M7 needs us to configure I2SPCM for SCO and set the voice mode.
Change-Id: I98a9528af62f9c4fef075927f00a8aafdbeb4ee3
Steve Kondik [Sun, 9 Nov 2014 21:02:33 +0000 (13:02 -0800)]
bluedroid: Disable BLUETOOTH_QTI_SW by default
* Enable this for extended QC features.
Change-Id: Ib2133d41df433ff4380d0ae6e8fdc4a69d750a04
Christopher R. Palmer [Sun, 22 Nov 2015 12:28:07 +0000 (07:28 -0500)]
bt: Kill some logspam
Change-Id: I652684441160e2f5e806a7053ab9b574b2998356
Danny Baumann [Thu, 8 Sep 2016 13:16:59 +0000 (15:16 +0200)]
Revert "Bluetooth : Handled Cert tools new timer permissio issue"
The wakeup timer is set with values derived from the alarm deadline,
which in turn is populated with values from CLOCK_ID (= CLOCK_BOOTTIME).
Comparing wall time and time since boot is not a good idea and will lead
to 100% CPU load due to the timer being immediately re-fired.
This reverts commit
7643de5a67608ef0d3f62c277af950ca9e0eaf2e.
Change-Id: Ic2a9a6e0ea9a81aa14a82357ab5c0ddf219ca655
Linux Build Service Account [Mon, 12 Sep 2016 18:19:35 +0000 (11:19 -0700)]
Promotion of bt.lnx.2.1-00010.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1061959 I5db80fb18c678b0240faddb16d22b7d95c93e3e2 API changes in aptX schduler library
1049734 Ia9eda43128ab44c0d46b61ee035d2d9c5109da05 Bluetooth: Add bdt tool to support test in FFBM mode
1035137 1052242 I0628635db900022d89dc57fdba354ae69896f0f4 Added Remote Device BD address to Outgoing role switch b
980885 I8bcb3ad6aaf6bf5ce25495fce4f34efc6150d86a Fixed the racing problem between HAL_CBACK and cleanup f
1061313 I96cd6756053e5edb45cf3589a527ebe8062405f4 aptX supported needs to be checked during initialization
1055649 I6ac51b24b9fda01726cdc3b43346194d2495f8f0 GAP: Handle JV sys busy/idle properly in OPP TX/RX
1059789 I94ddb964d09e6a588cc254ba39e85817b011651c Bluetooth : Accept incoming connection as slave
Change-Id: Iecc3e44168b219f7e3e0e3ef52d451e947471f61
CRs-Fixed: 980885,
1059789,
1061313,
1035137,
1052242,
1061959,
1055649,
1049734
pramod kotreshappa [Thu, 25 Aug 2016 22:10:22 +0000 (15:10 -0700)]
Split A2p: Fix for stream failure in remote initiated connection
Some carkits and HS send avdtp start soon after a2dp connection.
Dut will start VSC config exchange, but soon after avdtp start is
received from the remote DUT sends suspend request. This fix will
handle this scenario by addition split a2dp flag checks and
resetting the config flag when stream suspend is initiated in the
middle of VSC exchange
Change-Id: If72fb066ad984ba4acfe63d1fc3f0453ad6e7588
Linux Build Service Account [Mon, 12 Sep 2016 17:41:18 +0000 (10:41 -0700)]
Merge "A2DP: Check pending a2dp ctrl cmd" into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 12 Sep 2016 14:49:37 +0000 (08:49 -0600)]
Merge
7c8f2b2c8c57e0a6d109cfd8e525e7bdab1e26b1 on remote branch
Change-Id: I1a0305cd5772dbaf5990d111e99e2d31d9810f22
Linux Build Service Account [Mon, 12 Sep 2016 12:26:37 +0000 (05:26 -0700)]
Merge "Bluetooth: Add bdt tool to support test in FFBM mode" into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 12 Sep 2016 12:26:34 +0000 (05:26 -0700)]
Merge "Bluetooth : Accept incoming connection as slave" into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 12 Sep 2016 12:26:34 +0000 (05:26 -0700)]
Merge "Fixed the racing problem between HAL_CBACK and cleanup function" into bt.lnx.2.1-dev
Bandari Ramesh [Thu, 8 Sep 2016 06:51:48 +0000 (12:21 +0530)]
BT: Updating bt_config on local adapter property change
- Added condition to write local adapter property
changes to bt_config.conf file to take immediate
effect
Change-Id: Ie8b1c060687a7c677dda1ab6b886ff91326d5b89
CRs-Fixed:
1065659
pramod kotreshappa [Tue, 16 Aug 2016 01:35:07 +0000 (18:35 -0700)]
A2DP: Check pending a2dp ctrl cmd
Fix for unknown codec format returned from stack during
a2dp reconfig.
Change-Id: I827a0d3e4d31e58b3e508d844b714d5059aeb462
zhenchao [Wed, 7 Sep 2016 11:09:32 +0000 (19:09 +0800)]
Bluetooth: Add bdt tool to support test in FFBM mode
BT run failed in FFBM mode because can not find
/system/bin/bdt.
Change-Id: Ia9eda43128ab44c0d46b61ee035d2d9c5109da05
CRs-Fixed:
1049734
Linux Build Service Account [Fri, 9 Sep 2016 02:31:30 +0000 (19:31 -0700)]
Merge "GAP: Handle JV sys busy/idle properly in OPP TX/RX" into bt.lnx.2.1-dev
Luke Zhang [Sat, 27 Feb 2016 01:23:21 +0000 (17:23 -0800)]
Fixed the racing problem between HAL_CBACK and cleanup function
In btif_rc, we saw a racing problem when HAL_CBACK and cleanup
of bt_rc_callbacks are done simultaneously. The solution is to
avoid delete bt_rc_callbacks directly, instead send a message to
btif_rc thread and let this thread handle the messages sequentially.
CRs-fixed: 980885
Change-Id: I8bcb3ad6aaf6bf5ce25495fce4f34efc6150d86a
Arne Coucheron [Thu, 8 Sep 2016 05:01:12 +0000 (07:01 +0200)]
A2DP: Disable BT_HOST_IPC_ENABLED and fix build
Change-Id: I48f0d89bbb17cdb55ff655c8527917fd9f4e3a82
Linux Build Service Account [Wed, 7 Sep 2016 14:40:51 +0000 (07:40 -0700)]
Merge "API changes in aptX schduler library" into bt.lnx.2.1-dev
Linux Build Service Account [Wed, 7 Sep 2016 14:40:50 +0000 (07:40 -0700)]
Merge "aptX supported needs to be checked during initialization" into bt.lnx.2.1-dev
Venkata Ramana Rao K [Tue, 16 Aug 2016 14:11:31 +0000 (19:41 +0530)]
Bluetooth : Accept incoming connection as slave
Accepting the incoming connection with DUT in slave role
as some remotes can not establish connections in slave role
and incoming connetcion always fails with these remotes.
Change-Id: I94ddb964d09e6a588cc254ba39e85817b011651c
CRs-Fixed:
1059789
Linux Build Service Account [Wed, 7 Sep 2016 05:37:51 +0000 (23:37 -0600)]
Promotion of bt.lnx.2.1-00007.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1059193 I8deca0c8ff73faafc3da94dcd9ea55e06bd8a31d Just clear IB_CFG_DONE on receiving Peer config request
1055289 Ifdb15c93d2a648bb04da0e9dd7b8949d12270685 Bluetooth : GAP : Add boot timer permission for Cert too
904958 I6160ae04c1905645e9624bf4ecc3a7c945e3bb20 Bluetooth: KW fix for gatt test tool memory failure
1008846 Id953cb811107d1cc0ccaa3683027d61fdfa90fb9 Bluetooth: Fix DUT cannot ccnnect remote headset BT off/
1060313 I1bf50a424d86ac53a5201fff742c822f4c8d1c0b Dequeues direct connection request during cancel conn op
Change-Id: I5e84061801fb231184d733961991bd26209ad92e
CRs-Fixed:
1060313, 904958,
1008846,
1059193,
1055289
Umesh Vats [Thu, 1 Sep 2016 00:29:42 +0000 (17:29 -0700)]
API changes in aptX schduler library
An API, apx_scheduler_start(), has been modified for the aptX
scheduler library. Two new parameters are added:
is_audio_24bit
mtuSize
Changes are done to take care of same.
Change-Id: I5db80fb18c678b0240faddb16d22b7d95c93e3e2
CRs-Fixed:
1061959
Umesh Vats [Tue, 26 Jul 2016 20:33:42 +0000 (13:33 -0700)]
aptX supported needs to be checked during initialization
Currently aptX support is checked when a connection is initiated
from the DUT. Now changes done so that its checked during AV
initialization. This will make sure that we don't adverstize aptX
to remote HS unless its really enabled
Change-Id: I4f1312fc88fa903bdae83a95fdda9e0cfa6bf7ea
A2dp: Check offload capability during a2dp init.
Check offload capability before populating SEPs.
Change-Id: I96cd6756053e5edb45cf3589a527ebe8062405f4
Satheesh Kumar Pallemoni [Tue, 9 Aug 2016 14:48:15 +0000 (20:18 +0530)]
Added Remote Device BD address to Outgoing role switch blacklist
Added Remote Device BD address to Outgoing role switch blacklist.
Don't initiate role switch for blacklisted remotes from DUT.
CRs-Fixed:
1052242
Change-Id: I0628635db900022d89dc57fdba354ae69896f0f4
Venkateshwarlu Domakonda [Mon, 1 Aug 2016 05:40:40 +0000 (11:10 +0530)]
Enbale Audio track for user builds
Enabled the audio track flag for user builds as well.
Change-Id: I8e41d118d1334db39f26eea730b6a6c8e2486c3a
CRs-Fixed:
1048502
Linux Build Service Account [Tue, 6 Sep 2016 07:21:02 +0000 (00:21 -0700)]
Merge "Dequeues direct connection request during cancel conn operation" into bt.lnx.2.1-dev
Linux Build Service Account [Tue, 6 Sep 2016 07:03:55 +0000 (00:03 -0700)]
Merge "Bluetooth : GAP : Add boot timer permission for Cert tools" into bt.lnx.2.1-dev
Venkata Jagadeesh Garaga [Fri, 26 Aug 2016 11:50:59 +0000 (17:20 +0530)]
GAP: Handle JV sys busy/idle properly in OPP TX/RX
Handle JV power manager sys busy and sys idle
properly in OPP TX/RX scenario
Start/restart 1 sec timer on JV sys idle and stop
sniff timer/1 sec timer on JV sys busy to align with
default sniff behavior.
Change-Id: I6ac51b24b9fda01726cdc3b43346194d2495f8f0
CRs-Fixed:
1055649
juncao [Mon, 25 Apr 2016 06:58:54 +0000 (14:58 +0800)]
Bluetooth: Fix DUT cannot ccnnect remote headset BT off/ON
When DUT try to connect a paired power-off headset, there is
no ACL connection at all. Then do BT off, the av sm is still
opening,it will not move to idle and clear the connection
request in the btif layer. At the same time if the Adpater
service is not unbinded during BT off, the btif-queue will
not tear down. Next time BT on, the last connection request
is actully invalid but its state is still busy in the
connection list, then it will block the new connection
request from up layer. The fix will set the sm back to idle
and remove the ongoing connnecton request if sm is opening
state before BT off.
CRs-Fixed:
1008846
Change-Id: Id953cb811107d1cc0ccaa3683027d61fdfa90fb9
Venkata Jagadeesh Garaga [Tue, 16 Aug 2016 14:27:54 +0000 (19:57 +0530)]
Bluetooth : GAP : Add boot timer permission for Cert tools
As CLOCK_BOOTTIME timer does not have boot permission this timer
start fails and hence bt turn on fails from tools.
This change adds boot permission for timers from
Certification tools
Change-Id: Ifdb15c93d2a648bb04da0e9dd7b8949d12270685
CRs-Fixed:
1055289
Linux Build Service Account [Tue, 6 Sep 2016 05:51:20 +0000 (22:51 -0700)]
Merge "Just clear IB_CFG_DONE on receiving Peer config request when channel open" into bt.lnx.2.1-dev
Linux Build Service Account [Tue, 6 Sep 2016 05:51:14 +0000 (22:51 -0700)]
Merge "Bluetooth: KW fix for gatt test tool memory failure" into bt.lnx.2.1-dev
Linux Build Service Account [Sun, 4 Sep 2016 20:05:04 +0000 (14:05 -0600)]
Promotion of bt.lnx.2.1-00006.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1056804 I7f5c4e8f7734821513cb97394d227cf66000a463 Bluetooth: Enable backtrace for malloc and free function
Change-Id: I43075c6c80b429f1e5edea6f62ce480b7fbd300c
CRs-Fixed:
1056804