OSDN Git Service
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
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 [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
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
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
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 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
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
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 [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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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