OSDN Git Service

android-x86/system-bt.git
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 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 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 years agoBT: Fix hardware error detection failure for Pronto devices.
Gurpreet Ghai [Tue, 2 Aug 2016 10:23:33 +0000 (15:53 +0530)]
BT: Fix hardware error detection failure for Pronto devices.

Issue: Hardware error detection failure during scenario which
include enforced ssr.

Cause: Due to incorrect condition, the function that checks
for hardware reset bit was not called.

Measure: Applied the correct check so that hardware reset is
detected in pronto devices.

Change-Id: Ie6cea5fc2b33956d01911910fcc97f8c4b4b6669

7 years agoBT: Remove Btsnoop_dump from system/bt as tool is disable
Matadeen Mishra [Tue, 2 Aug 2016 10:30:22 +0000 (16:00 +0530)]
BT: Remove Btsnoop_dump from system/bt as tool is disable

Remove Btsnoop_dump directory from system/bt.

Change-Id: I6dea2c9d87926aa1a8d77682c970462c20026d18
CRs-Fixed: 1049200

7 years agoA2DP: Split A2DP Extension
pramod kotreshappa [Tue, 10 May 2016 06:44:35 +0000 (23:44 -0700)]
A2DP: Split A2DP Extension

Split A2dp extended feature enables a2dp encoding offloaded to
LPASS. Codec info is provided to audio module via BT IPC library
to instatiate encoder session in LPASS. Remote headset codec info
is provided to BT SoC to encapsulate avdtp and l2cap header to
encoded audio data from DSP module.

Change-Id: I4dede32c7510dc6e95555d56d1066a0f9bfdf860

7 years agoA2DP: New BT IPC library
pramod kotreshappa [Thu, 31 Mar 2016 21:34:20 +0000 (14:34 -0700)]
A2DP: New BT IPC library

New BT IPC library that facilitates communication betwee audio hal
and BT host. Bthost-ipc library will be loaded by audio primary
hal in Split A2dp scenario to communicate with bt host and in
legacy non-split a2dp scenario this library will be loaded by
a2dp hal.

Change-Id: Ie11d88b27662c97a00ac9d484ae9c621293949e8

7 years agoMisc Split A2dp changes.
Ayan Ghosh [Thu, 3 Dec 2015 13:55:53 +0000 (19:25 +0530)]
Misc Split A2dp changes.

 - Disconnect A2dp if any of the vendor specific command
fails to start Split A2dp in controller.
 - Send mesaages to media task command queue only if
queue exists.
 - Proper handling of Remote Suspend and Start.

Change-Id: I0498487d4d54b8c793e439f777e38343f89a5c9d

7 years agoSplit A2dp implementation
Ayan Ghosh [Wed, 7 Oct 2015 13:04:50 +0000 (18:34 +0530)]
Split A2dp implementation

Implement Split A2dp to process AVDTP Signalling commands
from host and media packet handling from Controller.
Host uses vendor specific commands to let controller know
the media channel configurations for controller to form
the media packets accordingly.

Change-Id: I7a98177a8125fd70b057bb514f0d870971a45bcf

7 years agoFix display of GATT cache server attributes
Subramanian Srinivasan [Thu, 28 Jul 2016 20:11:34 +0000 (13:11 -0700)]
Fix display of GATT cache server attributes

Fix the display of GATT cache server attributes by
making use of the new GATT attribute data structures
when BTA_GATT_DEBUG is enabled.

CRs-fixed: 1047756

Change-Id: If5bbbde5b43c4e82ab4fa772c1a16e99b839ccd5

7 years agoBluetooth: Introduced new HAL directory for VS interface
Manu Viswanadhan [Tue, 12 Jul 2016 12:46:51 +0000 (18:16 +0530)]
Bluetooth: Introduced new HAL directory for VS interface

Introduced new HAL directory for all vendor specific interface
implementations. This helps in keeping original HAL untouched
with respect to vendor specific changes. The new directory will
be used for all vendor specific API calls.

CRs-Fixed: 1047009
Change-Id: I99a4b55f645a9719fca535ee659757c55e9211e8

7 years agoDo AV registration for different roles in proper way
Ayan Ghosh [Tue, 12 Jul 2016 10:36:49 +0000 (16:06 +0530)]
Do AV registration for different roles in proper way

For multiple codec (SBC, APTx) and multiple role (SRC, SNK) enabled
environment make sure registration of individual AV endpoints are
done in a way that enabling different roles for differnt codecs does
not affect other codecs or roles.

CRs-Fixed: 1042243
Change-Id: I03e05eef7d9bf669c6600630afcb507bb52bd5a7

7 years agoBluetooth : GAP : Dont initiate role switch for blacklisted remotes
venkata Jagadeesh [Tue, 12 Jul 2016 13:48:12 +0000 (19:18 +0530)]
Bluetooth : GAP : Dont initiate role switch for blacklisted remotes

Don't initiate role switch for blacklisted remotes from DUT
as some remotes always rejects role switch and role swicth retrails from
DUT may lead to a2dp glitches or random disconnections

Change-Id: If0c5212e38ab16a16b6fda35b15b160f89f7f297
CRs-Fixed: 1040611

7 years agoMove aptX config parse to main code from the library
Umesh Vats [Mon, 25 Jul 2016 18:19:25 +0000 (11:19 -0700)]
Move aptX config parse to main code from the library

For aptX offload feature, aptX config parsing and caps check
functions need to be included in open source

Change-Id: If31864374a3fa04720b03637c3dfb492f2cfacd1
CRs-Fixed: 1046053

7 years agoFix for error reported by Static analysis tool
Matadeen Mishra [Thu, 21 Jul 2016 11:21:07 +0000 (16:51 +0530)]
Fix for error reported by Static analysis tool

- Fix Array Index Out of Bounds Exceptions
    in the fludroid code space of Bluetooth.

Change-Id: If6d2c208e12a3e71ecd9d4d375ef6f8b81e17532
CRs-Fixed: 1044013

7 years agoPBAP: Add support for SIM phonebook in SDP
Hemant Gupta [Wed, 15 Jul 2015 09:38:29 +0000 (15:08 +0530)]
PBAP: Add support for SIM phonebook in SDP

This change will add SIM phonebook service support
in SDP registeration.

Change-Id: I1315a9031e66bc091a9d3d2721182e843e35e2cd
CRs-Fixed: 509165

7 years agoBluetooth: LE Stack certification tool changes
Satish kumar sugasi [Fri, 10 Apr 2015 19:46:02 +0000 (12:46 -0700)]
Bluetooth: LE Stack certification  tool changes

This includes changes needed for new code baseline
and below stashed commits.

Bluetooth stack 4.0/4.1 certification tool changes

This adds test application code and stack interface
code for BLE certification purpose

CRs-fixed: 649248
Change-Id: I6e8ecbf2fdb0fe6ee80fd6d57c2e151b62797f01

Bluetooth: Avoid Encryption after gatt server connection complete.

This doesn't start encrtyption by default after connecting to a client.
needed for certain test cases of BLE stack certification.

Change-Id: I04dbe1daba32b416f59fed00989168507ce261fa
CRs-Fixed: 652485

Bluetooth: add config flag to gatt tool test app

This adds logic to compile gatt tool only if config test flag
is enabled and aincludes indendation changes

Change-Id: If018d0676bb6334be0558fd6f6464ffbfc33196a

Bluetooth: Gatt tool changes and code cleanup

Fixes for compilation issues and remove CONFIG
flag from makefile.

Change-Id: I57646edf9b0ec3ffd62e34aeed54f13ef09ef1a0

Bluetooth: Include Gatt test app for certification

This adds debug and optional flags to makefile to compile tool
as part of android build

Change-Id: I603a982a4bc7c392e45e753bcbb57bf8394ed21c

Bluetooth: Add gatt refresh api in gatt certification tool

this fixes gatt tool crash during service discovery test cases
and code cleanup.
CRs-Fixed: 734268
Change-Id: I7e600d912c0b631b3bc865c571f9ad1c05f99ae4

Bluetooth: Add conn update api for gatt tool

This adds support to do LE connection parameters update after
successful connection using Gatt test app for certification

CRs-Fixed: 743373
Change-Id: Id76d244f6bf7721016ef397c8bfea9cd877b0253

Bluetooth: Gatt tool change for wakelock support and cleanup

This change does send hci success status for wakelock apis which
are newly added in BT.Also does remove tabs and proper indentation

CRs-Fixed: 743399
Change-Id: I9346c3a04e4c7238cd5afaabb0361f7083cb93fe

Supports Simple pairing with No bonding and no MITM

Supports Bluetooth simple pairing with no MITM,
no bonding set in the authentication request and
initiator and responder keys set to 0.

Change-Id: I6e8ecbf2fdb0fe6ee80fd6d57c2e151b62797f01

Conflicts:
main/Android.mk

Change-Id: I36eba14defe16418037ba4b253d31c9a6270d93c

7 years agoBT: Adding check for hci_layer status before processing func calls
Gurpreet Ghai [Thu, 4 Feb 2016 14:40:03 +0000 (20:10 +0530)]
BT: Adding check for hci_layer status before processing func calls

When hci_layer functions for transmit command and cleanup
are called during hci_layer shutdown, they might try to
access lists that are already cleared as part of shutdown
process. This causes issues during BT turn off.

Added check within such functions to check for hci_layer
state before processing.

Change-Id: I8dbca9893e03dfc500886c5033a79976dc5d23e1

Bluetooth: Process data only after cmd cmpl for reset

- Process incoming event/ACL packet only after command
  complete event received for reset command.

- Otherwise there might be a chance of receving other
  events though the controller module is not ready,
  as part of processing events, accessing the controller
  module capabilities leads to crash.

Change-Id: Id4b1d207fd237d56c95c7af801fc25d8c05808df

BT: Adding check for hci_layer state before dispatching event

During Bluetooth disable process, alarms and command lists
are reset causing race condition because pending commands
and packets are still present in the list and reactor still
runing. So, adding check for hci layer state before processing
events of command and packet ready.

Change-Id: Ib10a2caa7a9e4739088d5192208fb4f97f3e4bbf
CRs-Fixed: 1022151

7 years agoAG: Set/Unset HF indicator bit based on remote device
Satheesh Kumar Pallemoni [Tue, 19 Jul 2016 06:23:39 +0000 (11:53 +0530)]
AG: Set/Unset HF indicator bit based on remote device

For HFP 1.6 or below remote devices, we don't set HF indicators,
S4 settings bit in BRSF in the current implementation. For HFP 1.7
remote devices, if remote does not set HF indicators bit, unset
HF indicators bit in AG's BRSF.

CRs-Fixed: 1042926
Change-Id: I24844ffd7c045cd5b19f554d78470db27bcb9f1c

7 years agoBluetooth: Fix for aptX media thread cleanup crash
Umesh Vats [Thu, 21 Jul 2016 18:19:39 +0000 (11:19 -0700)]
Bluetooth: Fix for aptX media thread cleanup crash

Changes added to stop aptX scheduler thread before media
thread cleanup happens.

Change-Id: I1988ea3c6b0a560d7028769307ed25e6876ac4dc
CRs-Fixed: 1041402

7 years agoHandle service discovery states properly when server cache state is LOAD
Subramanian Srinivasan [Thu, 21 Jul 2016 23:15:15 +0000 (16:15 -0700)]
Handle service discovery states properly when server cache state is LOAD

When the BT stack's server cache state is BTA_GATTC_SERV_LOAD while
performing GATT service discovery, the stack does not issue a proper
GATT_Disconnect after the completion of Gatt discovery procedure.
Also the p_clcb state is moved to BTA_GATTC_DISCOVER_ST state for
conn_id 5.

When p_clcb state is moved to BTA_GATTC_DISCOVER_ST, it implies that
service discovery is in progress in BT stack. In this scenario, when
GATT operation requests like GATT Read, GATT Write, etc are received
by BT stack from upper layers, the BTA layer state machine
(bta_gattc_sm_execute) queues up these GATT operations instead of
executing these GATT operations immediately.

The queued up GATT operations are generally executed after the service
discovery procedure is completed. In this case, the queued up GATT
operations never get executed since the GATT discovery procedure does
not get completed properly and hence the GATT operations fail.

This change cleans up the pending GATT connects for service discovery
when the server cache state is BTA_GATTC_SERV_LOAD and also resets the
discovery state. This would allow other GATT operations to get executed
by BT stack.

Change-Id: If2a25d45e2f37d1092752d4d6184540a4768c771

7 years agoSynchronize RPA completion callback and cleanup
Rupesh Tatiya [Thu, 30 Jun 2016 15:07:22 +0000 (20:37 +0530)]
Synchronize RPA completion callback and cleanup

There is a cleanup API which can free memory for btm_multi_adv_cb while
RPA completion callback API might be using this memory for processing.
Protect btm_multi_adv_cb resource across these two functions.

CRs-Fixed: 1036742
Change-Id: I5872b0a1ff1765b0f6c4e45e3d32551c03532393

7 years agoBluetooth: KW fixes in btif_rc.c
Umesh Vats [Sat, 16 Jul 2016 01:00:17 +0000 (18:00 -0700)]
Bluetooth: KW fixes in btif_rc.c

Check on index introduced.

Change-Id: Id7ff430a16cade1512e0cabef3c694c80a10b0b0
CRs-Fixed: 1042595

7 years agoBluetooth : Handled Cert tools new timer permissio issue
venkata Jagadeesh [Mon, 11 Apr 2016 14:28:54 +0000 (19:58 +0530)]
Bluetooth : Handled Cert tools new timer permissio issue

Cert tools new timer permission issue resloved.

Change-Id: I775807c07cafc326d5aae736bdcba677abc1bcfc
CRs-Fixed: 1042284

7 years agoProcess Gatt read multiple response properly
Subramanian Srinivasan [Mon, 16 May 2016 18:14:03 +0000 (11:14 -0700)]
Process Gatt read multiple response properly

The Gatt server multi response queue is made NULL after each Gatt
server response is sent by BT stack in response to the remote Gatt
client's request. But the multi response queue is not initialized
again to process subsequent read multiple Gatt server responses.
Hence, the BT stack does not send Gatt server responses for the
subsequent read multiple requests from remote device which inturn
leads to disconnection. This change would process read multiple
responses by initializing the queue when it is null.

Some of Bluetooth certification test cases involve testing
Gatt server's capability to process and send read multiple
response.

Test case: TC_GAR_SR_BV_05_C

This change also cleans up unnecessary initialization and freeing
of multi rsp queue. This change makes sure that the stack initializes
multi rsp queue only when it is necessary(ie only when the Gatt
multiple read response is being processed).

CRs-fixed: 1038422

Change-Id: Ia3e2e1569ee16cac9c518f95501945257b9fb7fd

7 years agoBluetooth: GAP: Allow only one pairing from btif layer at one time
Srinu Jella [Mon, 10 Nov 2014 13:00:26 +0000 (18:30 +0530)]
Bluetooth: GAP: Allow only one pairing from btif layer at one time

This patch prevents any new pairing request from some other remote
device if pairing has been initiated with a particular remote
device.

CRs-Fixed: 1041642
Change-Id: Id17e3f90904d2c53f1466a72253a25a38d753138

7 years agoBluetooth: GAP: Update UUIDs immediately on NVRAM
Matadeen Mishra [Thu, 14 Jul 2016 10:34:05 +0000 (16:04 +0530)]
Bluetooth: GAP: Update UUIDs immediately on NVRAM

As the new bt-if config updation have delay in writing items
to the NVRAM, some times there is a chance of not updating
incase of battery removal happens before the actual write onto
NVRAM.
As SDP UUIDs is important data to store, it will update
immediately onto NVRAM.

Change-Id: I6637dc326f3a53211a5bbf988a2dca1020203128
CRs-Fixed: 1041642

7 years agoBluetooth: Read BLE vendor capability to proceed on Secure conn
Srinu Jella [Mon, 24 Aug 2015 15:30:28 +0000 (21:00 +0530)]
Bluetooth: Read BLE vendor capability to proceed on Secure conn

- Read BLE vendor capability to proceed on enablement of
  secure connection support from Host.

- If BLE vendor capability is supported from the controller
  then secure connection is enabled from Host.

CRs-Fixed: 1041642
Change-Id: I64e79d4e6fff7d9f1b0ea7272250e8155f5888e2

7 years agoHandled invalid MTU Size in L2cap Process Commands
Ajay Kumar [Wed, 12 Mar 2014 13:59:27 +0000 (19:29 +0530)]
Handled invalid MTU Size in L2cap Process Commands

Use case: Execute the L2cap test suite on Codenomicon tool

(1)From tool Codenomicon Defensics 11 menu Utilities > Bluetooth Scan, paired Bluetooth between pc and phone.
(2)From Defensics 11 Settings ,choose paired phone Bluetooth to be Target Bluetooth device address in Basic configuration.
(3)Run the test case " Security - l2cap ".
(4)When run to the number 28, 29 test case,check the phone.BT turn off and turn on automatcially

Failure: BT crash observed due to invalid MTU packets from test tool

Root cause: L2cap is not validating packets in L2cap Process Commands

Fix: Fixed by sending reject cmd for invalid commands from tool

Change-Id: I8c503ab77d8fca3728a84c3457d8115e31ee3a13
CRs-Fixed: 1041625

7 years agoRFCOMM: Add state check to prevent assert
Srinu Jella [Mon, 7 Sep 2015 08:10:07 +0000 (13:40 +0530)]
RFCOMM: Add state check to prevent assert

This patch adds state check in bta_jv_rfcomm_write, to prevent sending
data in BTA_JV_ST_NONE state. This would prevent ASSERT in code due to
null handle, as handle might have already been set to null during previous
closing of rfcomm connection.

CRs-Fixed: 1041625
Change-Id: Ibc6b1fb7aa6dce9a4acb52d724af3023fad9a9ae

7 years agoBluetooth: Implement hardware error timer for command timeout case
Gurpreet Ghai [Fri, 24 Jun 2016 13:56:56 +0000 (19:26 +0530)]
Bluetooth: Implement hardware error timer for command timeout case

Root cause: As part of command timeout, ssr cleanup is initiated
and a special buffer is sent from the filter to SOC for intentional
crashing and collection of logs. The time provided before the
killing of stack is not sufficient for the whole dump to be
collected.

Fix: A hardware error timer is created which gets started in the
command timeout case immediately after sending ssr cleanup to the
vendor. The timer will expire after due time to kill the process.

Change-Id: I60cf55c9d4ae4078ee05bca89359de60091b3ba6
CRs-Fixed: 1022533

7 years agoBluetooth: Prevent gatt DB copy if server cache is absent
Nitin Arora [Thu, 14 Jul 2016 01:02:03 +0000 (18:02 -0700)]
Bluetooth: Prevent gatt DB copy if server cache is absent

In case the server cache does not exist for a specific
connection, the API used to copy the server DB into the
DB structure needs to return immediately. This change
makes sure of that and prevents dereferencing of a null
block causing the runtime error.

Change-Id: Iec3040a1280ef9d80b1b9c76eca8071dff499411
CRs-Fixed: 1040951

7 years agoRemoved compilation dependency on proprietary modules for aptX
Umesh Vats [Wed, 13 Jul 2016 17:39:05 +0000 (10:39 -0700)]
Removed compilation dependency on proprietary modules for aptX

This commit takes care of removing compilation dependencies between
platform/system/bt and vendor/qcom/prop../bt/hci_qcomm_init/aptX.
aptX  module in the proprietary projects has been removed

Change-Id: Ibab863be20d7792d7eb187cb5c831a7f4972a19b
CRs-Fixed: 1036566

7 years agoBluetooth: Initial commit for BLE Gatt test tool
Satish kumar sugasi [Thu, 4 Jun 2015 00:23:40 +0000 (17:23 -0700)]
Bluetooth: Initial commit for BLE Gatt test tool

This file was copied from commit 4e6b49a440aff2e5bd31877b8b0d03cf6485bfa0
in platform/external/bluetooth/bluedroid project

Change-Id: I50007f918f750de7ceb29fcc965458c747b0641c

7 years agoBluetooth: Dynamic ACL buffer allocation based on ACL Priority
pramod kotreshappa [Wed, 7 May 2014 04:58:57 +0000 (21:58 -0700)]
Bluetooth: Dynamic ACL buffer allocation based on ACL Priority

1. A2dp acl link priority is set to high once streaming starts
2. Allocation min 2 ACL bufferswq to high priority link

CRs-fixed: 1040557
Change-Id: I8f7742ae193998643ff2a12bf87f9874844ee0f7

7 years agoAdd Remote Device BD address to role switch Blacklist.
Satheesh Kumar Pallemoni [Tue, 28 Jun 2016 11:00:42 +0000 (16:30 +0530)]
Add Remote Device BD address to role switch Blacklist.

When some remote devices acts as a slave role for incoming
connection to DUT, they will not respond to the AVDT signalling
commands properly and go to bad state.In this case role switch
would resolve this issue.

CRs-Fixed: 1035137
Change-Id: Ic1741d96f3409b29ee6ca2280c8ba97e214e9682

7 years agoBluetooth: Handle auth req in bta_dm_pinname_cback
Venkata Jagadeesh [Wed, 1 Jun 2016 09:54:58 +0000 (15:24 +0530)]
Bluetooth: Handle auth req in bta_dm_pinname_cback

As auth_req not handled properly in bta_dm_pinname_cback during
rnr,auth_req reset and DUT going for temperory pairing.

Change-Id: I5efa73c3f8079b5198ff672bd1d59a6ec52ec4f3
CRs-fixed: 1031548

7 years agoBT: Get chipset type dynamically during stack initialization
Manu Viswanadhan [Wed, 29 Jun 2016 11:32:20 +0000 (17:02 +0530)]
BT: Get chipset type dynamically during stack initialization

Get chipset type dynamically on the basis of qcom.bluetooth.soc
property during stack initialization. This helps in avoiding
compile time board configuration feature flags.

CRs-Fixed: 1035866

Change-Id: I65602b913c052633ec5627598a97ae85a29756f7

7 years agoSynchronize vendor callback and cleanup
Rupesh Tatiya [Wed, 22 Jun 2016 12:49:50 +0000 (18:19 +0530)]
Synchronize vendor callback and cleanup

There is a cleanup API which can free memory for btm_multi_adv_cb while
vendor callback API might be using this memory for processing. Protect
btm_multi_adv_cb resources across these two functions.

CRs-Fixed: 1028704
Change-Id: If2a6a7bd43bbaa629d2b3b3a9e825edcebb6f6fd

7 years agoBluedroid: Fixed Static Analysis Issues
Matadeen Mishra [Tue, 18 Aug 2015 08:01:42 +0000 (13:31 +0530)]
Bluedroid: Fixed Static Analysis Issues

  - This fix avoids NULL pointer dereferences
    and Array Index Out of Bounds Exceptions
    in the bluedroid code space of Bluetooth.

Change-Id: I6ad9f4518896975ff186b41086a8987c7de1eb91
CRs-Fixed: 890309

7 years agoBluetooth: GAP: Serialize the commands during Pairing process
Srinu Jella [Wed, 18 Dec 2013 06:27:33 +0000 (11:57 +0530)]
Bluetooth: GAP: Serialize the commands during Pairing process

Serialize the Remote version, Remote features, Authentication
requested commands.

This will make sure the above commands doesn't go simultaneously
to the remote device which can't handle the multiple comands
at a time.

Change-Id: I4448c291a60ee637dc5927806547e67f26571d86
CRs-Fixed: 896888

7 years agoBluetooth: SDP: Syncronize sdp callback functions
Venkata Jagadeesh [Tue, 21 Jun 2016 10:28:29 +0000 (15:58 +0530)]
Bluetooth: SDP: Syncronize sdp callback functions

Syncronize sdp callback functions in sdp server to
avoid race conditions in create/remove sdp records

CRs-Fixed: 1003295
Change-Id: Idb7a3e0a011c8ecd0d127d110e67e6a9a13a8ee9

7 years agoHID: Re-enable sniff with specific parameters to prevent LAGS
Hemant Gupta [Fri, 24 Jun 2016 14:25:52 +0000 (19:55 +0530)]
HID: Re-enable sniff with specific parameters to prevent LAGS

Usecase:
1. DUT Connected to BT Headset and MAgic Mouse
2. Make an outgoing call from DUT
3. Perform inquiry on DUT and check mouse movements.
4. Disconnect call from DUT/remote end.
5. Check Mouse Movements

Expected Result:
No lags should be seen with Mouse after call is disconnected.

Observed Results:
Lags are observed with Mouse after Call is disconnected.

Root Cause:
Remote BT Hid Mouse is not able to work with larger sniff parameters
so does not send Input reports leading to lags on DUT.

Fix:
Update sniff parameters to lower values (<15 ms interval) after call is
disconnected so that remote device works fine. Also as part
of SoC workaround, sniff should be disabled with blacklisted devices
only when DUT is slave on SCO link.

CRs-Fixed: 1039149
Change-Id: Ifa01abcae59b6f87842a763330b3a9f23511a675

7 years agoHF CLIENT: Change to disable sniff with specific Phones.
Satheesh Kumar Pallemoni [Fri, 24 Jun 2016 06:17:35 +0000 (11:47 +0530)]
HF CLIENT: Change to disable sniff with specific Phones.

When device is configured as hf client and connected to
AG, if AG goes into sniff, there may be disconnection
of hf connection with AG.We get information of AG's
manufacturer and model information using AT+CGMI
and AT+CGMM commands. We should disable sniff if AG's
model is known to have issues with sniff.

CRs-Fixed: 1021809
Change-Id: Iedfb8cbec7f716aadc83d511127834043eccfd57

7 years agoFixes for Issues reported by Static Analysis tool.
Satheesh Kumar Pallemoni [Fri, 1 Jul 2016 08:50:57 +0000 (14:20 +0530)]
Fixes for Issues reported by Static Analysis tool.

CRs-Fixed: 1036860
Change-Id: I0f4a69cbb4e47ecd333b14c2ff9fe0861166f858

7 years agoBluetooth: Kill the BT process immediately on detecting SSR
Ajay Kumar [Fri, 6 Nov 2015 07:43:42 +0000 (13:13 +0530)]
Bluetooth: Kill the BT process immediately on detecting SSR

Kill the BT process immediately on detecting SSR

CRs-Fixed: 801039
Change-Id: Id5007914140aa26c08579ca85f7622c79d73a00f

7 years agoaptX audio codec support
Umesh Vats [Tue, 21 Jun 2016 21:07:49 +0000 (14:07 -0700)]
aptX audio codec support

Support for a proprietary codec(aptX) based bluetooth audio
streaming   added.

CRs-Fixed: 962515
Change-Id: I821875227e168f9b74571c0ca814e577873b2f88

7 years agoBT: Fixed Static Analysis Issues
Matadeen Mishra [Tue, 7 Jun 2016 12:41:33 +0000 (18:11 +0530)]
BT: Fixed Static Analysis Issues

  - This fix avoids NULL pointer dereferences,
    Array Index Out of Bounds Exceptions
    and Banned funciton in the Fluedroid code
    space of Bluetooth.

Change-Id: If389820b427f39e1030013f14d5538d7c99ce9c6
CRs-Fixed: 1025718

7 years agoBluetooth: Introduced new interface for handling VS implementations
Manu Viswanadhan [Wed, 25 May 2016 06:47:20 +0000 (12:17 +0530)]
Bluetooth: Introduced new interface for handling VS implementations

Introduced new interface for handling vendor specific implementations

Created an API in the vendor interface that initiates SSR cleanup
that will be called in the case of enable and disable timeout.
SSR cleanup is called when the Bluetooth shuts down abruptly.
It sends vendor power OFF to the controller so that the next
startup occurs properly.

Created an API in the vendor interface that will be called while
transitioning from TURNING_OFF to BLE_ON, which cleanup the BREDR
profiles (from the btif layer). A callback is initiated from btif
layer which is redirected by the interface to the original implementation
of stopping the BREDR profiles. Also, since the cleanup for BREDR
profiles in the btif layer already happened during transition to
BLE_ON , the cleanup during BLE_TURNING_OFF to OFF is limited to
BLE profiles.

CRs-Fixed: 1027432

Change-Id: I4c0e8468aa71e1eeee7e81b39e71ad9f711c7a3e

7 years agoMisc AV changes in stack
Sumit Bajpai [Tue, 14 Jun 2016 09:55:37 +0000 (15:25 +0530)]
Misc AV changes in stack

1) Update UI on remote's browsing support.
2) Avoid sending get capability request if Avrcp TG.
3) Use Interop database for Abs vol.
4) Add 30msec uinput delay upon creation.
5) Role switch failure handling.
6) Misc A2dp/Avrcp handling.

CRs-Fixed: 1029888
Change-Id: I2e86285da9e9a0b7c5180fbefeb7665f62ac77cd

7 years agoAVRCP: Fix array index out of bound KW error.
AnubhavGupta [Fri, 3 Jun 2016 08:11:39 +0000 (13:41 +0530)]
AVRCP: Fix array index out of bound KW error.

 - fix array index out of bound KW error.

Change-Id: Id6531852141bcf53dc2132aa106a84179ec008e2