OSDN Git Service

android-x86/system-bt.git
7 years agoBluetooth-Wipower: Enable WiPower feature.
Kiran Kelageri [Mon, 17 Oct 2016 02:38:08 +0000 (19:38 -0700)]
Bluetooth-Wipower: Enable WiPower feature.

Enabling WiPower feature on lastest PL, this
feature enables wireless charging capablity
on the target.

Change-Id: Iecf18eb6c133a2808982f0c0905cf4507c95685f
CRs-Fixed: 1024975

7 years agoMerge "Bluetooth: KW issues fixed" into bt.lnx.2.1-dev
Linux Build Service Account [Fri, 14 Oct 2016 17:31:34 +0000 (10:31 -0700)]
Merge "Bluetooth: KW issues fixed" into bt.lnx.2.1-dev

7 years agoMerge "Fix the crash while parsing command complete event" into bt.lnx.2.1-dev
Linux Build Service Account [Fri, 14 Oct 2016 17:31:34 +0000 (10:31 -0700)]
Merge "Fix the crash while parsing command complete event" into bt.lnx.2.1-dev

7 years agoBluetooth: KW issues fixed
Umesh Vats [Tue, 11 Oct 2016 17:44:50 +0000 (10:44 -0700)]
Bluetooth: KW issues fixed

KW issues encountered in system/bt audio related files fixed

Change-Id: I7f611e654b5c7319a3279264aa66e63de628e5c5
CRs-Fixed: 1076455

7 years agoMerge "Revert "Bluetooth:Enable backtrace for malloc and free"" into bt.lnx.2.1-dev
Linux Build Service Account [Tue, 11 Oct 2016 12:12:07 +0000 (05:12 -0700)]
Merge "Revert "Bluetooth:Enable backtrace for malloc and free"" into bt.lnx.2.1-dev

7 years agoHogp Multiple instance of hid service support
Satish kumar sugasi [Thu, 28 Jul 2016 22:07:33 +0000 (15:07 -0700)]
Hogp Multiple instance of hid service support

This add changes for hogp Certification to do multiple
hid service discovery of same device, add scpp service
support to properly handle scan interval and scan
window characteristics.

Change-Id: I24c4df141507c02ff1a85486ca78da4e75ed5e5f

7 years agoFix the crash while parsing command complete event
Luke Zhang [Sat, 23 Jan 2016 02:26:21 +0000 (18:26 -0800)]
Fix the crash while parsing command complete event

When BT enable times out, SSR is triggered and userial port is closed.
But after that when start up times out, we get a null response command
complete packet, so we should check against null before parsing it.
Also we should clean up input uart stream.

Change-Id: Ib9f34e767d1fbd1dc108c98903d3242bbc9e049b
CRs-fixed:962977

7 years agoMerge "OPP UI progress bar not in sync with data transfer" into bt.lnx.2.1-dev
Linux Build Service Account [Fri, 7 Oct 2016 18:51:26 +0000 (11:51 -0700)]
Merge "OPP UI progress bar not in sync with data transfer" into bt.lnx.2.1-dev

7 years agoRevert "Bluetooth:Enable backtrace for malloc and free"
Matadeen Mishra [Wed, 5 Oct 2016 13:11:12 +0000 (06:11 -0700)]
Revert "Bluetooth:Enable backtrace for malloc and free"

This reverts commit 394643c4404ee6dce8a21082eea144e4d25b0d57

Change-Id: Idef2997f2deb7aa4627f7f93c7432795c6c447a4
CRs-Fixed: 1074993

7 years agoMerge "Update SDP CCB's continuation information in case of server DB deletion" into...
Linux Build Service Account [Wed, 5 Oct 2016 15:38:33 +0000 (08:38 -0700)]
Merge "Update SDP CCB's continuation information in case of server DB deletion" into bt.lnx.2.1-dev

7 years agoOPP UI progress bar not in sync with data transfer
Venkata Jagadeesh Garaga [Mon, 12 Sep 2016 14:43:28 +0000 (20:13 +0530)]
OPP UI progress bar not in sync with data transfer

Reduce the buffer quota per each channel to 10
so that UI and stack data transfer rate will be
in sync
Otherwise all packets will be stocked at stack and
application side tranfer rate looks faster

Revert "GAP: Handle JV sys busy/idle properly in OPP TX/RX"

This reverts commit 151f1f65eec8afc81ceec0110cde6f305a0c1ab8

Change-Id: I5b827679a6095b54b616aa7e62ce9e3207cbfc21
CRs-Fixed: 1072515

7 years agoMerge "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:43 +0000 (03:00 -0700)]
Merge "BT: Changing l2cap sock mutex lock type to static." into bt.lnx.2.1-dev

7 years agoMerge "BT: Serialize stack shutdown, state change callback and cleanup" into bt.lnx...
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

7 years agoMerge "BT: Calling HCI reset when Hardware error event occurs" 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

7 years agoGAP : PIN popup shown for dead legacy remotes
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

7 years agoMerge "Update Interop datatbase to prevent preferred conn updates" into bt.lnx.2...
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

7 years agoMerge "Bluetooth: split-a2dp: APTx-HD support" 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

7 years agoBT: Calling HCI reset when Hardware error event occurs
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

7 years agoMerge "Do not set uid_set to NULL in RFCOMM layer" into bt.lnx.2.1-dev
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

7 years agoUpdate SDP CCB's continuation information in case of server DB deletion
Manu Viswanadhan [Mon, 26 Sep 2016 11:17:51 +0000 (16:47 +0530)]
Update SDP CCB's continuation information in case of server DB deletion

Use case: Remote initiating connection immediately before BT turn off

Failure: During SDP request processing, invalid memory is being
accessed in the SDP server, leading to crash

Steps:
1.Initiate connection from Remote and accept from DUT
2.Immediately turn off BT

Root Cause: Continuation information stored in SDP CCBs regarding the
pointer of the record last sent is not updated when its position is
shifted, as part of record deletion in the server

Fix: Proper updating of the record continuation information when its
position is shifted as part of record deletion in the server

Change-Id: I493450eaf8fff6360469a33416cf8bb468eca8eb
CRs-Fixed: 1062322

7 years agoAdd Gatt listen and adv mode support for Gatt Certification
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

7 years agoBluetooth: split-a2dp: APTx-HD support
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

7 years agoMerge "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 "GAP: Host sending two sdp req during legacy pairing" into bt.lnx.2.1-dev

7 years agoMerge "SDP: Crash in sdp due to invalid length" 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

7 years agoMerge "Bluetooth: Set alarm's queue to NULL on alarm expired" 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

7 years agoDo not set uid_set to NULL in RFCOMM layer
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

7 years agoBT: Changing l2cap sock mutex lock type to static.
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

7 years agoBT: Serialize stack shutdown, state change callback and cleanup
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

7 years agoGAP: Host sending two sdp req during legacy pairing
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

7 years agoaptXHD codec support
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

7 years agoFixes for Errors reported by Static Analysis Tool.
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

7 years agoSDP: Crash in sdp due to invalid length
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

7 years agoMerge "For false A2DPSuspend only change A2DP state to standy" into bt.lnx.2.1-dev
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

7 years agoUpdate Interop datatbase to prevent preferred conn updates
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

7 years agoBluetooth: Set alarm's queue to NULL on alarm expired
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

7 years agoBluetooth: Add AAC codec Support in Split-a2dp mode
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

7 years agoBluetooth: Handle sink cleanup gracefully
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

7 years agoMerge "Split A2p: Fix for stream failure in remote initiated connection" into bt...
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

7 years agoMerge "GAP: Accept incoming connection as slave" 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

7 years agoMerge "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:15 +0000 (20:00 -0700)]
Merge "BT: Updating bt_config on local adapter property change" into bt.lnx.2.1-dev

7 years agoMerge "Enbale Audio track for user builds" 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

7 years agoGAP: Accept incoming connection as slave
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

7 years agoFor false A2DPSuspend only change A2DP state to standy
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

7 years agoSplit A2p: Fix for stream failure in remote initiated connection
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

7 years agoMerge "A2DP: Check pending a2dp ctrl cmd" into bt.lnx.2.1-dev
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

7 years agoMerge "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:37 +0000 (05:26 -0700)]
Merge "Bluetooth: Add bdt tool to support test in FFBM mode" into bt.lnx.2.1-dev

7 years agoMerge "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 "Bluetooth : Accept incoming connection as slave" into bt.lnx.2.1-dev

7 years agoMerge "Fixed the racing problem between HAL_CBACK and cleanup function" into bt.lnx...
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

7 years agoBT: Updating bt_config on local adapter property change
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

7 years agoA2DP: Check pending a2dp ctrl cmd
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

7 years agoBluetooth: Add bdt tool to support test in FFBM mode
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

7 years agoMerge "GAP: Handle JV sys busy/idle properly in OPP TX/RX" into bt.lnx.2.1-dev
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

7 years agoFixed the racing problem between HAL_CBACK and cleanup function
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

7 years agoMerge "API changes in aptX schduler library" into bt.lnx.2.1-dev
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

7 years agoMerge "aptX supported needs to be checked during initialization" 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

7 years agoBluetooth : Accept incoming connection as slave
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

7 years agoAPI changes in aptX schduler library
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

7 years agoaptX supported needs to be checked during initialization
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

7 years agoAdded Remote Device BD address to Outgoing role switch blacklist
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

7 years agoEnbale Audio track for user builds
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

7 years agoMerge "Dequeues direct connection request during cancel conn operation" into bt.lnx...
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

7 years agoMerge "Bluetooth : GAP : Add boot timer permission for Cert tools" into bt.lnx.2...
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

7 years agoGAP: Handle JV sys busy/idle properly in OPP TX/RX
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

7 years agoBluetooth: Fix DUT cannot ccnnect remote headset BT off/ON
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

7 years agoBluetooth : GAP : Add boot timer permission for Cert tools
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

7 years agoMerge "Just clear IB_CFG_DONE on receiving Peer config request when channel open...
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

7 years agoMerge "Bluetooth: KW fix for gatt test tool memory failure" 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

7 years agoMerge "Bluetooth: Enable backtrace for malloc and free functions" into bt.lnx.2.1-dev
Linux Build Service Account [Thu, 1 Sep 2016 17:11:44 +0000 (10:11 -0700)]
Merge "Bluetooth: Enable backtrace for malloc and free functions" into bt.lnx.2.1-dev

7 years agoBluetooth: KW fix for gatt test tool memory failure
Satish kumar sugasi [Thu, 10 Sep 2015 22:00:31 +0000 (15:00 -0700)]
Bluetooth: KW fix for gatt test tool memory failure

This change takes care of NULL pointer deferencing issue by checking
memory allocation for new job process succeed before copying new
command argument passed.

Change-Id: I6160ae04c1905645e9624bf4ecc3a7c945e3bb20

7 years agoGAP : Host sends neg link key for headset reconnection
Venkata Jagadeesh Garaga [Fri, 12 Aug 2016 10:01:00 +0000 (15:31 +0530)]
GAP : Host sends neg link key for headset reconnection

Use case: Stack sending neg link key for headset reconnection while 6 ACL
already connected

Precondition:
=============
- Turn ON DUT
- Pair and connect with 6 BLE devices

Step by Step procedure:
=======================
- Pair and connect with SHB9100WT headset
- Play A2DP music and listen A2DP audio over headset
- Turn Off headset and turn On
- Repeat above 2 steps 2 - 3 times

Failure: Host sending negative linkkey even linkkey present in config file as
peer device security flags reset during acl disconnection.

Root Cause: During acl disconnection,array out of index memory accessed
in memcpy.Due to corrupted flag peer device security flags reset abd host
sending negative linkkey for next acl connection.

Change-Id: I25ae78d7f5f85043943ed752d54dc2fee40c4fa6
CRs-Fixed: 1059275

7 years agoMerge "Allow full dev consolidation after pairing" into bt.lnx.2.1-dev
Linux Build Service Account [Wed, 31 Aug 2016 01:49:59 +0000 (18:49 -0700)]
Merge "Allow full dev consolidation after pairing" into bt.lnx.2.1-dev

7 years agoMerge "Bluetooth: Notify BT APP about alias as the name if present" into bt.lnx.2...
Linux Build Service Account [Wed, 31 Aug 2016 01:49:24 +0000 (18:49 -0700)]
Merge "Bluetooth: Notify BT APP about alias as the name if present" into bt.lnx.2.1-dev

7 years agoJust clear IB_CFG_DONE on receiving Peer config request when channel open
Mingbo Zhang [Tue, 23 Aug 2016 02:28:26 +0000 (10:28 +0800)]
Just clear IB_CFG_DONE on receiving Peer config request when channel open

In current codes, while l2cap channel has been configured and in
CST_OPEN state, if local receives another configure request from
remote, config_done(IB_CFG_DONE and OB_CFG_DONE) will be cleared.
However, OB_CFG_DONE will be never set again. So, from then on,
data can not be transmitted to remote by this channel. To fix
this issue, we should just clear IB_CFG_DONE and keep OB_CFG_DONE
unchanged on receiving Peer config request when channel open

Change-Id: I8deca0c8ff73faafc3da94dcd9ea55e06bd8a31d
CRs-Fixed: 1059193

7 years agoMerge "Set HF indicators bit only when remote supports it." into bt.lnx.2.1-dev
Linux Build Service Account [Tue, 30 Aug 2016 07:17:20 +0000 (00:17 -0700)]
Merge "Set HF indicators bit only when remote supports it." into bt.lnx.2.1-dev

7 years agoMerge "Fixes for Errors reported by static analysis tool." into bt.lnx.2.1-dev
Linux Build Service Account [Tue, 30 Aug 2016 06:56:41 +0000 (23:56 -0700)]
Merge "Fixes for Errors reported by static analysis tool." into bt.lnx.2.1-dev

7 years agoDequeues direct connection request during cancel conn operation
Subramanian Srinivasan [Thu, 21 Aug 2014 23:46:04 +0000 (16:46 -0700)]
Dequeues direct connection request during cancel conn operation

When cancel connection request for a device is sent
from an app and if the current pending connection
request's BD address does not match with this device,
the entries of the connection request pending queue
are also checked. If BD address match occurs with an
entry in the connection request queue, the entry is
removed from the queue.

CRs-Fixed: 1060313
Change-Id: I1bf50a424d86ac53a5201fff742c822f4c8d1c0b

7 years agoMerge "BT: Enable SoC logging through developer option" into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 29 Aug 2016 15:13:34 +0000 (08:13 -0700)]
Merge "BT: Enable SoC logging through developer option" into bt.lnx.2.1-dev

7 years agoFixes for Errors reported by static analysis tool.
Satheesh Kumar Pallemoni [Thu, 18 Aug 2016 09:18:31 +0000 (14:48 +0530)]
Fixes for Errors reported by static analysis tool.

Fixes for Errors reported by static analysis tool.

CRs-Fixed: 1056776
Change-Id: I4c5188c477784e34d531d33b81ce8f443626d61f

7 years agoSet HF indicators bit only when remote supports it.
Satheesh Kumar Pallemoni [Fri, 19 Aug 2016 10:10:50 +0000 (15:40 +0530)]
Set HF indicators bit only when remote supports it.

If remote HFP version is 1.7 and sets HF indicators
bit in BRSF flag, don't unset HF indicators bit in
AG's BRSF flag.

CRs-Fixed: 1056813
Change-Id: Ia5df7eb3909ad773048b59686b17bc377bf35abf

7 years agoMerge "A2dp: Fix for audio loss with remote device initiated connection" into bt...
Linux Build Service Account [Mon, 29 Aug 2016 03:48:08 +0000 (20:48 -0700)]
Merge "A2dp: Fix for audio loss with remote device initiated connection" into bt.lnx.2.1-dev

7 years agoMerge "Bluetooth: HDP: Synchronize hl data operations" into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 29 Aug 2016 03:48:08 +0000 (20:48 -0700)]
Merge "Bluetooth: HDP: Synchronize hl data operations" into bt.lnx.2.1-dev

7 years agoMerge "A2DP: KW fix" into bt.lnx.2.1-dev
Linux Build Service Account [Mon, 29 Aug 2016 03:48:08 +0000 (20:48 -0700)]
Merge "A2DP: KW fix" into bt.lnx.2.1-dev

8 years agoAllow full dev consolidation after pairing
Nitin Arora [Sat, 13 Aug 2016 00:48:11 +0000 (17:48 -0700)]
Allow full dev consolidation after pairing

When BR/EDR and LE RPA device records are present
in the device records and the same remote device is
paired on a new RPA, the device consolidation happens
after the IRK is received. The current consolidation
breaks out of the loop after consolidating one device
record. In such cases, BR dev record is left and when
BR link key is derived, it gets updated in a separate
device record. Since two device records are present at
the same time for the same remote, the keys and static
addresses get picked up from incorrect node and issues
such as "remove device from resolving list seen with {0}
static address" are seen.

The fix includes allowing the host to complete
the consolidation for all device records rather than
breaking at the fist match.

CRs-Fixed: 1056433
Change-Id: Ib0bf2e4029e448670ee44f63110e5332aa972580

8 years agoBluetooth: Enable backtrace for malloc and free functions
Kamal Negi [Thu, 25 Aug 2016 06:27:58 +0000 (11:57 +0530)]
Bluetooth: Enable backtrace for malloc and free functions

Printing caller address of osi malloc and free functions to debug.

CRs-Fixed: 1056804
Change-Id: I7f5c4e8f7734821513cb97394d227cf66000a463

8 years agoBT: Enable SoC logging through developer option
Matadeen Mishra [Fri, 12 Aug 2016 10:23:29 +0000 (15:53 +0530)]
BT: Enable SoC logging through developer option

Enable/Disable SoC Logging through developer option.

SoC Logging enable/disable only for Pronto device.

Change-Id: I7193d085a1de4aa1e4b0ed6ec16a4812c8dc70b5
CRs-Fixed: 1057493

8 years agoBluetooth: Notify BT APP about alias as the name if present
Matadeen Mishra [Thu, 7 Nov 2013 15:05:39 +0000 (20:35 +0530)]
Bluetooth: Notify BT APP about alias as the name if present

While scanning notify the Bluetooth APP about the alias name
as the actual device name of snanned device if alias name is
present.

CRs-Fixed: 1055177
Change-Id: Id8a093b1503eb3f308f466f30c1a4a6f4c250594

8 years agoHID: Prevent sending output report if not changed.
Hemant Gupta [Fri, 19 Aug 2016 11:41:09 +0000 (17:11 +0530)]
HID: Prevent sending output report if not changed.

Usecase:
1) Connect BT HID Keyboard with DUT and remove USB cable.
2) Turn off LCD display of DUT and wait for DUT to suspend.

Observation:
DUT does not suspend, and higher current drain on BT chip is
observed.

Root Cause:
Kernel Input driver sends LED output report to connected HID Keyboard
on every device resume from suspend. If for some reason suspend fails
(some other task is pending), kernel aborts suspenson and resumes device
drivers, which calls the callback of resume in corresponding device
drivers. This results in kernel sending output LED report to HID over BT,
which in turn sends the data over UART to BT SoC. Now if kernel tries to
suspend, it fails as UART is busy, so it resumes again, therebyu sending
same LED output report to BT thereby making a continous loop of sending
output report preventing BT SoC from sleeping and resulting in higher
current drain.

Fix:
In user space BT code, add check to prevent sending output report to remote
device if the content of report is same as previous data sent out to same
remote device. This will ensure that output report is sent to remote device
only once (if no change in conent of report), and will ensure that kernel can
suspend the device without errors as UART will not be busy.

Change-Id: I9759e5e567b6ebe06e5660539881ba827b15fb1f
CRs-Fixed: 1056709

8 years agoA2dp: Fix for audio loss with remote device initiated connection
pramod kotreshappa [Thu, 11 Aug 2016 03:42:08 +0000 (20:42 -0700)]
A2dp: Fix for audio loss with remote device initiated connection

Mark all SEPs of corresponding stream control block to busy if
one of the SEP is in use to avoid incoming connection trying to
connect to SEP of the stream control block which is already in
open state with active connection.

Change-Id: I819281c57c03f60619b488df1dbd92c8598aec68

8 years agoBluetooth: HDP: Synchronize hl data operations
Venkata Jagadeesh [Tue, 31 May 2016 11:20:10 +0000 (16:50 +0530)]
Bluetooth: HDP: Synchronize hl data operations

Validate Tx packet before memcpy as it can be free
from different thread

Handled hl data cfm in error conditions

Change-Id: I566f62ce02c8e95c9f4b8d7155132e4434657f66
CRs-Fixed: 1043930

8 years agoA2DP: KW fix
pramod kotreshappa [Wed, 24 Aug 2016 22:38:54 +0000 (15:38 -0700)]
A2DP: KW fix

Check keyval ptr is not equal to null to process out set param
keyvalue pair.

Change-Id: I52a6dd15fa00a85937a2c0eb8e484c393fedee92

8 years agoBluetooth: Including vendor HAL directory path for wearables
Manu Viswanadhan [Fri, 19 Aug 2016 11:13:57 +0000 (16:43 +0530)]
Bluetooth: Including vendor HAL directory path for wearables

Including vendor HAL directory path for wearables

Change-Id: I7e310bd08b5c75f4cd532d2feb2eea3635cd9a0d
CRs-Fixed: 1056850

8 years agoA2DP: Multiple Split-A2dp fixes
pramod kotreshappa [Thu, 28 Jul 2016 05:56:21 +0000 (22:56 -0700)]
A2DP: Multiple Split-A2dp fixes

- Sanity check ctrl fd is valid, if the output stream was not
closed previously and audio hal is trying to start stream.
- Ack back stream suspend ctrl command from the hal immediately
during device disconnect is initiated during streaming to avoid
delay in device disconnection.
- If stream start is requested from audio hal and disconnect is
initiated at the same time, check for ctrl cmd pending for ack.
- Increase stream start retry timeout to 8sec to address IOT
issue in soft handoff scenario.

Change-Id: I39c1963cb2ecedd568b4e8b67b2df891d8f9f5bf

8 years agoProper state transition for disconnect during connection setup
Ayan Ghosh [Fri, 8 Jul 2016 07:27:38 +0000 (12:57 +0530)]
Proper state transition for disconnect during connection setup

 - Ensure BTA AV correctly moves to init state when remote tears
   down the AV connection and ACL during incoming connection setup.
 - Properly set collision flags for handling AV connection collision.

CRs-Fixed: 1052672

Change-Id: I30cecf2cbf2cd4a21b243230e81ced80ae773db5

8 years agoFix for SS Level U headset not connecting
Umesh Vats [Tue, 9 Aug 2016 18:52:48 +0000 (11:52 -0700)]
Fix for SS Level U headset not connecting

Added the changes to do proper comparison of the codec configuration
based on codec selected by the remote headset

CRs-Fixed: 1052332

Change-Id: I078f07b39ab61ea2755333f0d94afe9efaf86c85

8 years agoDo SDP when HSP connection opened by remote.
Satheesh Kumar Pallemoni [Thu, 4 Aug 2016 12:14:11 +0000 (17:44 +0530)]
Do SDP when HSP connection opened by remote.

When HSP connection opened by Remote do SDP, So that AG could find out
whether remote supports remote volume control feature.

CRs-Fixed: 1052230
Change-Id: I6441142fcdebcd9f2b652f90e0d8d592dea3db3d

8 years agoAllow second A2dp connection when SCO exists with first
Ayan Ghosh [Mon, 25 Jul 2016 12:39:15 +0000 (18:09 +0530)]
Allow second A2dp connection when SCO exists with first

Allow A2dp connection with second device even when there is
an ongoing SCO with first and role switch fails.

CRs-Fixed: 1048629
Change-Id: Iacc2a8a3f53f497b8e00d8641b53a218c5a74589

8 years agoInitiate Reconfig if DUT preferred config not chosen
Ayan Ghosh [Mon, 20 Jun 2016 10:34:37 +0000 (16:04 +0530)]
Initiate Reconfig if DUT preferred config not chosen

 - Add all mandatory capabilities to DUT supported config list.
 - On peer device initiated AV Setconfig if peer chooses
   any config other than DUT preferred one then trigger AV
   Reconfig to override remote chosen config.

CRs-Fixed: 1043899

Change-Id: I6c89c4fb6f87be967c280c8c1c422e250bf91ae3

8 years agoBluetooth: Increase profile connection timeout
Nitin Arora [Fri, 5 Aug 2016 00:39:01 +0000 (17:39 -0700)]
Bluetooth: Increase profile connection timeout

This change increases the timeout after the gatt
discovery complete from 1 sec to 5 sec.
For profiles such as HOGP, the profile level gatt connections
after the discovery complete callbacks sometime take more time,
due to which the "no app timeout" disconnects the physical link.
This change will hold the gatt connection used for remote discovery,
for 5 seconds, after the discovery is complete, and thus provide
sufficient time for the profile level connections to kick in.

CRs-Fixed: 1050047
Change-Id: I8f3c3ad162e3dadeb0e3215bf9fe6a20e4d9c425

8 years agoSometimes BT settings UI shows wrong name for a paired device
Umesh Vats [Fri, 22 Jul 2016 19:34:08 +0000 (12:34 -0700)]
Sometimes BT settings UI shows wrong name for a paired device

This patch includes changes to use BTM_SecReadDevName instead of
bta_dm_get_remname() for getting the remote device name during
BTM_LE_NC_REQ_EVT (SMP Numeric comparison request event).
bta_dm_get_remname() relies on the global variable
bta_dm_search_cb.peer_name. This variable can have name of the
legacy device inquired earlier. Now if an LE device is paired,
during numeric comparison request event, the older remote
name stored in bta_dm_search_cb.peer_name is used and gets
stored when the LE device is pairing

Change-Id: I0e02ed262ac111c074e0a4a8b29e84a57e41faf1
CRs-Fixed: 1045318

8 years agoBluetooth: Add logic to cancel link timeout alarm
Nitin Arora [Mon, 25 Jul 2016 18:33:19 +0000 (11:33 -0700)]
Bluetooth: Add logic to cancel link timeout alarm

Issue:
Post bonding process, temporary gatt connections are
created to perform device name discovery and remote
device discovery before any profile level connections
are made for remote devices. At every disconnection
the number of apps holding the physical link is validated
to keep the link alive. A disconnection starts the idle
timeout of 1sec if there is no other apps available.
However, a new logical connection is unable to reset
the timer, even if the link comes up, within 1sec of
the last disconnection.

Fix:
At every connection occuring within the "No app timeout",
the link timer is cancelled since there is still a gatt_if
that needs to keep the link alive.

CRs-Fixed: 1050047
Change-Id: I3205894e4d692e4e8b1a547b6fb4d346c4f281a5