OSDN Git Service

android-x86/system-bt.git
10 years agoMerge "PM: Stop Power Manager Timer if in sniff mode" into klp-wireless-dev
Matthew Xie [Wed, 16 Jul 2014 21:11:12 +0000 (21:11 +0000)]
Merge "PM: Stop Power Manager Timer if in sniff mode" into klp-wireless-dev

10 years agoPM: Stop Power Manager Timer if in sniff mode
Hemant Gupta [Thu, 12 Jun 2014 07:49:15 +0000 (13:19 +0530)]
PM: Stop Power Manager Timer if in sniff mode

Power manager timer is started when ACL link is in active mode
depending on profile connected. This timer was never stopped
when link was put in sniff mode by remote device preventing
system from going to sleep since timer is still active resulting
in extra power consumption.

Change-Id: I7569eed3ad7e0487e411377977b4f0671f24df12

10 years agoBluetooth: Update security for HID Devices to Encrypt on BT On.
Hemant Gupta [Thu, 29 Aug 2013 10:16:49 +0000 (15:46 +0530)]
Bluetooth: Update security for HID Devices to Encrypt on BT On.

This patch updates HID Devices security mask to BTA_SEC_ENCRYPT from
BTA_SEC_NONE. Without this change it was observed that on BT Reset,
authentication and encryption were not initiated by DUT for incoming
HID Control L2CAP Connection Request from remote HID Keyboard device.

Change-Id: I484fbae1294fde386bd7959467214f9968e381e9

10 years agoBluetooth: Getbuf returning invalid buffer pointer
Hemant Gupta [Fri, 12 Jul 2013 14:35:54 +0000 (20:05 +0530)]
Bluetooth: Getbuf returning invalid buffer pointer

Getbuff is checking for the pool which can accommodate
requested size, but is changing the pool with a restricted
check and not checking for the free memory size in that pool.
Added a check to avoid returng the wrong pool free buf pointer.
Without this patch, SDP Codenomicon TestSuite crash is observed
on Bluedroid stack.

Change-Id: Id66d460c5a40d8c3208438d7cfaf729e9b355184

10 years agoBluetooth: Increase number of allowed notifications
Nitin Arora [Thu, 9 Jan 2014 22:27:25 +0000 (14:27 -0800)]
Bluetooth: Increase number of allowed notifications

This change increase the maximum number of notifications
that can be registered for LE remote devices.
This count is increase from 7 to 15.

Change-Id: I422704e9bae69c48b731757526ed9ee4055aa643

10 years agoBluetooth: Adds SMP response timer for security request
Nitin Arora [Fri, 21 Feb 2014 02:52:41 +0000 (18:52 -0800)]
Bluetooth: Adds SMP response timer for security request

This adds timer to cancel security request from remote if there
is no response from user for pairing popup.

Change-Id: I18694dcc5275a1eb10de4ad921b6baca189b42fa

10 years agoSend correct status for SMP AUTH failure
Priti Aghera [Wed, 9 Jul 2014 21:58:19 +0000 (14:58 -0700)]
Send correct status for SMP AUTH failure

Send correct corresponding status for SMP AUTH failure to JAVA layer.
This will enable BluetoothEventManager to display correct error message
for bond state changed callback.
Bug 15677623

Change-Id: I6a8742926bac862f960890417b5d68c23b33e010

10 years agoMerge "DO NOT MERGE: Send to local UUID for AV connection" into klp-wireless-dev
Matthew Xie [Sat, 5 Jul 2014 19:50:41 +0000 (19:50 +0000)]
Merge "DO NOT MERGE: Send to local UUID for AV connection" into klp-wireless-dev

10 years agoImplement the reactor pattern in C.
Sharvil Nanavati [Mon, 23 Jun 2014 23:30:46 +0000 (16:30 -0700)]
Implement the reactor pattern in C.

This code will form the basis of most select-based event loops in
bluedroid. It provides a thread-safe abort routine and a separation
between the dispatcher and event handler code.

Change-Id: I6f1c033d18f045ba273187dab607c209dfe32d30

10 years agoDO NOT MERGE: Send to local UUID for AV connection
Ravi Nagarajan [Wed, 2 Jul 2014 10:15:34 +0000 (03:15 -0700)]
DO NOT MERGE: Send to local UUID for AV connection

BTA expects local UUID to be passed into BTA_AvOpen. The value of source/sink
was reversed in the btif layer thus causing connection failure
bug 15837817

Change-Id: If159ac0491afcb75659336c98caba3cefe71ee7b

10 years agoMerge "Code cleanup - remove unnecessary commented out code" into klp-wireless-dev
Wei Wang [Wed, 2 Jul 2014 19:05:46 +0000 (19:05 +0000)]
Merge "Code cleanup - remove unnecessary commented out code" into klp-wireless-dev

10 years agoCode cleanup - remove unnecessary commented out code
Wei Wang [Wed, 2 Jul 2014 18:34:08 +0000 (11:34 -0700)]
Code cleanup - remove unnecessary commented out code

Change-Id: I86e78d1b0470b9fda7455ae8ef5788814cf5c780

10 years agoDO NOT MERGE Fix compilation issue
Matthew Xie [Wed, 2 Jul 2014 06:50:46 +0000 (12:20 +0530)]
DO NOT MERGE Fix compilation issue

This patch fixes broken compilation on KWD branch

Change-Id: I9a1da11e33e938910dc556ed3e015bd3456e21ef

10 years agoMerge "Added code to reuse the signal fds and avoid fd close" into klp-wireless-dev
Matthew Xie [Wed, 2 Jul 2014 06:28:12 +0000 (06:28 +0000)]
Merge "Added code to reuse the signal fds and avoid fd close" into klp-wireless-dev

10 years agoAdded code to reuse the signal fds and avoid fd close
git-zhenye.broadcom.com [Fri, 20 Jun 2014 00:28:53 +0000 (17:28 -0700)]
Added code to reuse the signal fds and avoid fd close

Bug 15436535

Change-Id: Ica5b1915dd94699eb19c57b6904154493b0cc08c

10 years agoFixed deadlock issue for concurrent multiple rfcomm connections.
git-zhenye.broadcom.com [Thu, 12 Jun 2014 23:52:46 +0000 (16:52 -0700)]
Fixed deadlock issue for concurrent multiple rfcomm connections.

Bug 15469934

Change-Id: I77a3dc97c92f0ccd5764220e8e0bf5c0689d7b12

10 years agoLE Onfound and Onlost feature
Satya Calloji [Sun, 15 Jun 2014 06:16:18 +0000 (23:16 -0700)]
LE Onfound and Onlost feature

BTIF and stack layer changes for onfound/onlost feature

DO NOT MERGE

Change-Id: Id52cdd5855ca8c0ff276b42613b51c4cd3882bfc

10 years agoLE ADV Filter changes
Satya Calloji [Thu, 5 Jun 2014 20:15:15 +0000 (13:15 -0700)]
LE ADV Filter changes

BTIF and stack layer changes for ADV filter feature

DO NOT MERGE

Change-Id: I865e57c41802751e172248547b8510598261ec94

10 years agoLE batch scan feature
Satya Calloji [Sun, 11 May 2014 06:46:24 +0000 (23:46 -0700)]
LE batch scan feature

BTIF and stack changes for batch scan feature

DO NOT MERGE

Change-Id: I4dd2d551435e9f1f0e43906bd695294e97ed4bba

10 years agoAdd WBS support on Bluedroid (2/6)
Matthew Xie [Sun, 27 Apr 2014 12:45:32 +0000 (05:45 -0700)]
Add WBS support on Bluedroid (2/6)

Bug 13764086

Change-Id: I12bf302f7dd19efb497ad49d4d1d638a7a926049

10 years agoClear background conn list entries during BT power off
Nitin Arora [Thu, 30 Jan 2014 03:18:39 +0000 (19:18 -0800)]
Clear background conn list entries during BT power off

This clears whitelist entries and resets  bgconn device lists

Change-Id: I551791d63fa826071c113abd383540838f6c59b2

10 years agoMerge "Bluetooth: Updates background conn list properly during unpair" into klp-wirel...
Andre Eisenbach [Mon, 30 Jun 2014 19:22:03 +0000 (19:22 +0000)]
Merge "Bluetooth: Updates background conn list properly during unpair" into klp-wireless-dev

10 years agoBluetooth: Restarting PM timer during incoming rfcomm data.
Hemant Gupta [Mon, 30 Sep 2013 12:56:03 +0000 (18:26 +0530)]
Bluetooth: Restarting PM timer during incoming rfcomm data.

During incoming rfcomm data, we were setting the pm mode to
active, thereby stopping timer and never restarting it again.
So Dut was never going to sniff , if the last packet is incoming
packet. Therefore add change to restart the PM timer during incoming
data.

Change-Id: I4396bb2f267b12cb92a944c15609ddeaa13288ad

10 years agoGAP: Remove device info from storage on Pairing Cancel
Hemant Gupta [Thu, 14 Nov 2013 10:51:29 +0000 (16:21 +0530)]
GAP: Remove device info from storage on Pairing Cancel

Remove paired device information for SSP devices from the BT-IF
layer storage on pairing cancel.

Change-Id: I4660e3659866bd66339350b5cdb92bf3ad3cc850

10 years agoGAP:Add authentication failed error code in auth_compl_evt.
Hemant Gupta [Tue, 7 Jan 2014 12:41:15 +0000 (18:11 +0530)]
GAP:Add authentication failed error code in auth_compl_evt.

There is an unhandle failed HCI error code when pairing with
symbian OS phone nokia n95 which will cause no prompt when
auth failed.

Change-Id: I3a37c7732d1bf71c090bb968380d8c5f0af2ff79

10 years ago[2/2] Bluetooth: Security: Handle authentication rejected error status
Hemant Gupta [Wed, 31 Jul 2013 13:30:12 +0000 (19:00 +0530)]
[2/2] Bluetooth: Security: Handle authentication rejected error status

Handle error codes in authentication complete event with failures
like reject pairing , unspecified error.

Change-Id: I392b7531a8625efbf91bf80f7f617a6954229892

10 years agoBluetooth: Handle missing key event
Hemant Gupta [Wed, 19 Mar 2014 13:31:35 +0000 (19:01 +0530)]
Bluetooth: Handle missing key event

This change handles HCI_ERR_KEY_MISSING event
coming to the stack when user doesn't enter any
key and timeout happens.

Change-Id: If530e8acce3f105e4f1e2841bf350ee5330f389e

10 years agoBluetooth: Fix to avoid NULL pointer dereferences
Hemant Gupta [Wed, 8 Jan 2014 07:12:13 +0000 (12:42 +0530)]
Bluetooth: Fix to avoid NULL pointer dereferences

This fix for avoiding NULL pointer dereferences:
 - Added check for state checking in btm_remove_acl function
   to avoid sending disconnect command if already in Disconnecting
   state.
 - Added NULL check for 'pin_code' in btif_dm_pin_reply function
 - Null check before accessing in BD interface layer configuration
   node variables.
 - Add NULL check before accessing p_bd_addr variable to avoid null
    pointer exception while referring to invalid memory.

Change-Id: Ib7ed45b6a1692785a45224d739a564f767e5b10f

10 years agoGAP: Retain the old COD if already present
Hemant Gupta [Wed, 30 Oct 2013 14:40:04 +0000 (20:10 +0530)]
GAP: Retain the old COD if already present

Retain the old COD as the initial value if the device
entry already present in the list and entry is not in use.

Change-Id: I99b7269b1976ef7458c6568441e6e3c1e015a75f

10 years agoL2CAP: Send HCI connect with all packet types supported
Hemant Gupta [Tue, 30 Jul 2013 12:21:48 +0000 (17:51 +0530)]
L2CAP: Send HCI connect with all packet types supported

HCI create connect function is now supporting only single slot packet
during HCI connection initiation. Added support for all basic rate
packet types.

Change-Id: Ieeb892ea43dc9bb801a8f97a644a0f8c06b8184a

10 years agoMerge "GAP: Handle invalid SDP service search request" into klp-wireless-dev
Matthew Xie [Sun, 29 Jun 2014 05:14:40 +0000 (05:14 +0000)]
Merge "GAP: Handle invalid SDP service search request" into klp-wireless-dev

10 years agoGAP: Handle invalid SDP service search request
Hemant Gupta [Thu, 23 Jan 2014 13:08:44 +0000 (18:38 +0530)]
GAP: Handle invalid SDP service search request

Handled the invalid SDP service search request by responding
with SDP_INVALID_REQ_SYNTAX.

Change-Id: Ide3e28bf552f75a915acc3dbb24fcee0b4cce9bb

10 years agoGAP: Handled collision scenerio with headset
Hemant Gupta [Mon, 17 Mar 2014 09:37:01 +0000 (15:07 +0530)]
GAP: Handled collision scenerio with headset

Handled collision scenerio by rejecting remote link key req
when collision occured in the headset reconnection

Change-Id: Ic6383abfc46ecd251ae483af85d8af3031c91cad

10 years agoMerge "GAP: Handled collision scenerio with headset" into klp-wireless-dev
Matthew Xie [Sun, 29 Jun 2014 05:14:00 +0000 (05:14 +0000)]
Merge "GAP: Handled collision scenerio with headset" into klp-wireless-dev

10 years agoFix build: remove bte_version.c from makefile since it's not in the tree.
Sharvil Nanavati [Sun, 29 Jun 2014 05:03:24 +0000 (22:03 -0700)]
Fix build: remove bte_version.c from makefile since it's not in the tree.

Change-Id: I4e488cadd2b52e41ec83e4b2acac2dd7f9ca5b61

10 years agoAdd a flexible array to the end of BT_HDR to avoid pointer arithmetic.
Sharvil Nanavati [Tue, 24 Jun 2014 23:45:55 +0000 (16:45 -0700)]
Add a flexible array to the end of BT_HDR to avoid pointer arithmetic.

This change should clean up a lot of code. I've verified sizeof(BT_HDR)
remains constant after this change on ARM, x86, and x86_64.

Change-Id: I762351fa0f24a587da190de3e522bc74e497c542

10 years agoEliminate HCI flow control. It is not used anywhere in the codebase.
Sharvil Nanavati [Tue, 24 Jun 2014 07:39:06 +0000 (00:39 -0700)]
Eliminate HCI flow control. It is not used anywhere in the codebase.

Change-Id: If7244bdcf08023b0a093374950d6a5c1974fbbba

10 years agoRemove BTE/BTIF version strings. DID profile should specify stack version info.
Sharvil Nanavati [Wed, 25 Jun 2014 00:24:33 +0000 (17:24 -0700)]
Remove BTE/BTIF version strings. DID profile should specify stack version info.

Change-Id: I27806f8a88f7ea81ccab1fe48ab826ba428357e0

10 years agoEliminate unused argument to dealloc.
Sharvil Nanavati [Wed, 25 Jun 2014 00:02:30 +0000 (17:02 -0700)]
Eliminate unused argument to dealloc.

Change-Id: I9e54a9b9e8e250aa39e4fbfcbe934e7686d74cd4

10 years agoAdd documentation and non-blocking functions to fixed_queue.
Sharvil Nanavati [Mon, 23 Jun 2014 19:25:40 +0000 (12:25 -0700)]
Add documentation and non-blocking functions to fixed_queue.

Change-Id: Ia13166238847d6e1cebfda1bf5bdafd9ddc8b8e1

10 years agoLE: Add is_connected() function (2/3)
Andre Eisenbach [Wed, 18 Jun 2014 19:20:37 +0000 (12:20 -0700)]
LE: Add is_connected() function (2/3)

Change-Id: I73c4ea7f13982bf9c208996f9c749d2dfbe698be

10 years agoBluetooth: Updates background conn list properly during unpair
Nitin Arora [Sat, 22 Feb 2014 02:22:32 +0000 (18:22 -0800)]
Bluetooth: Updates background conn list properly during unpair

This ensures background connection devices order properly so that
unpaired devices are removed and there is no duplicates for
same remote device and hence no unneccessary pending LE
create connection

Change-Id: Ia4af0b00c598983c04e0f5109d1eb54be924e9f8

10 years agoLE: Add notification sent and congestion callbacks (2/4)
Andre Eisenbach [Fri, 28 Mar 2014 21:54:22 +0000 (14:54 -0700)]
LE: Add notification sent and congestion callbacks (2/4)

This change introduces two new callbacks for applications to better
handle LE notification flow control and transport congestion. The
notification callback is invoked when the remote platform confirms an
indication or when a local notification has been passed to the
controller. No new notifications should be sent until a callback is
received.

Congestion callbacks are triggered when a GATT operation cannot be sent
to the local Bluetooth controller. Repeatedly calling
writeCharacteristic() for example will eventually trigger a congestion
callback. Applications cannot send additional data until a further
callback is received, indicating that the congestion has cleared up.

Also fixes a memory leak issue that can trigger GKI exception for
certain GATT operations.

Change-Id: I7112bdfc1fedec2e390bd0ea52655d238683917f

10 years agoAdd documentation for semaphore and add a semaphore_try_wait function.
Sharvil Nanavati [Mon, 23 Jun 2014 19:07:05 +0000 (12:07 -0700)]
Add documentation for semaphore and add a semaphore_try_wait function.

Change-Id: I5440744e4bf7192efc4c8d0205502aa4296a4f9f

10 years agoBLE privacy timer
Chris Manton [Thu, 12 Jun 2014 19:52:33 +0000 (12:52 -0700)]
BLE privacy timer

Adds another timer with one-shot characteristic that
allows for variable firing of alarms.  Change the BLE
privacy code to use this timer rather than the
BTU continuous timer.

Change-Id: I6baa4e6a76813285c15f24aeb3c7ef942ed01858

10 years agoRIP: Removal of more dead timer code
Chris Manton [Wed, 11 Jun 2014 04:23:52 +0000 (21:23 -0700)]
RIP: Removal of more dead timer code

Change-Id: I6e05a1054c4bfd8ccd42cd9df8e3140ce67330c4

10 years agoExtended a few timer API functions
Chris Manton [Tue, 10 Jun 2014 04:47:16 +0000 (21:47 -0700)]
Extended a few timer API functions

Timer queue and entry were lacking a few functions.
Also added field in timer entry to indicate initial
timing condition for use in a variable timer

Change-Id: I4d987a5bb4eddb48f8c54de8d3da26f1c0b77584

10 years agoClean up DID configuration parsing.
Sharvil Nanavati [Sat, 14 Jun 2014 22:01:20 +0000 (15:01 -0700)]
Clean up DID configuration parsing.

Change-Id: Iba77c9924c1f4fe926a7e59653b80e9d836c4fc5

10 years agoClean up interaction with libbt-vendor library.
Sharvil Nanavati [Sun, 15 Jun 2014 20:36:45 +0000 (13:36 -0700)]
Clean up interaction with libbt-vendor library.

1. Fix resource leak: dlclose was never called on libbt-vendor.
2. Eliminate global variable bt_vnd_if.
3. Provide a header file instead of randomly importing functions.

Change-Id: I16d8a6d68324fb44a033705c4f4dbd31ebd52b58

10 years agoMake unit tests pass again after OS callout change.
Sharvil Nanavati [Sat, 7 Jun 2014 19:07:58 +0000 (12:07 -0700)]
Make unit tests pass again after OS callout change.

Change-Id: Icc7846faef581855c5fe3d12244d4a754badd9b7

10 years agoLogging cleanup: GKI.
Sharvil Nanavati [Sun, 4 May 2014 17:41:12 +0000 (10:41 -0700)]
Logging cleanup: GKI.

Change-Id: I85a415ef28629c047580b78b5b677c15852c615a

10 years agoFix build for mako devices.
Sharvil Nanavati [Thu, 19 Jun 2014 21:16:15 +0000 (14:16 -0700)]
Fix build for mako devices.

Change-Id: Ifdeb7177dc61386243c12d0996752fda7ece6912

10 years agoClean up btsnoop code.
Sharvil Nanavati [Sun, 15 Jun 2014 06:45:16 +0000 (23:45 -0700)]
Clean up btsnoop code.

Change-Id: Icb1dacb95453effa6d267c084353608dbdc915a3

10 years agoFix power management: config table length was calculated incorrectly.
Sharvil Nanavati [Sun, 8 Jun 2014 00:57:25 +0000 (17:57 -0700)]
Fix power management: config table length was calculated incorrectly.

Change-Id: I45563ed150d57d982e9eb2f61846c78b245b13ec

10 years agoLogging cleanup: remove unused macros.
Sharvil Nanavati [Sun, 4 May 2014 17:30:26 +0000 (10:30 -0700)]
Logging cleanup: remove unused macros.

Change-Id: Ibde16d4cf932475b34a1cb9e392838a9cb56c7f8

10 years agoFix build, replace logging macro.
Sharvil Nanavati [Thu, 19 Jun 2014 16:51:52 +0000 (09:51 -0700)]
Fix build, replace logging macro.

Change-Id: Ib1189b887d57253940fa38e8af24ea03462c403e

10 years agoLogging cleanup: BTIF and APPL.
Sharvil Nanavati [Sun, 4 May 2014 17:12:26 +0000 (10:12 -0700)]
Logging cleanup: BTIF and APPL.

Change-Id: I5b1214642bbb4b9aecc0fd2c899a6ec2c9793286

10 years agoLogging cleanup: AVRC, MCA, GATT, and SMP.
Sharvil Nanavati [Sun, 4 May 2014 17:03:35 +0000 (10:03 -0700)]
Logging cleanup: AVRC, MCA, GATT, and SMP.

Change-Id: I6d1e61ff023b5fd19f144955cff16831cc18c6e6

10 years agoLogging cleanup: A2D, AVDT, and AVCT.
Sharvil Nanavati [Sun, 4 May 2014 16:53:44 +0000 (09:53 -0700)]
Logging cleanup: A2D, AVDT, and AVCT.

Change-Id: I5a9d4bcdd65f6e965b434bf86949bba7155fd300

10 years agoLogging cleanup: HIDH, BNEP, and PAN.
Sharvil Nanavati [Sun, 4 May 2014 16:41:24 +0000 (09:41 -0700)]
Logging cleanup: HIDH, BNEP, and PAN.

Change-Id: I3b81b6875c764f0642be4f4d8905aa24524ea902

10 years agoLogging cleanup: RFCOMM and GAP.
Sharvil Nanavati [Sun, 4 May 2014 08:33:15 +0000 (01:33 -0700)]
Logging cleanup: RFCOMM and GAP.

Change-Id: I83fda4f0805aaeb2ca060870449868879edcff78

10 years agoLogging cleanup: L2CAP and SDP.
Sharvil Nanavati [Sun, 4 May 2014 08:08:21 +0000 (01:08 -0700)]
Logging cleanup: L2CAP and SDP.

Change-Id: I62b5d4f330312dc466a758cb554952017f899696

10 years agoMerge "Reload Hid info only for bonded device" into klp-wireless-dev
Matthew Xie [Wed, 18 Jun 2014 21:47:00 +0000 (21:47 +0000)]
Merge "Reload Hid info only for bonded device" into klp-wireless-dev

10 years agoAddress allocation scheme for multiple advertisers
Satya Calloji [Tue, 10 Jun 2014 23:52:25 +0000 (16:52 -0700)]
Address allocation scheme for multiple advertisers

bug 15329248

Change-Id: Ia5f2ce91f672c2c577dd3712a004f3cd3f573533

10 years agoReload Hid info only for bonded device
Priti Aghera [Thu, 15 May 2014 19:34:17 +0000 (12:34 -0700)]
Reload Hid info only for bonded device

Check if the device is bonded before loadind HID device information
after BT reset. If the HID info exists in NVRAM for unbonded device,
the device will not be able to repair.
bug 14837902

Change-Id: I5e6d5e8c5344ca8ae18f102e40867745d3f460ab

10 years agoFix build for aosp_manta
Prerepa Viswanadham [Wed, 11 Jun 2014 04:04:43 +0000 (21:04 -0700)]
Fix build for aosp_manta

Change-Id: Ic1e2363e7fb7d23dcaef8e989cae37606f2af664

10 years agoRemove dead timer code from btu
Chris Manton [Tue, 10 Jun 2014 05:01:12 +0000 (22:01 -0700)]
Remove dead timer code from btu

Change-Id: I28fb3fb64546aac6e08886f71f80fdeaf86fc5af

10 years agoFix build breakage due to bad rebase
Mike Lockwood [Tue, 10 Jun 2014 23:52:39 +0000 (16:52 -0700)]
Fix build breakage due to bad rebase

Change-Id: Ide8190f10add027b18a34bb2604d3cd407d94224

10 years agoFix garbage left in makefile
Mike Lockwood [Tue, 10 Jun 2014 23:26:37 +0000 (16:26 -0700)]
Fix garbage left in makefile

Change-Id: Iaf1482b3a8d83ee2f45723229e57195a13652824

10 years agoMove AVRCP controller support to separate HAL interface
Mike Lockwood [Mon, 2 Jun 2014 23:21:49 +0000 (16:21 -0700)]
Move AVRCP controller support to separate HAL interface

Change-Id: Ib7dcd7b90f85cf3b25148e2929d8921c6db37aa2

10 years agoMore work on A2DP Sink:
Mike Lockwood [Fri, 23 May 2014 19:42:24 +0000 (12:42 -0700)]
More work on A2DP Sink:

Output audio data through A2DP audio HAL rather than playing directly
to native AudioTrack API.

Add separate HAL interface for A2DP sink

Change-Id: I6c6cb6088c350e104b4a7354f328b29c7178e295

10 years agoSBC Decoder for A2DP SINK
Hemant Gupta [Thu, 20 Mar 2014 15:17:04 +0000 (20:47 +0530)]
SBC Decoder for A2DP SINK

Change-Id: Ic8d1dd81d1788324ec140fe0d1379dfff33deb54

10 years agoAdd A2DP Sink Support
Hemant Gupta [Thu, 24 Oct 2013 10:07:17 +0000 (15:37 +0530)]
Add A2DP Sink Support

Change-Id: I9affefdd2d00597545e49c593ef3bddb110d4c9c

10 years agoEliminate more dead code in GKI.
Sharvil Nanavati [Fri, 6 Jun 2014 08:26:23 +0000 (01:26 -0700)]
Eliminate more dead code in GKI.

Change-Id: I4c0000445535e5300b83a18f5f6ca45f1ef797da

10 years agoRe-layout Android.mk for single shared library
Chris Manton [Wed, 7 May 2014 23:21:00 +0000 (16:21 -0700)]
Re-layout Android.mk for single shared library

Shared object libraries require complete symbol resolution
while archives do not.  The hci, btutil and a2dp hbtutil were
built as shared, but used the other archive libraries (e.g. gki).
To resolve all symbols in each of the so's, they stubbed out
data interfaces to the common structures.
(e.g. hci/include/utils.h)

This will unify all libraries and eliminate multiple definitions
of the same structure.

Change-Id: I2af9a3e8a87888cd007aaf0809cdfc09039cd460

10 years agoEliminate dead code: remove GKI_sched* from the codebase.
Sharvil Nanavati [Fri, 6 Jun 2014 07:18:40 +0000 (00:18 -0700)]
Eliminate dead code: remove GKI_sched* from the codebase.

Change-Id: I607bd3bf88ef8847c8a7e984a54eabedd4fb7516

10 years agoParse auto_pair_devlist.conf file with the generic config parser.
Sharvil Nanavati [Wed, 4 Jun 2014 01:12:32 +0000 (18:12 -0700)]
Parse auto_pair_devlist.conf file with the generic config parser.

Change-Id: Idfd1aca2417d74725a8f9ac67b1ca946a33bf14d

10 years agoFix build: BTM_BleLocalPrivacyEnabled is called from outside BLE_PRIVACY_SPT guard.
Sharvil Nanavati [Sat, 7 Jun 2014 07:56:14 +0000 (00:56 -0700)]
Fix build: BTM_BleLocalPrivacyEnabled is called from outside BLE_PRIVACY_SPT guard.

Change-Id: I1ca7f824e035b496c9c038b9afdb4c4f2af4234b

10 years agoDisable BLE address randomization since it causes excessive timer wakeups.
Sharvil Nanavati [Mon, 2 Jun 2014 05:38:46 +0000 (22:38 -0700)]
Disable BLE address randomization since it causes excessive timer wakeups.

Change-Id: Ib4c2265d30b8bbaa7b5302537e446e18a97e2cad

10 years agoImplement GKI timers based on wake alarms and wake locks.
Sharvil Nanavati [Thu, 29 May 2014 00:09:46 +0000 (17:09 -0700)]
Implement GKI timers based on wake alarms and wake locks.

Before this change, bluedroid was unable to acquire wake locks
because the Bluetooth process didn't have permissions to write to
/sys/power/wake_*. We are now making wake locks accessible to
bluedroid through a HAL callout back into Java code.

The previous design did not use wake alarms. Bluedroid would attempt
to hold a wake lock until all pending timers expired, which is awful
if a timer is scheduled seconds or minutes from now. There is a
15min timer in bluedroid now so holding a wake lock for the entire
duration of pending alarms is unacceptable (power cost). The new
implementation uses a hybrid approach: if the next deadline is < 3s
away, we take a wake lock. If it is further than 3s away, we set a
wake alarm and release the wake lock.

As a result of this change, we have also eliminated a thread whose
sole purpose was to wake up every 10ms and update timers.

Change-Id: I46cd4edfcad2f5dce23c4003a14a617e7bf00541

10 years agoAllow btsnoop logs to be read over a local socket.
Sharvil Nanavati [Sat, 22 Mar 2014 21:27:07 +0000 (14:27 -0700)]
Allow btsnoop logs to be read over a local socket.

This change allows real-time HCI debugging over adb from a
Linux box using hcidump.

Example:
--------
adb forward tcp:8872 tcp:8872
nc localhost 8872 | hcidump -X -r /dev/stdin

Change-Id: I49c32a941f71f612807061284a755a38b76588ff

10 years agoMerge "Changed the status check for BleObserve" into klp-wireless-dev
Wei Wang [Fri, 6 Jun 2014 21:50:39 +0000 (21:50 +0000)]
Merge "Changed the status check for BleObserve" into klp-wireless-dev

10 years agoChanged the status check for BleObserve
Priti Aghera [Fri, 6 Jun 2014 20:54:08 +0000 (13:54 -0700)]
Changed the status check for BleObserve

Bta layer was expecting a successful BLEObserver return status to be BTM_SUCCESS.
Instead BleObserve returns BTM_CMD_STARTED when the scanning is successfully
started. Changed the check to be BTM_CMD_STARTED instead

bug 15167442

Change-Id: Ia600da7e6416e2caef5d34dba24955ae76d06dcc

10 years agoBluetooth: Assign max adv instance value from vendor capabilities
Nitin Arora [Fri, 6 Jun 2014 00:51:48 +0000 (17:51 -0700)]
Bluetooth: Assign max adv instance value from vendor capabilities

This change assigns the value of the max instances supported
for multiple advertisement, to the multi adv block

Change-Id: Ide181f8cad7a290a0dac8fdd01ae3ed2187868ef

10 years agoMerge "Save remote device name immediately" into klp-wireless-dev
Matthew Xie [Thu, 5 Jun 2014 19:48:11 +0000 (19:48 +0000)]
Merge "Save remote device name immediately" into klp-wireless-dev

10 years agoSave remote device name immediately
Matthew Xie [Thu, 5 Jun 2014 19:44:35 +0000 (12:44 -0700)]
Save remote device name immediately

bug 7381249

Change-Id: Ief1910c608116ebc28f5dc3e5804be65797ec53c

10 years agoRename UNUSED to UNUSED_ATTR in OSI due to symbol collision.
Sharvil Nanavati [Tue, 3 Jun 2014 07:16:07 +0000 (00:16 -0700)]
Rename UNUSED to UNUSED_ATTR in OSI due to symbol collision.

Change-Id: Ib26dbae713b3096adf2496f0ff0fcb607693b163

10 years agoSupport for reading LE specific controller features
Ganesh Ganapathi Batta [Fri, 30 May 2014 23:28:00 +0000 (16:28 -0700)]
Support for reading LE specific controller features

Support for reading LE specific controller features via get adapter properties
API

Change-Id: Ia0b813be45fb826ce27d1d7a31ca41650d7286dd

10 years agoLogging cleanup: HCI and BTM trace macros.
Sharvil Nanavati [Sun, 4 May 2014 07:46:57 +0000 (00:46 -0700)]
Logging cleanup: HCI and BTM trace macros.

Change-Id: Icdea5aede9fde2c11d0cde745a9bedc26d69640c

Conflicts:
stack/btm/btm_acl.c
stack/btm/btm_ble.c
stack/btm/btm_ble_bgconn.c
stack/btm/btm_ble_gap.c
stack/btm/btm_inq.c
stack/btm/btm_pm.c
stack/btm/btm_sec.c

10 years agoWhitelist IPv6 packets so they can be sent over PAN.
Sharvil Nanavati [Sat, 31 May 2014 04:04:03 +0000 (21:04 -0700)]
Whitelist IPv6 packets so they can be sent over PAN.

Change-Id: I68e96bc34af1dfded2761c9bc780c089076d15e0

10 years agoUse an event file descriptor instead of a pipe to control userial.
Sharvil Nanavati [Sun, 27 Apr 2014 21:34:50 +0000 (14:34 -0700)]
Use an event file descriptor instead of a pipe to control userial.

Change-Id: I480752ab77a8d25eb2a2c770f7bb44f7e400b15f

10 years agoUse the generic config parser to parse bt_stack.conf.
Sharvil Nanavati [Mon, 5 May 2014 05:48:09 +0000 (22:48 -0700)]
Use the generic config parser to parse bt_stack.conf.

Change-Id: I4dc9307f5f5e0702c7a6283a59c94c56cead2eb6

10 years agoAdd a generic config parser for the INI file format.
Sharvil Nanavati [Mon, 5 May 2014 04:33:52 +0000 (21:33 -0700)]
Add a generic config parser for the INI file format.

There are currently multiple INI parsers in bluedroid and they're
special-purpose for the task at hand even though they parse the
same format. This implementation is general-purpose, loosely coupled
with the rest of bluedroid, and has unit tests to verify behaviour.

Change-Id: I61caf416cc16d76b871cbf04f333c26894ab3fef

10 years agoStart cleaning up log macros.
Sharvil Nanavati [Sun, 4 May 2014 06:06:49 +0000 (23:06 -0700)]
Start cleaning up log macros.

Change-Id: I228fef0198caeb47618a07c4c46526f611933e07

10 years agoAdd a couple more tests for list.
Sharvil Nanavati [Mon, 5 May 2014 04:53:31 +0000 (21:53 -0700)]
Add a couple more tests for list.

Change-Id: I603d8daa81075b93c26f997be2a7caa64370a9a8

10 years agoImplement a fixed queue.
Sharvil Nanavati [Sat, 3 May 2014 06:55:09 +0000 (23:55 -0700)]
Implement a fixed queue.

Change-Id: Ifad7605d0b6e1a57f4767f9de1bed7e99284ded7

10 years agoBluetooth: Changes to enable features on KWD
Nitin Arora [Thu, 29 May 2014 01:50:09 +0000 (18:50 -0700)]
Bluetooth: Changes to enable features on KWD

This patch contains changes needed to enable features,
multiple advertisment, packet content filtering and
privacy mode on kwd branch

Change-Id: If95bfb38eafe26f16db20e7650865c2f19553548

10 years ago[2/4] Add Support for AVRCP Controller Feature
Hemant Gupta [Fri, 7 Feb 2014 11:04:47 +0000 (16:34 +0530)]
[2/4] Add Support for AVRCP Controller Feature

  - Provide support for AVRCP Controller CAT 1 and CAT 2
    Passthrough commands.

Change-Id: Ia3ca08c1139d9a98b86919b51d7480e0245c35f3

10 years agoFix build issue for devices without BLE features.
Wei Wang [Tue, 20 May 2014 06:23:35 +0000 (23:23 -0700)]
Fix build issue for devices without BLE features.

Change-Id: I6499663d253c791cc739ed76b839eb3aefe6613a

10 years agoLE: Add RRA offloading and vendor specific PCF commands
Satya Calloji [Mon, 12 May 2014 16:13:02 +0000 (09:13 -0700)]
LE: Add RRA offloading and vendor specific PCF commands

Change-Id: Iadca8e73ceaadcd0429421ea70f1b76644e88c42