OSDN Git Service

android-x86/system-bt.git
10 years agoam b62769de: Merge "Add audio_input_flags_t to HAL open_input_stream" into lmp-dev
Glenn Kasten [Thu, 17 Jul 2014 18:23:28 +0000 (18:23 +0000)]
am b62769de: Merge "Add audio_input_flags_t to HAL open_input_stream" into lmp-dev

* commit 'b62769de1683b58eb23a1bb5ca7106e77a642f37':
  Add audio_input_flags_t to HAL open_input_stream

10 years agoam 0eb7f497: Merge "Fix GKI_add_to_timer_list to handle middle-of-list insertions...
Andre Eisenbach [Thu, 17 Jul 2014 18:23:15 +0000 (18:23 +0000)]
am 0eb7f497: Merge "Fix GKI_add_to_timer_list to handle middle-of-list insertions correctly" into lmp-dev

* commit '0eb7f49738d2d6c12f3db77b74d9e404180e9a3f':
  Fix GKI_add_to_timer_list to handle middle-of-list insertions correctly

10 years agoam dd29f036: Revert "Clean up messy dispatch in bt_hci_bdroid by using new primitives."
Svetoslav Ganov [Thu, 17 Jul 2014 18:23:14 +0000 (18:23 +0000)]
am dd29f036: Revert "Clean up messy dispatch in bt_hci_bdroid by using new primitives."

* commit 'dd29f036a8cde94b3c296fb08ee3e9b2d65c15e0':
  Revert "Clean up messy dispatch in bt_hci_bdroid by using new primitives."

10 years agoam 3f9fbe74: Clean up messy dispatch in bt_hci_bdroid by using new primitives.
Sharvil Nanavati [Thu, 17 Jul 2014 18:15:42 +0000 (18:15 +0000)]
am 3f9fbe74: Clean up messy dispatch in bt_hci_bdroid by using new primitives.

* commit '3f9fbe74c1d6e774d3f21275515c7b895715aec5':
  Clean up messy dispatch in bt_hci_bdroid by using new primitives.

10 years agoam 94347a59: Extend the threading library to back thread with an event queue.
Sharvil Nanavati [Thu, 17 Jul 2014 18:15:42 +0000 (18:15 +0000)]
am 94347a59: Extend the threading library to back thread with an event queue.

* commit '94347a59972868cf6d74f92cf793eb0b4b97c45a':
  Extend the threading library to back thread with an event queue.

10 years agoam ab606b5e: Expose enqueue/dequeue file descriptors for fixed_queue.
Sharvil Nanavati [Thu, 17 Jul 2014 18:15:41 +0000 (18:15 +0000)]
am ab606b5e: Expose enqueue/dequeue file descriptors for fixed_queue.

* commit 'ab606b5ecd59ab9fd8a59cf4437993a44068a6ee':
  Expose enqueue/dequeue file descriptors for fixed_queue.

10 years agoam 81173491: Merge "Bluetooth: Cleaning up pan_conn DB, if connection is not successf...
Sharvil Nanavati [Thu, 17 Jul 2014 06:37:09 +0000 (06:37 +0000)]
am 81173491: Merge "Bluetooth: Cleaning up pan_conn DB, if connection is not successful." into klp-wireless-dev

* commit '81173491454e47a0a24ab30fae0b59248516e844':
  Bluetooth: Cleaning up pan_conn DB, if connection is not successful.

10 years agoRevert "Clean up messy dispatch in bt_hci_bdroid by using new primitives."
Svetoslav Ganov [Thu, 17 Jul 2014 00:26:24 +0000 (00:26 +0000)]
Revert "Clean up messy dispatch in bt_hci_bdroid by using new primitives."

This change broke the build. Reverting to unblock people waiting for a green build to start working.

This reverts commit 3f9fbe74c1d6e774d3f21275515c7b895715aec5.

Change-Id: I58c3bdcc2f5f3fe744b8d3f80753566cf1d22bd1

10 years agoMerge "Add audio_input_flags_t to HAL open_input_stream" into lmp-dev
Glenn Kasten [Thu, 17 Jul 2014 15:18:33 +0000 (15:18 +0000)]
Merge "Add audio_input_flags_t to HAL open_input_stream" into lmp-dev

10 years agoAdd audio_input_flags_t to HAL open_input_stream
Glenn Kasten [Thu, 17 Jul 2014 14:33:51 +0000 (07:33 -0700)]
Add audio_input_flags_t to HAL open_input_stream

Change-Id: I5023c0fdb8069668ca2b84096277d6abdbf7d729

10 years agoMerge "Fix GKI_add_to_timer_list to handle middle-of-list insertions correctly" into...
Andre Eisenbach [Thu, 17 Jul 2014 01:59:17 +0000 (01:59 +0000)]
Merge "Fix GKI_add_to_timer_list to handle middle-of-list insertions correctly" into lmp-dev

10 years agoFix GKI_add_to_timer_list to handle middle-of-list insertions correctly
Andre Eisenbach [Thu, 17 Jul 2014 01:35:56 +0000 (18:35 -0700)]
Fix GKI_add_to_timer_list to handle middle-of-list insertions correctly

The newly added timer_list code didn't handle middle-of-list insertions
correctly, leading to problems pairing certain Bluetooth devices as well
as causing 100% CPU usage for the Bluetooth task.

Change-Id: I3d4c22b775a91da2a3f983e8c78facbd91d4cb7d

10 years agoMerge "Bluetooth: Cleaning up pan_conn DB, if connection is not successful." into...
Sharvil Nanavati [Thu, 17 Jul 2014 06:26:21 +0000 (06:26 +0000)]
Merge "Bluetooth: Cleaning up pan_conn DB, if connection is not successful." into klp-wireless-dev

10 years agoBluetooth: Cleaning up pan_conn DB, if connection is not successful.
Nitin Shivpure [Thu, 3 Oct 2013 13:36:12 +0000 (19:06 +0530)]
Bluetooth: Cleaning up pan_conn DB, if connection is not successful.

A case where DUT is paired with remoteDeviceA &  remoteDeviceB.
remoteDeviceA is not pagable(turned off or some other reason).
DUT(PANU) try to connect remoteDeviceA(NAP). But connection is
unsuccessful, Because remoteDeviceA is not pagable, In this scenario
btpan_conn Database is not cleaning up at btif layer. Later
remoteDeviceB(PANU) connect to DUT(NAP) & connection is succesful,
When remoteDeviceB disconnect existing connection. As database
still has remoteDeviceA BD address at Btif layer. remoteDeviceA
BD address is passed instead of remoteDeviceB BD address from Btif
to UI. So remoteDeviceB still shows connected on UI. Cleaning up
pan_conn database for particular pan connection at BTIF layer,
whichever connection is not successful will solve this issue.

Change-Id: I31dfe3ef46295e74bbfb57563e4fd4fc7155f006

10 years agoam 99ebcfc0: Merge "PM: Stop Power Manager Timer if in sniff mode" into klp-wireless-dev
Matthew Xie [Wed, 16 Jul 2014 21:18:20 +0000 (21:18 +0000)]
am 99ebcfc0: Merge "PM: Stop Power Manager Timer if in sniff mode" into klp-wireless-dev

* commit '99ebcfc07fe517454e14a8dc815a48344d0da559':
  PM: Stop Power Manager Timer if in sniff mode

10 years agoam 2a5cec82: Bluetooth: Update security for HID Devices to Encrypt on BT On.
Hemant Gupta [Wed, 16 Jul 2014 21:18:20 +0000 (21:18 +0000)]
am 2a5cec82: Bluetooth: Update security for HID Devices to Encrypt on BT On.

* commit '2a5cec826e72e2c9ced8f3ccf772fec179186e71':
  Bluetooth: Update security for HID Devices to Encrypt on BT On.

10 years agoClean up messy dispatch in bt_hci_bdroid by using new primitives.
Sharvil Nanavati [Sun, 6 Jul 2014 04:21:38 +0000 (21:21 -0700)]
Clean up messy dispatch in bt_hci_bdroid by using new primitives.

Instead of dispatching onto a worker thread by setting bits of a
bitfield and then having the thread pull data from shared data
structures, this code uses the previously defined primitives to
write to a synchronized thread event queue. It's advantageous because
it's more direct dispatch (you specify which function you want to
call on the worker thread instead of mapping bitfields to a function),
it avoids a lot of boilerplate code, function calls have predictable
ordering, and it uses generic infrastructure instead of building a
custom dispatch + synchronized data strucures.

Change-Id: If938e4fd47c8ddf328a29d104151f900ec659588

10 years agoExtend the threading library to back thread with an event queue.
Sharvil Nanavati [Sat, 5 Jul 2014 00:51:29 +0000 (17:51 -0700)]
Extend the threading library to back thread with an event queue.

This change allows arbitrary functions to be called on a given
thread which will clean up much of the dispatch code in bluedroid.
Looking forward, this code will be extended to allow additional objects
and queues to be attached to a thread for more customizable dispatch.

Change-Id: Id3a16256c264e3d35e6db5a562cb0e7762676457

10 years agoExpose enqueue/dequeue file descriptors for fixed_queue.
Sharvil Nanavati [Fri, 4 Jul 2014 23:33:37 +0000 (16:33 -0700)]
Expose enqueue/dequeue file descriptors for fixed_queue.

These file descriptors can be used with a reactor to perform
non-blocking enqueue/dequeue operations.

Change-Id: If75730f9093e8d20a789a7bd2bde92e019922e5a

10 years agoam 446da53d: Eliminate last_ticks from TIMER_LIST_ENT.
Sharvil Nanavati [Wed, 16 Jul 2014 18:07:56 +0000 (18:07 +0000)]
am 446da53d: Eliminate last_ticks from TIMER_LIST_ENT.

* commit '446da53d6fd03ca19eef8c43a56b27091ea7c54b':
  Eliminate last_ticks from TIMER_LIST_ENT.

10 years agoEliminate last_ticks from TIMER_LIST_ENT.
Sharvil Nanavati [Tue, 15 Jul 2014 22:18:12 +0000 (15:18 -0700)]
Eliminate last_ticks from TIMER_LIST_ENT.

It's unnecessary, potentially calculated incorrectly, and the insertion
logic that depended on it was fragile. I've rewritten the list
insertion routine so it's easier to follow. This should also fix
http://b/16259295.

Change-Id: Ib7184c94c495c03d3acbe105955b1bb712dbbfaa
(cherry picked from commit a1bfd3ee95378fab78c931c3360cfbd16de3b617)

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 agoEliminate last_ticks from TIMER_LIST_ENT.
Sharvil Nanavati [Tue, 15 Jul 2014 22:18:12 +0000 (15:18 -0700)]
Eliminate last_ticks from TIMER_LIST_ENT.

It's unnecessary, potentially calculated incorrectly, and the insertion
logic that depended on it was fragile. I've rewritten the list
insertion routine so it's easier to follow. This should also fix
http://b/16259295.

Change-Id: Ib7184c94c495c03d3acbe105955b1bb712dbbfaa

10 years agoam 5ff866c6: Bluetooth: Getbuf returning invalid buffer pointer
Hemant Gupta [Tue, 15 Jul 2014 17:02:39 +0000 (17:02 +0000)]
am 5ff866c6: Bluetooth: Getbuf returning invalid buffer pointer

* commit '5ff866c6cf008ed5361c8a37256cb9656adc3cfc':
  Bluetooth: Getbuf returning invalid buffer pointer

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 agoExtend the threading library to back thread with an event queue.
Sharvil Nanavati [Sat, 5 Jul 2014 00:51:29 +0000 (17:51 -0700)]
Extend the threading library to back thread with an event queue.

This change allows arbitrary functions to be called on a given
thread which will clean up much of the dispatch code in bluedroid.
Looking forward, this code will be extended to allow additional objects
and queues to be attached to a thread for more customizable dispatch.

Change-Id: Id6f86435add1a1d13a0f18f3979df68a6ce16663

10 years agoExpose enqueue/dequeue file descriptors for fixed_queue.
Sharvil Nanavati [Fri, 4 Jul 2014 23:33:37 +0000 (16:33 -0700)]
Expose enqueue/dequeue file descriptors for fixed_queue.

These file descriptors can be used with a reactor to perform
non-blocking enqueue/dequeue operations.

Change-Id: I19c790598e63bf632847f97d93526e1ce7ebdbec

10 years agoMerge "Calculate A2DP frames to send based on elapsed time"
Andre Eisenbach [Sat, 12 Jul 2014 01:18:05 +0000 (01:18 +0000)]
Merge "Calculate A2DP frames to send based on elapsed time"

10 years agoCalculate A2DP frames to send based on elapsed time
Andre Eisenbach [Fri, 11 Jul 2014 23:57:24 +0000 (16:57 -0700)]
Calculate A2DP frames to send based on elapsed time

This patch is aimed at improving A2DP audio quality by sending the
correct number of frames based on the actual time elapes between "ticks"
in order to account for timer drift.

Change-Id: If5b7cde90f5eb10b926ad247f51cff0eb60bbff7

10 years agoA2DP: Fix audio stuttering in A2DP sink mode
Mike Lockwood [Fri, 11 Jul 2014 19:05:04 +0000 (12:05 -0700)]
A2DP: Fix audio stuttering in A2DP sink mode

Change-Id: Ied821aeb14f83e3fd1daa6e175ac995abbfbb198

10 years agoMerge "Fix GKI buffer leak with discovery information service reading"
Mike J. Chen [Sat, 12 Jul 2014 00:57:15 +0000 (00:57 +0000)]
Merge "Fix GKI buffer leak with discovery information service reading"

10 years agoFix GKI buffer leak with discovery information service reading
Mike J. Chen [Sat, 28 Jun 2014 02:01:10 +0000 (19:01 -0700)]
Fix GKI buffer leak with discovery information service reading

If the discovery information service of the LE client has
the fields model number, serial number, fw version, etc,
the service would allocate PKI buffer and never do anything
with it, so it would leak.  It looks like it should have
been assigned the a callback string array, however fixing
that still doesn't fix the leak because the code that receives
the string array, bta_hh_le_dis_cback(), never uses it and
never frees it.

I believe the semantic is that the string arrays are kept around
as a cache in the srvc engine connection structure,
so it's the srvc engine dealloc of the callback structure that
needs to also free the string buffers if they have been allocated.
After fixing the string array allocation, add code to free the
string array entries if they are not null.

Also fixed an off by one error in DIS_SrUpdate() that would also lead
to a GKI buffer leak.

Improve two string termination cases to use a simple set of the
last entry in the char array instead of memsetting the whole array
when most of it will be filled by a following memcpy.

Change-Id: I7905cd771dbbe166e3c2b42e019bac9f5a312877
Signed-off-by: Mike J. Chen <mjchen@google.com>
10 years agoFix deadlock and non-working socket msg throttling
Mike J. Chen [Tue, 1 Jul 2014 19:41:02 +0000 (12:41 -0700)]
Fix deadlock and non-working socket msg throttling

Two major bugs in btif_config.c.  One is that due to improper
locking order, a deadlock could occur (symptom is generally
out of GKI buffers because BTIF thread stops processing it's
mailbox because it is blocked sending a msg to the socket
thread, which in turn is blocked because BTIF is holding
the lock it needs to do the config save that BTIF requested
in the first place).

The other is also lock related.  The mechanism to throttle
socket messages based on whether there was one already
in flight wasn't working because there wasn't locking
when that variable was being used.  The compiler would be
free to cache it in a register on SMP machines, so it would
never look like there as a value in flight.  This would
cause a bunch of messages to be queued up, and then the
way the handling worked in cfg_cmd_callback(), every
cmd would cause a 3 second sleep, even if there was nothing
to do.  Modified the loop to check if there was nothing
to do before sleeping.

I was running into both bugs when repeatedly pairing and
unpairing a BLE device.  The deadlock would hit first, causing
out of GKI buffers.  Once I fixed the deadlock, I would still
run out of GKI buffers because the socket thread wasn't working
fast enough to clear the backlog of socket messages it had
received.

Also optimized some string termination code which was using
a memset of the full buffer before and then copying over
every entry except the last.  Now we do the copy and just
set the last buffer entry to null.

Change-Id: Ic06ef0b8e15d8f1fe669fb88439851ffbad560de
Signed-off-by: Mike J. Chen <mjchen@google.com>
10 years agoam 02d9b7b4: Bluetooth: Increase number of allowed notifications
Nitin Arora [Fri, 11 Jul 2014 01:40:18 +0000 (01:40 +0000)]
am 02d9b7b4: Bluetooth: Increase number of allowed notifications

* commit '02d9b7b41f1fcf21e798a4c0aabde89f00729d08':
  Bluetooth: Increase number of allowed notifications

10 years agoam 7475a509: Bluetooth: Adds SMP response timer for security request
Nitin Arora [Fri, 11 Jul 2014 01:40:17 +0000 (01:40 +0000)]
am 7475a509: Bluetooth: Adds SMP response timer for security request

* commit '7475a5098339d763aa6e3a0374ee2f1c16e002c4':
  Bluetooth: Adds SMP response timer for security request

10 years agoam 156c52bb: Send correct status for SMP AUTH failure
Priti Aghera [Fri, 11 Jul 2014 01:40:17 +0000 (01:40 +0000)]
am 156c52bb: Send correct status for SMP AUTH failure

* commit '156c52bb003a14147db99d8a151edc08f591bd34':
  Send correct status for SMP AUTH failure

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 agoMerge "Fix deadlock and non-working socket msg throttling"
Mike J. Chen [Sat, 12 Jul 2014 00:57:09 +0000 (00:57 +0000)]
Merge "Fix deadlock and non-working socket msg throttling"

10 years agoFix GKI buffer leak in GATT event handling
Mike J. Chen [Tue, 1 Jul 2014 19:15:12 +0000 (12:15 -0700)]
Fix GKI buffer leak in GATT event handling

The GATT event handler was telling the BTA dispatcher that
it would always free the GKI msg buffers itself, but in fact
this wasn't true.  There were some cases where the buffer is
queued and freed later (queued in p_clcb->p_q_cmd for later
access and freeing), but many times the event handlers
(like bta_gattc_ci_save()) don't queue the buffer and don't
free it, causing a GKI buffer leak.

Also, prevent a double free case (not certain it happens, but
in theory it could) if bta_gattc_sm_execute() queues a buffer
in bta_gattc_disc_cmpl().

Lastly, remove held flag since it's redundant with whether
p_q_cmd is null or not.  Just go with one source of truth and
not have one shadow the other.

Change-Id: I1bd43919b8a2e125076e26cd6a3a08480b3e7e2d
Signed-off-by: Mike J. Chen <mjchen@google.com>
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 "Fix GKI timers to take execution time into account"
Andre Eisenbach [Wed, 9 Jul 2014 21:35:39 +0000 (21:35 +0000)]
Merge "Fix GKI timers to take execution time into account"

10 years agoFix GKI timers to take execution time into account
Andre Eisenbach [Mon, 7 Jul 2014 18:29:34 +0000 (11:29 -0700)]
Fix GKI timers to take execution time into account

Previously, the GKI timer system would not take the time taken for
updating the timers into account when re-scheduling the next timer. This
would by design introduce timer drift into the system.

This patch measures the time taken for an alarm to be triggered to
report the correct number of ticks to the GKI timer subsystem, as well
as measuring the time taken for updating the timers to adjust the next
alarm accordingly.

This patch dramatically improves A2DP audio quality on various devices
which currently suffer timer drift problems.

Change-Id: Ia99454abcb2a6889c47b1d8e267705f29ebe7b64

10 years agoAdd template doc for Android properties used by bluedroid.
Sharvil Nanavati [Sun, 6 Jul 2014 04:31:25 +0000 (21:31 -0700)]
Add template doc for Android properties used by bluedroid.

Change-Id: Idafbaa69161a7fa01a381d9b4fc5d9f41bc5695f

10 years agoMerge "Prevent A2DP bit pool calculation endless loops."
Andre Eisenbach [Wed, 9 Jul 2014 17:03:00 +0000 (17:03 +0000)]
Merge "Prevent A2DP bit pool calculation endless loops."

10 years agoExpose semaphore's file descriptor.
Sharvil Nanavati [Sun, 6 Jul 2014 03:42:07 +0000 (20:42 -0700)]
Expose semaphore's file descriptor.

|semaphore_get_fd| can be used by callers to determine if it's safe
to call |semaphore_wait| and |semaphore_post| without blocking.

Change-Id: Icf758f03ea2aa85cddcb4ab3f7906b2c587fb8ac

10 years agoStart of threading library
Sharvil Nanavati [Thu, 8 May 2014 05:09:12 +0000 (22:09 -0700)]
Start of threading library

So far it's a thin shim around pthreads which allows setting thread
name and querying tids from any thread.

Change-Id: Id156f662778806a54a8a302be424ee051fac4710

10 years agoPrevent A2DP bit pool calculation endless loops.
Andre Eisenbach [Tue, 8 Jul 2014 19:33:38 +0000 (12:33 -0700)]
Prevent A2DP bit pool calculation endless loops.

This prevents log spam and endless loops in the A2DP bit pool
calculation. Protecting against the endless loop with prevent battery
draining issues and phone unresponsiveness.

This patch addresses the symptom. A separate patch will be submitted
once root cause is determined to address the problem.

Change-Id: I045b724c1c1638551b9333249f39eee109fa9ba1

10 years agoBluetooth: Rename BTA_AVK_INCLUDED flag to BTA_AV_SINK_INCLUDED (bt_target.h)
lungtsai_lin [Wed, 2 Jul 2014 12:39:02 +0000 (20:39 +0800)]
Bluetooth: Rename BTA_AVK_INCLUDED flag to BTA_AV_SINK_INCLUDED (bt_target.h)

Now OEM could enable/disable A2DP SINK role

Change-Id: I62cf17b0397a86c5f886a2c1ca724ca77a7f9bd4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
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 agoMerge "audio: deprecate audio_stream_frame_size()"
Eric Laurent [Sun, 6 Jul 2014 17:07:59 +0000 (17:07 +0000)]
Merge "audio: deprecate audio_stream_frame_size()"

10 years agoam 85b4ee5d: (-s ours) Merge "DO NOT MERGE: Send to local UUID for AV connection...
Matthew Xie [Sat, 5 Jul 2014 19:53:58 +0000 (19:53 +0000)]
am 85b4ee5d: (-s ours) Merge "DO NOT MERGE: Send to local UUID for AV connection" into klp-wireless-dev

* commit '85b4ee5df4208fd06e836f40d7a19a84545f4e93':
  DO NOT MERGE: Send to local UUID for AV connection

10 years agoaudio: deprecate audio_stream_frame_size()
Eric Laurent [Thu, 3 Jul 2014 23:09:53 +0000 (16:09 -0700)]
audio: deprecate audio_stream_frame_size()

Bug: 15000850.
Change-Id: I1edcc78561cdc328ae0d91a1d07b0836ca5e1715

10 years agoFix signed - unsigned comparison in bluedroid test.
Narayan Kamath [Thu, 3 Jul 2014 10:48:20 +0000 (11:48 +0100)]
Fix signed - unsigned comparison in bluedroid test.

Change-Id: I702e9406a31424f27de2b600cb55c92e255917dd

10 years agoam 19084c62: Implement the reactor pattern in C.
Sharvil Nanavati [Thu, 3 Jul 2014 06:35:53 +0000 (06:35 +0000)]
am 19084c62: Implement the reactor pattern in C.

* commit '19084c6242d8ddb366a52eba5084c974280cce0f':
  Implement the reactor pattern in C.

10 years agoam b3c61229: Merge "Code cleanup - remove unnecessary commented out code" into klp...
Wei Wang [Wed, 2 Jul 2014 19:09:15 +0000 (19:09 +0000)]
am b3c61229: Merge "Code cleanup - remove unnecessary commented out code" into klp-wireless-dev

* commit 'b3c61229ccf38ea3f398f93902d348ba12a7fb07':
  Code cleanup - remove unnecessary commented out code

10 years agoam a92c04f2: (-s ours) DO NOT MERGE Fix compilation issue
Matthew Xie [Wed, 2 Jul 2014 07:36:33 +0000 (07:36 +0000)]
am a92c04f2: (-s ours) DO NOT MERGE Fix compilation issue

* commit 'a92c04f2dbd7f88853d6380d66c1f4d200674f97':
  DO NOT MERGE Fix compilation issue

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 agoFix build: change macro call from _DEBUG0 to _DEBUG.
Sharvil Nanavati [Wed, 2 Jul 2014 07:13:07 +0000 (00:13 -0700)]
Fix build: change macro call from _DEBUG0 to _DEBUG.

Change-Id: Iacbf4c33a7b690e2065471b85a6a4d82dd4a7fca

10 years agoam 23ae7c52: Merge "Added code to reuse the signal fds and avoid fd close" into klp...
Matthew Xie [Wed, 2 Jul 2014 06:29:09 +0000 (06:29 +0000)]
am 23ae7c52: Merge "Added code to reuse the signal fds and avoid fd close" into klp-wireless-dev

* commit '23ae7c526b529cf1c76c4a4cc8a341545493404d':
  Added code to reuse the signal fds and avoid fd close

10 years agoam 359895ef: Fixed deadlock issue for concurrent multiple rfcomm connections.
git-zhenye.broadcom.com [Wed, 2 Jul 2014 06:29:09 +0000 (06:29 +0000)]
am 359895ef: Fixed deadlock issue for concurrent multiple rfcomm connections.

* commit '359895efb36a7e4f65fbcc9a28221b6ede44aadd':
  Fixed deadlock issue for concurrent multiple rfcomm connections.

10 years agoUse POSIX timer for non-wake alarms in bluedroid.
Sharvil Nanavati [Wed, 2 Jul 2014 00:11:24 +0000 (17:11 -0700)]
Use POSIX timer for non-wake alarms in bluedroid.

After this change, bluedroid will go through AlarmManager for wake
alarms (>= 3s) and POSIX timers + wake lock for short deadlines.
This change allows A2DP to continue streaming while the screen is
off.

Change-Id: I56622a6873aa431842dd1d97e830849ac2fe6773

10 years agoRemove more unused code from GKI timers.
Sharvil Nanavati [Mon, 30 Jun 2014 01:10:15 +0000 (18:10 -0700)]
Remove more unused code from GKI timers.

Change-Id: I4fc3a64312b49a3dd23d80454244f8eb6340d8e6

10 years agoRemove more unused code from GKI.
Sharvil Nanavati [Mon, 30 Jun 2014 00:36:56 +0000 (17:36 -0700)]
Remove more unused code from GKI.

Specifically:
 - ISR code (since bluedroid is entirely userspace)
 - logging macros
 - newlines in log macros
 - GKI_get_time_stamp (unused function)
 - GKI_freeze
 - unused timer variables and macros

Change-Id: I8e0676c28842d87c4148059ebb0320367658bc16

10 years agoFix problem with A2DP initialization due to merge error
Mike Lockwood [Wed, 2 Jul 2014 02:21:30 +0000 (19:21 -0700)]
Fix problem with A2DP initialization due to merge error

btif_av_init() would fail when called a second time due to
erroneous nulling of btif_av_cb.sm_handle

Bug: 16014877
Change-Id: I7e6b213759e93372ac8ecaadc2b81452572f3f7d

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 agoBluetooth: Support MAP Client role on Bluedroid.
Hemant Gupta [Fri, 18 Apr 2014 07:24:08 +0000 (12:54 +0530)]
Bluetooth: Support MAP Client role on Bluedroid.

Implementation changes from BTA and BTIF layer to support
MCE role on Bluedroid stack.

Change-Id: I8547b0f28338e83edabae969121872ca23fdcb36

10 years agoFix audio HAL build (make it a shared library again)
Mike Lockwood [Tue, 1 Jul 2014 03:30:09 +0000 (20:30 -0700)]
Fix audio HAL build (make it a shared library again)

Bug: 15978121
Change-Id: I23ba30f27b73b48a1d9128d294641367bfffa810

10 years agoam 7ae3f9ee: LE Onfound and Onlost feature
Satya Calloji [Tue, 1 Jul 2014 01:08:03 +0000 (01:08 +0000)]
am 7ae3f9ee: LE Onfound and Onlost feature

* commit '7ae3f9eebc4e930d51e6b61f845ffd0f9a8cb9f8':
  LE Onfound and Onlost feature

10 years agoam 5e177043: (-s ours) LE ADV Filter changes
Satya Calloji [Tue, 1 Jul 2014 01:08:03 +0000 (01:08 +0000)]
am 5e177043: (-s ours) LE ADV Filter changes

* commit '5e177043e3dfcd70676761a40425179d16c4a7ce':
  LE ADV Filter changes

10 years agoAdd BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED
Richie Hsieh [Thu, 17 Apr 2014 14:39:31 +0000 (22:39 +0800)]
Add BOARD_BLUETOOTH_BDROID_HCILP_INCLUDED

Added CleanSpec.mk change

Signed-off-by: Richie Hsieh <richie.hsieh@mediatek.com>
Change-Id: Ice2a514f3d24859dbf091aae30e5c8781e90b7fd
(cherry picked from commit d343338cb4c42e62ac97c451bc23fb36d9b58d3f)

10 years agoam b9b1f4e7: (-s ours) LE batch scan feature
Satya Calloji [Tue, 1 Jul 2014 01:02:50 +0000 (01:02 +0000)]
am b9b1f4e7: (-s ours) LE batch scan feature

* commit 'b9b1f4e7a5cc96c57873a991f4ea3c3c08934c26':
  LE batch scan feature

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 agoam 66432dcf: Add WBS support on Bluedroid (2/6)
Matthew Xie [Mon, 30 Jun 2014 22:37:13 +0000 (22:37 +0000)]
am 66432dcf: Add WBS support on Bluedroid (2/6)

* commit '66432dcffe211e317d35978283a04a96d5620bdf':
  Add WBS support on Bluedroid (2/6)

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 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

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

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

Change-Id: I4dd2d551435e9f1f0e43906bd695294e97ed4bba

10 years agoam 021e17a6: Clear background conn list entries during BT power off
Nitin Arora [Mon, 30 Jun 2014 19:25:19 +0000 (19:25 +0000)]
am 021e17a6: Clear background conn list entries during BT power off

* commit '021e17a641e61e3f139717cd755bf6f9b9b9eb12':
  Clear background conn list entries during BT power off

10 years agoam 9279e000: Merge "Bluetooth: Updates background conn list properly during unpair...
Andre Eisenbach [Mon, 30 Jun 2014 19:25:19 +0000 (19:25 +0000)]
am 9279e000: Merge "Bluetooth: Updates background conn list properly during unpair" into klp-wireless-dev

* commit '9279e0003d43be077d2c2d7a3e5163db960a1150':
  Bluetooth: Updates background conn list properly during unpair

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 agoLE: Fix HOGP connection issues caused by incorrect HCI packet flags
Richie Hsieh [Wed, 25 Jun 2014 23:32:49 +0000 (16:32 -0700)]
LE: Fix HOGP connection issues caused by incorrect HCI packet flags

Do not set the automatically-flushable packet flag for LE bound HCI
packets (Packet_Boundary_Flag 0b10).

Reported-by: Richie Hsieh <richie.hsieh@mediatek.com>
Change-Id: Id71a096acee70582923e652cfef1f4141b721fed

10 years agoam d9e2d0f1: Bluetooth: Restarting PM timer during incoming rfcomm data.
Hemant Gupta [Sun, 29 Jun 2014 19:36:13 +0000 (19:36 +0000)]
am d9e2d0f1: Bluetooth: Restarting PM timer during incoming rfcomm data.

* commit 'd9e2d0f1fa19f737632e82c24ba278990b8a7548':
  Bluetooth: Restarting PM timer during incoming rfcomm data.

10 years agoam e146869f: GAP: Remove device info from storage on Pairing Cancel
Hemant Gupta [Sun, 29 Jun 2014 19:36:12 +0000 (19:36 +0000)]
am e146869f: GAP: Remove device info from storage on Pairing Cancel

* commit 'e146869fec903400e601d2ac7b0a59bd05934f0e':
  GAP: Remove device info from storage on Pairing Cancel

10 years agoam b4801441: GAP:Add authentication failed error code in auth_compl_evt.
Hemant Gupta [Sun, 29 Jun 2014 19:36:12 +0000 (19:36 +0000)]
am b4801441: GAP:Add authentication failed error code in auth_compl_evt.

* commit 'b4801441a5b7a093bc78f2143a8ed28605c51dc6':
  GAP:Add authentication failed error code in auth_compl_evt.

10 years agoam aef7a671: [2/2] Bluetooth: Security: Handle authentication rejected error status
Hemant Gupta [Sun, 29 Jun 2014 18:53:55 +0000 (18:53 +0000)]
am aef7a671: [2/2] Bluetooth: Security: Handle authentication rejected error status

* commit 'aef7a6716e72e9304af36469500ee53c97350c21':
  [2/2] Bluetooth: Security: Handle authentication rejected error status

10 years agoam 59a88ec2: Bluetooth: Handle missing key event
Hemant Gupta [Sun, 29 Jun 2014 18:23:40 +0000 (18:23 +0000)]
am 59a88ec2: Bluetooth: Handle missing key event

* commit '59a88ec207ead601c7ba5e767fd1373c7f2df70b':
  Bluetooth: Handle missing key event

10 years agoam 831423ea: Bluetooth: Fix to avoid NULL pointer dereferences
Hemant Gupta [Sun, 29 Jun 2014 18:23:40 +0000 (18:23 +0000)]
am 831423ea: Bluetooth: Fix to avoid NULL pointer dereferences

* commit '831423ea1879244e746f39d7696ad4a66681f306':
  Bluetooth: Fix to avoid NULL pointer dereferences

10 years agoam c8fe2925: GAP: Retain the old COD if already present
Hemant Gupta [Sun, 29 Jun 2014 18:23:39 +0000 (18:23 +0000)]
am c8fe2925: GAP: Retain the old COD if already present

* commit 'c8fe2925af4f5b167b615a0677adebbd156a4387':
  GAP: Retain the old COD if already present

10 years agoam 79f454dc: L2CAP: Send HCI connect with all packet types supported
Hemant Gupta [Sun, 29 Jun 2014 18:10:19 +0000 (18:10 +0000)]
am 79f454dc: L2CAP: Send HCI connect with all packet types supported

* commit '79f454dc544280cc1a3ca3acc643f7dddfe91cd9':
  L2CAP: Send HCI connect with all packet types supported