OSDN Git Service

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

10 years agoLE Multi ADV feature
Satya Calloji [Wed, 30 Apr 2014 22:55:39 +0000 (15:55 -0700)]
LE Multi ADV feature

BTIF and stack changes for LE multi ADV feature

Change-Id: I5e009ff8cbac5fc6f92ca943c61c4faf98e4e2ce

10 years agoMerge "[2/4] Bluetooth: Add support for HFP Client role." into klp-wireless-dev
Mike Lockwood [Thu, 15 May 2014 20:06:55 +0000 (20:06 +0000)]
Merge "[2/4] Bluetooth: Add support for HFP Client role." into klp-wireless-dev

10 years agoMerge "Submitted on behalf of 3rd party copied from external/bluetooth/bluedroid...
Mike Lockwood [Thu, 15 May 2014 20:06:34 +0000 (20:06 +0000)]
Merge "Submitted on behalf of 3rd party copied from external/bluetooth/bluedroid" into klp-wireless-dev

10 years agoLE: Add API to set scan interval and window (2/4)
Prerepa Viswanadham [Fri, 9 May 2014 23:08:49 +0000 (16:08 -0700)]
LE: Add API to set scan interval and window (2/4)
Delete client_if from scan api's
Change-Id: I66e0e17221601cd07ea77cf3d61ad9ce20a603a4

10 years ago[2/4] Bluetooth: Add support for HFP Client role.
Hemant Gupta [Mon, 19 Aug 2013 13:03:01 +0000 (18:33 +0530)]
[2/4] Bluetooth: Add support for HFP Client role.

Implementation changes in BTA and BTIF layer to support
HFP Client role.

Change-Id: I9f939c18e8f989a50f298d0b313c5a0959c030a7

10 years agoSubmitted on behalf of 3rd party copied from external/bluetooth/bluedroid
Hemant Gupta [Tue, 29 Apr 2014 10:53:59 +0000 (16:23 +0530)]
Submitted on behalf of 3rd party copied from external/bluetooth/bluedroid

Initial commit for HFP Client

Change-Id: I26b7d49b76ab28b019314ddb514e8f46b3bc4772

10 years agoUnable to pair and connect A2DP headset with DUT on KWD
Zhihai Xu [Thu, 8 May 2014 23:39:34 +0000 (16:39 -0700)]
Unable to pair and connect A2DP headset with DUT on KWD

this is due to some field type is not defined correctly.
We don't have this problem with old compile option.
recently some compile option change expose this bug.

bug:14489818
Change-Id: Ief48ec7d1312eb588fc344ea0afb153226bf0541

10 years agoClean up the public functions in userial.c.
Sharvil Nanavati [Sat, 26 Apr 2014 17:40:30 +0000 (10:40 -0700)]
Clean up the public functions in userial.c.

Change-Id: I6513296a8c606c49a4cadf196d89573948026e4a

10 years agoEliminate dead code (helped by compiler warnings).
Sharvil Nanavati [Sat, 3 May 2014 22:33:15 +0000 (15:33 -0700)]
Eliminate dead code (helped by compiler warnings).

I've removed all functions that the compiler decided were unused.

Change-Id: I0cbddf874ebd1586abe29b80e8d6390680679542

10 years agoFix data type for rmt_auth_req; it stores an integral value.
Sharvil Nanavati [Sat, 3 May 2014 19:11:15 +0000 (12:11 -0700)]
Fix data type for rmt_auth_req; it stores an integral value.

This broke pairing in a bunch of ways, most notably the inability
to use Just Works pairing mode. Just Works is used quite heavily
by iOS devices.

http://b/14438257

Change-Id: I4d32b446d0435acfc73987b91dbd1a0bd3b53ec3

10 years agoMinor cleanup of userial code.
Sharvil Nanavati [Sat, 26 Apr 2014 07:58:15 +0000 (00:58 -0700)]
Minor cleanup of userial code.

Change-Id: Ib8b094196f2de1515f79f17c4b87eb05f4c113dc

10 years agoUpdate RFCOMM socket code to use list data structure.
Sharvil Nanavati [Sat, 26 Apr 2014 05:38:55 +0000 (22:38 -0700)]
Update RFCOMM socket code to use list data structure.

Change-Id: I70402d8bfaa36b36d3d4b8f3cec98371691e86c9

10 years agoUpdate btif_profile_queue to use the list data structure.
Sharvil Nanavati [Sat, 26 Apr 2014 06:16:01 +0000 (23:16 -0700)]
Update btif_profile_queue to use the list data structure.

The profile queue maintains a list of pending connect operations
for each profile. If a connect is followed by a disconnect before
the queued connect is dispatched, the disconnect will have no
effect and the connect will proceed.

This code clearly needs to be re-thought; it may be a good idea to
abandon the connect queue entirely in the long-run.

Change-Id: Ic0e85654abcf7a47f65953edb301eb9524394950

10 years agoAdd a singly linked list implementation for OSI.
Sharvil Nanavati [Thu, 24 Apr 2014 23:22:45 +0000 (16:22 -0700)]
Add a singly linked list implementation for OSI.

Change-Id: Ifffd6f9eabee482a81b326c9cf8d06163aede0f4

10 years agoBluetooth: On Suspend ignore media task timer event
Hemant Gupta [Thu, 5 Sep 2013 14:12:50 +0000 (19:42 +0530)]
Bluetooth: On Suspend ignore media task timer event

On Recieving Suspend confirmation from remote device,
Media task timer reload and tx_timer is made false,
hence media task will not be stopped at that instant.
Media task timer expires causing buffer to be allocated.
Changes done to ensure buffer is allocated only if tx_timer
is true.

Change-Id: I971a82cccc64ba033475ad532b096862968de942

10 years agoHID: Send Close event to upper layers during reconnection
Hemant Gupta [Fri, 2 May 2014 19:01:26 +0000 (00:31 +0530)]
HID: Send Close event to upper layers during reconnection

This patch sends close event callback to upper layers, so that UI
is updated of correct state of HID connection when connection
between hid host and hid device drops for some reason and host is
attempting reconnection. Without this patch, upper layers gives
false update of connection still present when actually no connection
exists between hid devices. Connection state was only getting updated
if reconnection attempt was also failing.

Change-Id: Ic276d9b57c5c84c4264ddeeadc34c983c718ba3a

10 years agoGAP: Return BTM_CMD_STARTED from btm_sec_l2cap_access_req
Hemant Gupta [Thu, 19 Dec 2013 15:07:16 +0000 (20:37 +0530)]
GAP: Return BTM_CMD_STARTED from btm_sec_l2cap_access_req

Return BTM_CMD_STARTED from btm_sec_l2cap_access_req when
remote device link is neither authenticated or encrypted so as
to send L2CAP Peer connect response with status auth pending.
This lets remote device extend the waiting time. This fixes IOT
issues with HP laptop EliteBook 8440p/8460p where pairing was
not possible.

Change-Id: I6cf6a72640de938a8145b541d4bad1bcba758ac5

10 years agoMHF: Route call to correct HS in multi call scenario.
Hemant Gupta [Mon, 5 May 2014 12:15:08 +0000 (17:45 +0530)]
MHF: Route call to correct HS in multi call scenario.

  - This change makes sure that audio routes back to correct
    headset in multi call scenario even though the other
    headset tries to answer or dial.
  - Ignore setting hf_idx for ATA/BLDN received from HS
    for a waiting call when an active/held call is already
    present.

Change-Id: I19949471d481bf911fda2222dc6d730d1a821b65

10 years agoMerge "fix random crashes in bd2str caused by exceeding string array" into klp-wirele...
Matthew Xie [Mon, 5 May 2014 18:06:38 +0000 (18:06 +0000)]
Merge "fix random crashes in bd2str caused by exceeding string array" into klp-wireless-dev

10 years agoResolve Pairing failure with IPhone
Ganesh Ganapathi Batta [Mon, 28 Apr 2014 23:30:55 +0000 (16:30 -0700)]
Resolve Pairing failure with IPhone

When pairing is initiated from the iPhone side, it sets Bonding bit
without MITM. We responded to this with No bonding, No MITM. This resulted
in JustWorks & Unauthenticated link key. After pairing iPhone initiates a
RFCOMM connection. This caused a link key upgrade to be done, which the iPhone
rejected, resulting in pairing failure. To resolve this the following
enhancements were made
1. If locally initiated pairing always set Bonding bit + MITM
2. If remote initiated
a. copy over the bonding bit
b. if peer has DisplayYesNo set MITM
3. As a fallback if remote had MITM, enable MITM in our response
This forces pairing to use Bonding bit+MITM thus resulting in authenticated
combination linkkey

Change-Id: I08f16c80821bc822023180d01868614ba41e6d88

10 years agoTemporarily fix test suite to swap arguments until code from AOSP is merged in.
Sharvil Nanavati [Sun, 4 May 2014 00:12:15 +0000 (17:12 -0700)]
Temporarily fix test suite to swap arguments until code from AOSP is merged in.

Change-Id: I5d8e56f7581df9bcefc8c46518835cac588f47df

10 years agoInitial import of HAL-layer tests for bluedroid.
Sharvil Nanavati [Thu, 10 Apr 2014 05:20:40 +0000 (22:20 -0700)]
Initial import of HAL-layer tests for bluedroid.

The test cases are in cases/, the support infrastructure for the
tests are in support/. Initially, as new test cases are being added
for different functional areas (e.g. BT socket) we'll need to also
write support functions to make those tests easier to write.
Over time, however, the support functions will be complete enough
that writing additional tests won't require also writing support
routines.

Change-Id: I54abb1011ca5132834a334cc256e3ff18cc20cbb

10 years agoMerge "Fix Null pointer access in GKI timer library" into klp-wireless-dev
Matthew Xie [Fri, 2 May 2014 22:19:38 +0000 (22:19 +0000)]
Merge "Fix Null pointer access in GKI timer library" into klp-wireless-dev

10 years agoMerge "Fix issue of HDP select thread not exiting during BT OFF" into klp-wireless-dev
Matthew Xie [Fri, 2 May 2014 21:33:24 +0000 (21:33 +0000)]
Merge "Fix issue of HDP select thread not exiting during BT OFF" into klp-wireless-dev

10 years agoGAP: Avoiding two disconnections from DUT
Hemant Gupta [Fri, 18 Apr 2014 09:34:43 +0000 (15:04 +0530)]
GAP: Avoiding two disconnections from DUT

Avoid sending two hci disconnect commandss from DUT when remote
initiated connection fails when user presses cancel for incoming
pairing request.

Change-Id: Idd05ffbcaac427515a54216adcdd7dbe26cb21c8

10 years agoGAP: Update local device name immediately
Hemant Gupta [Mon, 6 Jan 2014 08:58:28 +0000 (14:28 +0530)]
GAP: Update local device name immediately

Though the function btif_config_set_str requests to
save device name immediately, sometimes it doesn't
call save device name if the cached changes are more.

So calling the "btif_config_save" explicitly to avoid
failure cases.

Change-Id: I9fb05caf284d6a6feb906f87a4db19896182d2c9

10 years agoFix Null pointer access in GKI timer library
Ganesh Ganapathi Batta [Mon, 28 Apr 2014 23:21:04 +0000 (16:21 -0700)]
Fix Null pointer access in GKI timer library

Change-Id: Iada2d426fe4592416eed988202c14599656b33e4

10 years agoMerge BT 4.1 features
Ganesh Ganapathi Batta [Wed, 16 Apr 2014 23:50:09 +0000 (16:50 -0700)]
Merge BT 4.1 features

The features include:
- LE Peripheral Mode
- Link Layer topology (LE Central & Peripheral Concurrency)
- Dual Mode Topology (Ability to choose LE transport when connecting with
other Dual Mode devices)
- Fast advertising Interval
- Limited Discovery Time Changes
- GAP Authentication and Lost Bond
- Dual Mode Addressing
- Common Profile and Service Error Code
- 32 bit UUIDs

Change-Id: Ic6701da4cf6aaa390ff2c8816b43157f36b7fb42

10 years agofix random crashes in bd2str caused by exceeding string array
Ganesh Ganapathi Batta [Wed, 30 Apr 2014 00:32:14 +0000 (17:32 -0700)]
fix random crashes in bd2str caused by exceeding string array

remove all casts to avoid sign extension of bd address as this may
exceed the size of destination str buffer

Change-Id: I27dc7e61b52440c6b284b7e9931e6daa66afbf12

10 years agofix compilation error due to not include correct header
Zhihai Xu [Tue, 29 Apr 2014 23:08:48 +0000 (16:08 -0700)]
fix compilation error due to not include correct header

Change-Id: Ic4c1fb319f9c4202efd108d180f438a6fa26e05a

10 years agoAdd support for Multi-HFP devices
Nitin Srivastava [Fri, 14 Mar 2014 23:19:58 +0000 (16:19 -0700)]
Add support for Multi-HFP devices

1. Add multi headset support in stack.
2. Each HS will be associated with unique CB in BTIF
and also corresponding SCB in BTA.
3. Upstream event callbacks will be sent to
specific HS based on BD_ADDR.
4. Similiarly all commands to BTIF will be for
specific HS.

Change-Id: I0dc6b1b54f16244b802d818ae60944877a41d020

10 years agoBluetooth: Clear Notification array on AVRCP disconnect
Nitin Srivastava [Thu, 13 Feb 2014 14:01:40 +0000 (19:31 +0530)]
Bluetooth: Clear Notification array on AVRCP disconnect

DUT does not clear previous AVRCP notification registration
on AVCTP disconnect hence DUT sends response even when remote
device hasn't registered.
Changes made to clear notification array and while sending
notification respose check if event is registered.

Change-Id: I610f8ae6381a63236378f179bb2a619ec0c6549e

10 years agoSet out stream to null if control socket fails to connect
Nitin Srivastava [Fri, 31 Jan 2014 10:21:24 +0000 (15:51 +0530)]
Set out stream to null if control socket fails to connect

Set out stream to null if control socket fails to connect.
This helps in avoiding wrong usage of audio device out stream
even after the same is freed as part of control socket connection
failure.

Change-Id: I8e2a7bbc71d581525b7eef1955e411c220d01627

10 years agoBluetooth: retry recv in case of EINTR
Nitin Srivastav [Fri, 21 Feb 2014 13:03:14 +0000 (18:33 +0530)]
Bluetooth: retry recv in case of EINTR

 -  retry recv call in HAL, in case socket call
    fails with EINTR

Change-Id: I3ab27752b0ce0a68f6776cf5da340580e7d1f345

10 years agoBluetooth: GAP: Remove bonded device info on Authentication fail
Zhihai Xu [Wed, 27 Nov 2013 08:40:53 +0000 (14:10 +0530)]
Bluetooth: GAP: Remove bonded device info on Authentication fail

Remove bonded device information from the BT-IF layer storage
on authentication failure if already bonded with just works
model.
from QCOM
Change-Id: Ia3c1635c446f39b1dbd4cdd0122c2f70cbbc8dd7

10 years agoFix issue of HDP select thread not exiting during BT OFF
Ganesh Ganapathi Batta [Mon, 28 Apr 2014 23:25:52 +0000 (16:25 -0700)]
Fix issue of HDP select thread not exiting during BT OFF

Change-Id: I52a0a3caff327a7a51e293c431ddbc99db690180

10 years agoUse standard C99 integral types. This offers better type safety.
Sharvil Nanavati [Thu, 17 Apr 2014 04:51:56 +0000 (21:51 -0700)]
Use standard C99 integral types. This offers better type safety.

Notice that I had to change a couple of function declarations
because the compiler caught the inconsistency with the new typedefs.

Change-Id: I202fd1dc086de41e1cfe083eb1a5f74a942d01e5

10 years agoIncreasing the SDP_MTU_SIZE from 256 to the default 672 bytes
Zhihai Xu [Thu, 16 Jan 2014 05:49:32 +0000 (21:49 -0800)]
Increasing the SDP_MTU_SIZE from 256 to the default 672 bytes

This works better with IOT of devices
bug 10588724

Change-Id: I28fd74339d8f344b056b82bf2d71e7d70be7a0fa

10 years agoa2dp audio HAL: use correct interface version
Zhihai Xu [Fri, 21 Mar 2014 01:01:09 +0000 (18:01 -0700)]
a2dp audio HAL: use correct interface version

Do not use AUDIO_DEVICE_API_VERSION_CURRENT version
but AUDIO_DEVICE_API_VERSION_2_0 to reflect the version
actually implemeted.

Change-Id: I31407af7fc4769be1d259ee739422ce9f598be2e

10 years agoAllow simultaneous LE Observe and BTM Inquiry/Scan
Zhihai Xu [Sat, 22 Feb 2014 02:20:37 +0000 (18:20 -0800)]
Allow simultaneous LE Observe and BTM Inquiry/Scan

This patch allows BTM inquiry and LE observe to be launched
and overlap each others' occurance by redirecting results
and handling states accordingly.

CRs-Fixed: 579505

Conflicts:
stack/btm/btm_ble_gap.c
bug 12939764
Change-Id: Ifde73f17f8d40e9ebfff3b49e409591189574ee0

10 years agoSDP: Allocate proper sized scratch buffer for SDP response
Zhihai Xu [Fri, 7 Feb 2014 19:47:26 +0000 (01:17 +0530)]
SDP: Allocate proper sized scratch buffer for SDP response

The buffer allocated for attribute response is being reused
for subsequent requests for an SDP connection. Check the
buffer size before using for subsequent requests and
reallocate if required.

Change-Id: Ib00aff2c4512192c29265cf0adb89e380adf0b35

10 years agoflounder64: bluetooth: Adjust volume level on BT HS and DUT side
Zhihai Xu [Mon, 7 Apr 2014 08:13:06 +0000 (16:13 +0800)]
flounder64: bluetooth: Adjust volume level on BT HS and DUT side

MW600 Bluetooth address is "58:17:0c:e8:b0:7a". It is not included in
AVRCP profile white list. So it can't support absolute volume. We need
to  whitelist it by device name "MW600" instead device address method.

Signed-off-by: Thomas.TT_Lin <Thomas.TT_Lin@htc.com>
Change-Id: I41b27fbab13dcf9d0005e8d5ae25ffb95eb546d4

10 years agoaudio: fix set_parameters return value.
Zhihai Xu [Wed, 26 Mar 2014 01:36:27 +0000 (18:36 -0700)]
audio: fix set_parameters return value.

xxx_set_parameters functions were returning the status
returned by str_parms_create_str() which is incorrect.
These functions should return 0 when no error occurs.

Change-Id: I984d95457c985fbaf1a15baa522f8a84f99dd7c9

10 years agoHID: Use dynamic memory while sending data
Hemant Gupta [Mon, 21 Apr 2014 18:53:21 +0000 (00:23 +0530)]
HID: Use dynamic memory while sending data

This patch uses dynamic memory allocation while sending HID output data to
remote device depending on size of data to be sent. Without this patch
fixed size static buffer of 200 bytes was being used for sending data to
remote device, which was resulting in crash in case data size to be sent
to remote device was greater than 200 bytes.

Change-Id: I5ed12422355e88d7ef0391668800d7619ca3b685

10 years agoHID: Parse paired hid devices from bluez.
Hemant Gupta [Fri, 25 Oct 2013 16:30:07 +0000 (22:00 +0530)]
HID: Parse paired hid devices from bluez.

This patch adds support for parsing SDP records of paired HID devices
from bluez device storage path and store the parsed hid sdp data into
bluedroid storage path. Without this patch, it was not possible to
have paired HID devices during upgrade from BlueZ to Bluedroid Stack.

Change-Id: I7db4a801f3cf9ca46fc0eabfd929e8d7c16b5edb

10 years agoGAP: Try to retrieve CoD from NVRAM if 0
Hemant Gupta [Thu, 28 Nov 2013 07:37:10 +0000 (13:07 +0530)]
GAP: Try to retrieve CoD from NVRAM if 0

This patch tries to retreive CoD from NVRAM if CoD is 0. This is
because in scenarios when airplane mode on/off, inquiry is not
performed again on devices shown in Available devices List of
UI, so CoD is 0 during SSP information as database of stack is
not properly updated since inquiry is not performed again. Without
this patch it was observed because of wrong CoD info device icon
for HID mouse was changed to Joystick and device is not shown in
Paired List. Also some extra debug logs are added in code for
better debugging.

Change-Id: I14858ccee04728cb4b9cd60d397b79fa6494b842

10 years agoHID: Reset Disconnect Reason on Connection Establishment
Hemant Gupta [Fri, 5 Jul 2013 18:05:58 +0000 (23:35 +0530)]
HID: Reset Disconnect Reason on Connection Establishment

This patch resets the disconnect reason to successful on HID Interrupt
channel establishment. Without this change, wrong reason is propogated
to BTA layer on disconnection initiated either from DUT or Remote end.

Change-Id: I42641b511e44a761574faf8eafb7b0826e24aeb3

10 years agoHID: Remove device from nvram on auth failure
Zhihai Xu [Fri, 13 Dec 2013 10:39:21 +0000 (16:09 +0530)]
HID: Remove device from nvram on auth failure

This patch removed hid pointing device from nvram on authentication failure
due to pairing timeout or when wrong passkey is entered. Without this patch
it was observed that hid pointing device was always shown in paired list
when DUT was restarted after authentication failure.
CL from qcom(Hemant Gupta)
Change-Id: I69c43d2ed982d5d5abfd5707db90ef4b5c65b34f

10 years agoHID: Use dynamic memory while sending report
Zhihai Xu [Mon, 21 Apr 2014 19:05:42 +0000 (00:35 +0530)]
HID: Use dynamic memory while sending report

This patch uses dynamic memory allocation while sending HID output data to
remote device depending on size of data to be sent. Without this patch
fixed size static buffer of 200 bytes was being used for sending data to
remote device, which was resulting in crash in case data size to be sent
to remote device was greater than 200 bytes.

CL from qcom(Hemant Gupta)
Change-Id: Icc8cd4a4ecfd4bc30cbf848a7c865fcf9308ddf8

10 years agoHID: Serialize L2CAP disconnection
Hemant Gupta [Tue, 29 Oct 2013 06:11:16 +0000 (11:41 +0530)]
HID: Serialize L2CAP disconnection

This patch serializes host initiated hid disconnection by sending
control channel disconnect request only when disconnection response
for interrupt channel has been received.

Change-Id: Ie0c5c62593bb0dd32f83b76bf0d6c1d950f1a684

10 years agoHID: Handle connection failure in disconnecting state
Hemant Gupta [Fri, 22 Nov 2013 15:23:53 +0000 (20:53 +0530)]
HID: Handle connection failure in disconnecting state

This patch handles connectio error of interrupt channel while in
disconnecting state. Without this patch it was seen that upper
layers would not be informed about failure of interrupt channel
connection in this corner case leading to UI stuck at connecting
forever.

Change-Id: I1f5f18e70470eff17b21f2ed921edaefd3c89f9c

10 years agoHID: Reset Idle timeout to 0 while hid disconnection
Hemant Gupta [Mon, 9 Dec 2013 13:13:33 +0000 (18:43 +0530)]
HID: Reset Idle timeout to 0 while hid disconnection

This patch resets idle l2cap timeout to 0 while disconnecting HID L2CAP's.
without this patch it was observed that after hid l2cap disconnection,
ACL disconnection was taking 4 seconds.

Change-Id: I39f16d3981f4a8b5cdf28cd7865631900007d5b8

10 years agoMerge "HID: Fix memory leak in HID Code" into klp-wireless-dev
Zhihai Xu [Mon, 21 Apr 2014 19:08:50 +0000 (19:08 +0000)]
Merge "HID: Fix memory leak in HID Code" into klp-wireless-dev

10 years agoHID: Fix memory leak in HID Code
Zhihai Xu [Sun, 24 Nov 2013 10:53:55 +0000 (16:23 +0530)]
HID: Fix memory leak in HID Code

This patch fixes memory leak in HID code when interrupt reports are
received from remote device before HID connection is setup.
CL from qcom(Hemant Gupta)

Change-Id: If4fe961921c7b1212035cf5f2aa60d2359e322e2

10 years agoMerge "HID: Establish Interrupt Channel when Control channel is configured" into...
Zhihai Xu [Mon, 21 Apr 2014 19:04:04 +0000 (19:04 +0000)]
Merge "HID: Establish Interrupt Channel when Control channel is configured" into klp-wireless-dev

10 years agoHID: Reduce poll time to 50 ms for polling from uhid driver
Hemant Gupta [Thu, 10 Apr 2014 11:00:55 +0000 (16:30 +0530)]
HID: Reduce poll time to 50 ms for polling from uhid driver

This patch reduces poll time for data received from uhid driver to 50 ms
from existing 500 ms. Without this change bta thread was getting blocked upto
max 500 ms when HID is disconnected, which caused delay in sending
of AVDTP Media packets during A2DP and HID concurrent test cases resulting
in audio break on BT headset during HID disconnection as closing of uhid
polling thread is done from BTA context.

Change-Id: I033e2d81e895831555bbfdff1f93fad5f2cc5e59

10 years agoHID: Update SSR parameters during copy.
Hemant Gupta [Mon, 21 Apr 2014 18:14:13 +0000 (23:44 +0530)]
HID: Update SSR parameters during copy.

This patch correctly stores SSR parameters (max latency and min timeout)
retrieved from remote device SDP record in NVRAM.

Change-Id: I87d8b6181981090df21ab746deac7053a1d0e938

10 years agoMerge "Fix GKI exception of calling free on an already freed buffer" into klp-wireles...
Zhihai Xu [Mon, 21 Apr 2014 18:15:54 +0000 (18:15 +0000)]
Merge "Fix GKI exception of calling free on an already freed buffer" into klp-wireless-dev