OSDN Git Service

android-x86/system-bt.git
6 years agoMerge "Call BTA_VendorCleanup on proper thread" am: 1184ac335f
Jakub Pawlowski [Thu, 1 Mar 2018 22:39:13 +0000 (22:39 +0000)]
Merge "Call BTA_VendorCleanup on proper thread" am: 1184ac335f
am: 443d139e6d

Change-Id: I2b888dfab03d4ef0e76d7a45bbcb27bca06937d6

6 years agoMerge "Call BTA_VendorCleanup on proper thread"
Jakub Pawlowski [Thu, 1 Mar 2018 22:34:31 +0000 (22:34 +0000)]
Merge "Call BTA_VendorCleanup on proper thread"
am: 1184ac335f

Change-Id: Ifca440266846548be8a99ec5ab68c07f16e9e8be

6 years agoMerge "Call BTA_VendorCleanup on proper thread"
Treehugger Robot [Thu, 1 Mar 2018 22:21:29 +0000 (22:21 +0000)]
Merge "Call BTA_VendorCleanup on proper thread"

6 years agoMerge "Pre-compute the RTP Header Marker Bit by using the correct peer address" am...
Pavlin Radoslavov [Thu, 1 Mar 2018 21:41:15 +0000 (21:41 +0000)]
Merge "Pre-compute the RTP Header Marker Bit by using the correct peer address" am: 60828d0b79
am: c4fd2f56f3

Change-Id: I951a47389fbd77c11e18ab1bf1a69a3e826b3a0a

6 years agoMerge "Pre-compute the RTP Header Marker Bit by using the correct peer address"
Pavlin Radoslavov [Thu, 1 Mar 2018 21:36:20 +0000 (21:36 +0000)]
Merge "Pre-compute the RTP Header Marker Bit by using the correct peer address"
am: 60828d0b79

Change-Id: I98cff1eabab01255ec3137c7636df23aa6dcb7fd

6 years agoRemove unused adjustAvrcpAbsoluteVolume am: ce268fc86f
Ajay Panicker [Thu, 1 Mar 2018 21:27:40 +0000 (21:27 +0000)]
Remove unused adjustAvrcpAbsoluteVolume am: ce268fc86f
am: 1b9a56c06e

Change-Id: Ieffa12079ae84434d51b2fc02fb1e74c5d4c12a4

6 years agoRemove unused adjustAvrcpAbsoluteVolume
Ajay Panicker [Thu, 1 Mar 2018 21:15:48 +0000 (21:15 +0000)]
Remove unused adjustAvrcpAbsoluteVolume
am: ce268fc86f

Change-Id: I9a3df5c69021d252469bab429557fdfcd8be6756

6 years agoCall BTA_VendorCleanup on proper thread
Jakub Pawlowski [Thu, 1 Mar 2018 19:54:16 +0000 (11:54 -0800)]
Call BTA_VendorCleanup on proper thread

Right now this function is running on any thread that call it, i.e. one
of Binder threads. This is introducing race condition during shutdown.

Test: restart bluetooth 10 times
Fix: 74075027
Change-Id: I426284792901e6a9540cb6420a7e27a340a3fe1d

6 years agoMerge "Pre-compute the RTP Header Marker Bit by using the correct peer address"
Treehugger Robot [Thu, 1 Mar 2018 20:01:02 +0000 (20:01 +0000)]
Merge "Pre-compute the RTP Header Marker Bit by using the correct peer address"

6 years agoRemove unused adjustAvrcpAbsoluteVolume
Ajay Panicker [Wed, 28 Feb 2018 19:38:26 +0000 (11:38 -0800)]
Remove unused adjustAvrcpAbsoluteVolume

The AudioManager now handles all calculations for volume stepping now
and no longer uses adjustAvrcpAbsoluteVolume.

Bug: 68812037
Test: Compile and test Absolute Volume on a device that supports it
Change-Id: I34f27d27b4c5c3959a84a6dc438edfed45a0b3e3

6 years agoHearing Aid Audio HAL am: e470502f78
Jakub Pawlowski [Thu, 1 Mar 2018 18:58:58 +0000 (18:58 +0000)]
Hearing Aid Audio HAL am: e470502f78
am: 4f2cd4ab14

Change-Id: Iafd0efe54cda8f45d0ffcf4c1354909ef20720e5

6 years agoHearing Aid Audio HAL
Jakub Pawlowski [Thu, 1 Mar 2018 18:53:23 +0000 (18:53 +0000)]
Hearing Aid Audio HAL
am: e470502f78

Change-Id: I72fa69c741e41e5ada66366bf74c56d510b503c4

6 years agoHearing Aid Audio HAL
Jakub Pawlowski [Fri, 23 Feb 2018 21:55:48 +0000 (13:55 -0800)]
Hearing Aid Audio HAL

The code is cloned from the existing A2DP Audio HAL.
In the future it will expand to include hearing-aid specific
mechanism.

Test: code compilation
Bug: 64038649
Change-Id: I976aa189929c3051b83615d1536315a099f31a67

6 years agoMerge "Add new sample rate BTAV_A2DP_CODEC_SAMPLE_RATE_16000" am: 25e8404e41
Jakub Pawlowski [Thu, 1 Mar 2018 10:42:17 +0000 (10:42 +0000)]
Merge "Add new sample rate BTAV_A2DP_CODEC_SAMPLE_RATE_16000" am: 25e8404e41
am: 574521702c

Change-Id: I0c36ce7b5e23021815b50e78f6cf57579d68e4fc

6 years agoMerge "Add new sample rate BTAV_A2DP_CODEC_SAMPLE_RATE_16000"
Jakub Pawlowski [Thu, 1 Mar 2018 10:36:14 +0000 (10:36 +0000)]
Merge "Add new sample rate BTAV_A2DP_CODEC_SAMPLE_RATE_16000"
am: 25e8404e41

Change-Id: Ib80ac8807087f9521e8ae50e42bfee41f0fca75e

6 years agoMerge "Add new sample rate BTAV_A2DP_CODEC_SAMPLE_RATE_16000"
Treehugger Robot [Thu, 1 Mar 2018 10:25:39 +0000 (10:25 +0000)]
Merge "Add new sample rate BTAV_A2DP_CODEC_SAMPLE_RATE_16000"

6 years agoPre-compute the RTP Header Marker Bit by using the correct peer address
Pavlin Radoslavov [Thu, 1 Mar 2018 07:34:28 +0000 (23:34 -0800)]
Pre-compute the RTP Header Marker Bit by using the correct peer address

The RTP Header Marker Bit is computed by using the peer address
to lookup the corresponding codec instead of using the codec
for the current active peer.

Also, the pre-computed result is stored in the SCB for the peer instead
of storing a pointer to the current codec config.

Bug: 73897470
Test: Manual - disconnect, reconnect A2DP headsets
Change-Id: Id015de7be2a297b86ac945c7b7c64e6bc13ffc42

6 years agoHearing Aid BTIF interface am: e893179687
Jakub Pawlowski [Thu, 1 Mar 2018 06:06:51 +0000 (06:06 +0000)]
Hearing Aid BTIF interface am: e893179687
am: 98c4f3dc93

Change-Id: Ia4012cb831b8375341248f70dca6c130e035c275

6 years agoHearing Aid BTIF interface
Jakub Pawlowski [Thu, 1 Mar 2018 06:01:49 +0000 (06:01 +0000)]
Hearing Aid BTIF interface
am: e893179687

Change-Id: Ie7b1229491ce78d8ebe286efee7ca2d87369ec50

6 years agoAdd new sample rate BTAV_A2DP_CODEC_SAMPLE_RATE_16000
Jakub Pawlowski [Thu, 1 Mar 2018 02:40:33 +0000 (18:40 -0800)]
Add new sample rate BTAV_A2DP_CODEC_SAMPLE_RATE_16000

Test: compilation
Bug: 69623109
Change-Id: Ib7c94c538d8636719658814d2a73bc997ab6dddc

6 years agoHearing Aid BTIF interface
Jakub Pawlowski [Wed, 22 Nov 2017 00:35:49 +0000 (16:35 -0800)]
Hearing Aid BTIF interface

This is first version of Hearing Aid interface.

Test: compilation
Bug: 69623109
Change-Id: I157dc8d1481c1f034c15aac7dd33a5103cf5ea14

6 years agoMerge changes from topics "bt-a2dp-remove-redundant-alarm-free", "bt-a2dp-codec-init...
Pavlin Radoslavov [Tue, 27 Feb 2018 08:50:55 +0000 (08:50 +0000)]
Merge changes from topics "bt-a2dp-remove-redundant-alarm-free", "bt-a2dp-codec-init-same-thread" am: 51a906ba83
am: c42440e9fd

Change-Id: I96720bd109901351ab4b7818746ce34a8488f259

6 years agoMerge changes from topics "bt-a2dp-remove-redundant-alarm-free", "bt-a2dp-codec-init...
Pavlin Radoslavov [Tue, 27 Feb 2018 08:44:26 +0000 (08:44 +0000)]
Merge changes from topics "bt-a2dp-remove-redundant-alarm-free", "bt-a2dp-codec-init-same-thread"
am: 51a906ba83

Change-Id: I4541641e477796c0ddcaa4cceb7df9bac300cd3f

6 years agoClear the A2DP active device within the native stack during cleanup am: 2b13eb7b2a
Pavlin Radoslavov [Tue, 27 Feb 2018 08:38:58 +0000 (08:38 +0000)]
Clear the A2DP active device within the native stack during cleanup am: 2b13eb7b2a
am: a706aab6c9

Change-Id: Ib842c8828ba798b5db70b8eb742e6ddeeecd59fe

6 years agoMerge changes from topics "bt-a2dp-remove-redundant-alarm-free", "bt-a2dp-codec-init...
Treehugger Robot [Tue, 27 Feb 2018 08:37:13 +0000 (08:37 +0000)]
Merge changes from topics "bt-a2dp-remove-redundant-alarm-free", "bt-a2dp-codec-init-same-thread"

* changes:
  Removed redundant alarm_free() call on the wrong thread
  Perform all codec-related init operations on the same thread

6 years agoClear the A2DP active device within the native stack during cleanup
Pavlin Radoslavov [Tue, 27 Feb 2018 08:33:23 +0000 (08:33 +0000)]
Clear the A2DP active device within the native stack during cleanup
am: 2b13eb7b2a

Change-Id: I996cde9085b3cff94044b359b080a8e5404bfc17

6 years agoRemoved redundant alarm_free() call on the wrong thread
Pavlin Radoslavov [Tue, 27 Feb 2018 07:16:43 +0000 (23:16 -0800)]
Removed redundant alarm_free() call on the wrong thread

Bug: 73741079
Bug: 73892830
Test: Manual - A2DP connect/disconnect; audio streaming
Change-Id: I3e553245ef5ac10835d08b78e52a3fbd945914ee

6 years agoPerform all codec-related init operations on the same thread
Pavlin Radoslavov [Tue, 27 Feb 2018 06:44:30 +0000 (22:44 -0800)]
Perform all codec-related init operations on the same thread

Renamed btif_a2dp_source_encoder_init_event() to
btif_a2dp_source_setup_codec_delayed() and moved the
peer parameter fetching from btif_a2dp_source_setup_codec()
to btif_a2dp_source_setup_codec_delayed()

Test: Manual - A2DP connect/disconnect; audio streaming
Change-Id: Ib29dd6b2bef3045be3727122e1f8608780921d98

6 years agoClear the A2DP active device within the native stack during cleanup
Pavlin Radoslavov [Tue, 27 Feb 2018 06:53:05 +0000 (22:53 -0800)]
Clear the A2DP active device within the native stack during cleanup

Use explicit SetActivePeer(RawAddress::kEmpty) for BtifAvSource and
BtifAvSink during Cleanup()

Also, replaced incorrectly classified BTIF_TRACE_WARNING() log messages
with LOG_INFO().

Bug: 73832547
Test: Manual - A2DP streaming, enable Location -> Bluetooth scanning,
      restart Bluetooth in Quick Settings
Change-Id: Ieeae8915a45dc0c98cd68bd4bb113424c2de74d9

6 years agoInitialize max number of connected A2DP devices in the native stack via JNI am: 235bf...
Pavlin Radoslavov [Tue, 27 Feb 2018 04:53:00 +0000 (04:53 +0000)]
Initialize max number of connected A2DP devices in the native stack via JNI am: 235bfcc900
am: f81f580d62

Change-Id: I5b1a9f562e8d94930e3b439ac60900097a18ef9e

6 years agoInitialize max number of connected A2DP devices in the native stack via JNI
Pavlin Radoslavov [Tue, 27 Feb 2018 04:47:56 +0000 (04:47 +0000)]
Initialize max number of connected A2DP devices in the native stack via JNI
am: 235bfcc900

Change-Id: I4ee35ac53e2258dd4e5c9b2b52425e1d44726c51

6 years agoInitialize max number of connected A2DP devices in the native stack via JNI
Pavlin Radoslavov [Tue, 27 Feb 2018 03:16:05 +0000 (19:16 -0800)]
Initialize max number of connected A2DP devices in the native stack via JNI

Pass the maximum number of connected A2DP devices from Java to the
native stack as a parameter to the init() call.

Bug: 72351654
Test: Manual: Connect to multiple A2DP devices, check the log messages
Change-Id: I0647c36fe7c6a2df2c42a60b53b5cf505160b1e6

6 years agoMerge "Add/update the BTIF A2DP log messages" am: fe5a83841b
Pavlin Radoslavov [Tue, 27 Feb 2018 01:55:33 +0000 (01:55 +0000)]
Merge "Add/update the BTIF A2DP log messages" am: fe5a83841b
am: 186d7623c3

Change-Id: I8a0d1fdbc6974add2b00479bf37c01be03b9de09

6 years agoMerge "Add/update the BTIF A2DP log messages"
Pavlin Radoslavov [Tue, 27 Feb 2018 01:47:09 +0000 (01:47 +0000)]
Merge "Add/update the BTIF A2DP log messages"
am: fe5a83841b

Change-Id: Iaf15b40373679c2b505ad984ca89a6a396e81537

6 years agoMerge "Add/update the BTIF A2DP log messages"
Treehugger Robot [Tue, 27 Feb 2018 01:02:21 +0000 (01:02 +0000)]
Merge "Add/update the BTIF A2DP log messages"

6 years agoHCI: Set a timer to abort after a timeout am: 5c550c1e1c
Myles Watson [Tue, 27 Feb 2018 00:45:08 +0000 (00:45 +0000)]
HCI: Set a timer to abort after a timeout am: 5c550c1e1c
am: 7f56fc5da4

Change-Id: I618fd2b02730b5653492f6725759f6aa75c61ae6

6 years agoHCI: Set a timer to abort after a timeout
Myles Watson [Tue, 27 Feb 2018 00:37:34 +0000 (00:37 +0000)]
HCI: Set a timer to abort after a timeout
am: 5c550c1e1c

Change-Id: Ifb20e40988b4f36747fb5c008b363807e4638762

6 years agoHCI: Set a timer to abort after a timeout
Myles Watson [Sat, 24 Feb 2018 01:28:23 +0000 (17:28 -0800)]
HCI: Set a timer to abort after a timeout

Add code to clean up the timer and close the file whether
abort gets called or not.

Bug: 72719600
Bug: 72474659
Test: Cause an HCI timeout and wait for the firmware dump
Change-Id: I713f440d77bfad4c9f17dfc57f98ba5bada37fff

6 years agoAdd/update the BTIF A2DP log messages
Pavlin Radoslavov [Mon, 26 Feb 2018 20:08:22 +0000 (12:08 -0800)]
Add/update the BTIF A2DP log messages

 * Added new log messages where needed
 * Updated existing log messages so the message format is more aligned
   with the rest of the messages

Test: Manual: A2DP streaming
Change-Id: I9f953c43df1ff415379bb7d7fb61f0d33760df30

6 years agoUse assigned UUID for Hearing Aid Service am: 8f081e4575
Jakub Pawlowski [Mon, 26 Feb 2018 18:34:07 +0000 (18:34 +0000)]
Use assigned UUID for Hearing Aid Service am: 8f081e4575
am: 8077e8b744

Change-Id: I3c0dff85400414500b7976c31641ef3de4a07e1a

6 years agoUse assigned UUID for Hearing Aid Service
Jakub Pawlowski [Mon, 26 Feb 2018 18:26:02 +0000 (18:26 +0000)]
Use assigned UUID for Hearing Aid Service
am: 8f081e4575

Change-Id: I449b645b0a9e03ecd3bfbaa6d4f527b736466546

6 years agoUse assigned UUID for Hearing Aid Service
Jakub Pawlowski [Thu, 22 Feb 2018 23:02:25 +0000 (15:02 -0800)]
Use assigned UUID for Hearing Aid Service

Test: manual
Bug: 64038649
Change-Id: Ie5b39d74d245373142be31027cccb5f51f8586bf

6 years agoMerge "Add explicit init/cleanup steps for A2DP Source and Sink" am: 90835897a0
Pavlin Radoslavov [Sat, 24 Feb 2018 05:08:55 +0000 (05:08 +0000)]
Merge "Add explicit init/cleanup steps for A2DP Source and Sink" am: 90835897a0
am: b2f2d655a4

Change-Id: I465e06d2ac58f5cd46dd9a06561044cb42872d8f

6 years agoMerge "Add explicit init/cleanup steps for A2DP Source and Sink"
Pavlin Radoslavov [Sat, 24 Feb 2018 05:01:49 +0000 (05:01 +0000)]
Merge "Add explicit init/cleanup steps for A2DP Source and Sink"
am: 90835897a0

Change-Id: I5266a9852d4a9897c5283536baf07407f3ae4168

6 years agoMerge "Add explicit init/cleanup steps for A2DP Source and Sink"
Treehugger Robot [Sat, 24 Feb 2018 04:49:57 +0000 (04:49 +0000)]
Merge "Add explicit init/cleanup steps for A2DP Source and Sink"

6 years agoL2CAP: Discard pending requests on link disconnect am: 72b71ec6d1
Manoj Babulal [Sat, 24 Feb 2018 04:26:01 +0000 (04:26 +0000)]
L2CAP: Discard pending requests on link disconnect am: 72b71ec6d1
am: b23ed0c092

Change-Id: I89f651749f8f549309f6c768424e3b751aa748a9

6 years agoL2CAP: Discard pending requests on link disconnect
Manoj Babulal [Sat, 24 Feb 2018 04:17:56 +0000 (04:17 +0000)]
L2CAP: Discard pending requests on link disconnect
am: 72b71ec6d1

Change-Id: I79efe45e43f578e11256ce054744172320bfa02c

6 years agoAdd explicit init/cleanup steps for A2DP Source and Sink
Pavlin Radoslavov [Fri, 23 Feb 2018 17:04:57 +0000 (09:04 -0800)]
Add explicit init/cleanup steps for A2DP Source and Sink

The startup/shutdown steps for A2DP Source and Sink
are done when setting/resetting the Active device, and this
implies the device has been connected.

The operations that must be done before the remote device
is connected are moved to init (and cleanup for the reverse operations)

Bug: 73832547
Test: Manual - Connect/disconnect/play A2DP to Headset
Change-Id: Iaa55c2d27443646111f07a53d2c5163bca9e256d

6 years agoL2CAP: Discard pending requests on link disconnect
Manoj Babulal [Thu, 13 Jul 2017 07:04:09 +0000 (12:34 +0530)]
L2CAP: Discard pending requests on link disconnect

Scenario: A connection request packet is admitted to link tx queue in
L2CAP but before it could be transmitted (host busy), ACL link can get
disconnected (idle timeout) and the link tx queue is not flushed during
link disconnect handling. In such scenario, subsequent connection
attempt by host is seen to fail. This is because host is found to send
multiple connection requests (one connect request packet from the queue
and a new connection request packet per new request). Remote accepts old
connection request packet and waits for connection response from host.
For next connection request seen by remote, remote responds with 'No
PSM' resource error (as it already admitted one connection request and
it is in progress). Here when the connection response arrives from
remote, host ignores it because it sees packet id mismatch (host had
sent old connection request first and later information request/response
packets were exchanged. Remote had sent connection response copying
stale packet id picked from old connection request).

Drop queued packets as part of link disconnection handling.
This was already done in BLE transport case and is now being done
unconditionally.

Fixes: 73050475
Test: back-to-back PAN connect-disconnect iterations amidst ongoing
      OPP file transfer and AV streaming
Change-Id: I42cc7ae90cc1152f1781282698529fe50f0ebf89

6 years agoUprev to AVDTP 1.3 and Implement AVDTP delay reports am: ef673c546c
Ajay Panicker [Fri, 23 Feb 2018 22:32:26 +0000 (22:32 +0000)]
Uprev to AVDTP 1.3 and Implement AVDTP delay reports am: ef673c546c
am: 2b733c7748

Change-Id: If9fc6d0d6520a3fbfa90694da90579a131743864

6 years agoUprev to AVDTP 1.3 and Implement AVDTP delay reports
Ajay Panicker [Fri, 23 Feb 2018 22:25:25 +0000 (22:25 +0000)]
Uprev to AVDTP 1.3 and Implement AVDTP delay reports
am: ef673c546c

Change-Id: I8efa11b2f70f97d0a78df496cb3119ac452d6896

6 years agoUprev to AVDTP 1.3 and Implement AVDTP delay reports
Ajay Panicker [Wed, 21 Dec 2016 23:37:34 +0000 (15:37 -0800)]
Uprev to AVDTP 1.3 and Implement AVDTP delay reports

Implement receiving the delay report message which requires AVDTP 1.3.
Also start keeping track of total number of audio bytes sent over the
air. We now will report both of these values to the audio HAL so that
they can adjust audio playback using these values.

Bug: 32755225
Test: Manual test with a device that supports delay reporting
      Testtracker: 145280
Change-Id: I22c1c6401e4912efab06fa56fb582faae4b38eaf

6 years agoMerge "Remove unreachable code" am: c92e4a58de
Yi Kong [Fri, 23 Feb 2018 18:55:47 +0000 (18:55 +0000)]
Merge "Remove unreachable code" am: c92e4a58de
am: ea3e94b30b

Change-Id: I7945786cccb01bcbaff473c76a210d2540c386ed

6 years agoMerge "Remove unreachable code"
Yi Kong [Fri, 23 Feb 2018 18:50:15 +0000 (18:50 +0000)]
Merge "Remove unreachable code"
am: c92e4a58de

Change-Id: Id9ab73026b0cf09ee78aa07832414846b4d48856

6 years agoMerge "Remove unreachable code"
Treehugger Robot [Fri, 23 Feb 2018 18:32:54 +0000 (18:32 +0000)]
Merge "Remove unreachable code"

6 years agoFree the A2DP Source media alarm on the A2DP Source worker thread am: cc38c7fb41
Pavlin Radoslavov [Fri, 23 Feb 2018 17:43:00 +0000 (17:43 +0000)]
Free the A2DP Source media alarm on the A2DP Source worker thread am: cc38c7fb41
am: d88539b7c1

Change-Id: I6de0382140faa536688580741cf990326c5baca0

6 years agoFree the A2DP Source media alarm on the A2DP Source worker thread
Pavlin Radoslavov [Fri, 23 Feb 2018 17:32:42 +0000 (17:32 +0000)]
Free the A2DP Source media alarm on the A2DP Source worker thread
am: cc38c7fb41

Change-Id: I03ca80ed2cdeae946b0f6862268e90491a8fbe8c

6 years agoFree the A2DP Source media alarm on the A2DP Source worker thread
Pavlin Radoslavov [Fri, 23 Feb 2018 11:35:37 +0000 (03:35 -0800)]
Free the A2DP Source media alarm on the A2DP Source worker thread

Move the alarm_free() for the A2DP Source media alarm from
btif_a2dp_source_shutdown() to btif_a2dp_source_shutdown_delayed().
The latter is executed on the btif_a2dp_source_thread.
This avoids a race condition with btif_a2dp_source_audio_tx_stop_event()
that also might attempt to free the same alarm.

Test: Manual - unpair A2DP device while A2DP streaming.
Bug: 73741079
Change-Id: Ia871fcbeaae7c351878228e7605e65307a3d1583

6 years agoCorrect the value for BT_RC_NUM_APP for Multi-A2DP / Multi-AVRCP am: bd74060ea5
Pavlin Radoslavov [Thu, 22 Feb 2018 04:04:23 +0000 (04:04 +0000)]
Correct the value for BT_RC_NUM_APP for Multi-A2DP / Multi-AVRCP am: bd74060ea5
am: 7ef5392600

Change-Id: Ia80352e3a11d5e1bc72ed9527dc256dd4d4a96a8

6 years agoCorrect the value for BT_RC_NUM_APP for Multi-A2DP / Multi-AVRCP
Pavlin Radoslavov [Thu, 22 Feb 2018 03:42:07 +0000 (03:42 +0000)]
Correct the value for BT_RC_NUM_APP for Multi-A2DP / Multi-AVRCP
am: bd74060ea5

Change-Id: I2d92951f1f628194a0405f9f9fe8585d79d131b3

6 years agoReplace AVRC callback function pointers with base::Callback am: 0d6d447a1e
Ajay Panicker [Thu, 22 Feb 2018 00:38:59 +0000 (00:38 +0000)]
Replace AVRC callback function pointers with base::Callback am: 0d6d447a1e
am: 4b941793ce

Change-Id: Ifa73352978daea99236c78a4bb988dd7291902de

6 years agoReplace AVRC callback function pointers with base::Callback
Ajay Panicker [Thu, 22 Feb 2018 00:14:26 +0000 (00:14 +0000)]
Replace AVRC callback function pointers with base::Callback
am: 0d6d447a1e

Change-Id: I7675b68af5d6b2b67b746140ef9e827c8b2e24fc

6 years agoCorrect the value for BT_RC_NUM_APP for Multi-A2DP / Multi-AVRCP
Pavlin Radoslavov [Sat, 10 Feb 2018 23:23:49 +0000 (15:23 -0800)]
Correct the value for BT_RC_NUM_APP for Multi-A2DP / Multi-AVRCP

The original value of BT_RC_NUM_APP was incorrectly increased from
1 to 12 for the purpose of supporting up to 6 AVRCP connected devices.

The new BT_RC_NUM_APP value is corrected to 6:
  BT_RC_NUM_APP -> 1 -> 12 -> 6 (AVRCP-related - MaxDevices)

Test: Manual - connected to multiple headsets and selected each
      headset to play audio.
Bug: 70350399
Change-Id: I53e350c2bf1717b1f031a7a265adf3417cf3c513

6 years agoReplace AVRC callback function pointers with base::Callback
Ajay Panicker [Sun, 26 Nov 2017 00:27:33 +0000 (16:27 -0800)]
Replace AVRC callback function pointers with base::Callback

Replace function pointers with base::Callback for AVRCP to make
interfacing with the new AVRCP service easier.

Bug: 68812037
Test: Connect headset and see that Absolute volume and passthrough
commands still work.

Change-Id: I2ab20b7b59186aea413a736f43e926e17915a139

6 years agoRevert "Remove A2DP Source/Sink startup calls during A2DP initialization" am: 57bb0b4934
Andre Eisenbach [Wed, 21 Feb 2018 19:56:59 +0000 (19:56 +0000)]
Revert "Remove A2DP Source/Sink startup calls during A2DP initialization" am: 57bb0b4934
am: 45c6846baf

Change-Id: Iedd6422775cc4943208bc9570fec94fed322c952

6 years agoRevert "Remove A2DP Source/Sink startup calls during A2DP initialization"
Andre Eisenbach [Wed, 21 Feb 2018 19:50:27 +0000 (19:50 +0000)]
Revert "Remove A2DP Source/Sink startup calls during A2DP initialization"
am: 57bb0b4934

Change-Id: I105fdb37da2c4e6b68bb54a0cdd765ac90bf6d2d

6 years agoRevert "Remove A2DP Source/Sink startup calls during A2DP initialization"
Andre Eisenbach [Wed, 21 Feb 2018 02:38:52 +0000 (02:38 +0000)]
Revert "Remove A2DP Source/Sink startup calls during A2DP initialization"

This reverts commit 83255478b0457f291d6a78795444ff3b895d4a90.

Reason for revert:
Prevents audio routing due to stale active device record if
Bluetooth is toggled without the process stopping completely
(ex. LE-only mode).

Bug: 72701090
Change-Id: Ifa798e63df14855b5bf0bd45e1557315cd51034d
Fixes: 73601288

6 years agoAdd packet classes needed for AVRCP Absolute Volume am: 0c348413fb
Ajay Panicker [Wed, 21 Feb 2018 05:18:28 +0000 (05:18 +0000)]
Add packet classes needed for AVRCP Absolute Volume am: 0c348413fb
am: dd30428b8f

Change-Id: Ia405f2a8fac503d30df720815c32a70cdad16811

6 years agoAdd packet classes needed for AVRCP Absolute Volume
Ajay Panicker [Wed, 21 Feb 2018 05:09:33 +0000 (05:09 +0000)]
Add packet classes needed for AVRCP Absolute Volume
am: 0c348413fb

Change-Id: If186451077737dc05095c34f27795c329776a94e

6 years agoAdd packet classes needed for AVRCP Absolute Volume
Ajay Panicker [Sat, 17 Feb 2018 19:22:48 +0000 (11:22 -0800)]
Add packet classes needed for AVRCP Absolute Volume

Add the Register Notification Request packet as well as the
packets Set Absolute Volume packet.

Bug: 68854188
Test: run host native test net_test_packets
Change-Id: Ie0d1f1fb23254c1353b6a73529ca93e92f231ed5

6 years agoRemove unreachable code
Yi Kong [Tue, 20 Feb 2018 17:48:09 +0000 (12:48 -0500)]
Remove unreachable code

The conditionals can never be true, as they are outside of the bounds of
their data types. Fixes tautological-constant-compare warning.

Bug: 72331526
Test: m
Change-Id: I74063fe19b319ee32e4c1c8b3a5fc7ed612586e3

6 years agoOSI: Protect cutils/properties.h from direct calls am: 158fe8e028
Myles Watson [Sat, 17 Feb 2018 01:27:07 +0000 (01:27 +0000)]
OSI: Protect cutils/properties.h from direct calls am: 158fe8e028
am: 354266b95f

Change-Id: Ic1bc66e08e76a6c3735d1aabb29faee63f27629b

6 years agoOSI: Protect cutils/properties.h from direct calls
Myles Watson [Sat, 17 Feb 2018 01:19:40 +0000 (01:19 +0000)]
OSI: Protect cutils/properties.h from direct calls
am: 158fe8e028

Change-Id: I8c163caf14182b5103c27a6c5e03bebbbdbdb59c

6 years agoOSI: Protect cutils/properties.h from direct calls
Myles Watson [Fri, 16 Feb 2018 21:11:04 +0000 (13:11 -0800)]
OSI: Protect cutils/properties.h from direct calls

Bug: None
Test: compile, no calls to property_get outside of libosi
      change PROPERTY_VALUE_MAX in osi/include/properties.h
      -> doesn't compile
Change-Id: I18c7b861782b1df4878da032ae3f0340dffdecab

6 years agoGet rid of BTA_HOST_INTERLEAVE_SEARCH am: 56363e828c
Jakub Pawlowski [Sat, 17 Feb 2018 00:13:55 +0000 (00:13 +0000)]
Get rid of BTA_HOST_INTERLEAVE_SEARCH am: 56363e828c
am: b9c174b514

Change-Id: I9f6751690dcbf9b6d07859286348c0d44b77b5ef

6 years agoGet rid of BTA_HOST_INTERLEAVE_SEARCH
Jakub Pawlowski [Sat, 17 Feb 2018 00:05:44 +0000 (00:05 +0000)]
Get rid of BTA_HOST_INTERLEAVE_SEARCH
am: 56363e828c

Change-Id: I4aaae9428d15db914c046b99bffc502b00bba2e5

6 years agoGet rid of BTA_HOST_INTERLEAVE_SEARCH
Jakub Pawlowski [Fri, 16 Feb 2018 21:21:58 +0000 (13:21 -0800)]
Get rid of BTA_HOST_INTERLEAVE_SEARCH

Test: compilation
Change-Id: I6f91cd783fc1dd46cda55d3456a67eb78ba4c7ae

6 years agoMerge "Make STREAM_TO_UINT64 globally available" am: 4a31432f8b
Jakub Pawlowski [Fri, 16 Feb 2018 06:10:04 +0000 (06:10 +0000)]
Merge "Make STREAM_TO_UINT64 globally available" am: 4a31432f8b
am: 2042718a9c

Change-Id: Ie29cf7d9143357e7960ade32cf16a154fc2f65a9

6 years agoMerge "Make STREAM_TO_UINT64 globally available"
Jakub Pawlowski [Fri, 16 Feb 2018 06:03:03 +0000 (06:03 +0000)]
Merge "Make STREAM_TO_UINT64 globally available"
am: 4a31432f8b

Change-Id: Ib1d680b37168d12283fbd5106fd22e9875692805

6 years agoMerge "Add btif_config_(get/set)_uint64" am: 22e48923d4
Jakub Pawlowski [Fri, 16 Feb 2018 05:51:49 +0000 (05:51 +0000)]
Merge "Add btif_config_(get/set)_uint64" am: 22e48923d4
am: 487f39bf51

Change-Id: Ia96362d85d9215fe7ececee842748565f5096aad

6 years agoReduce spammy error log in gatt_attr.cc, plus minor logging improvements am: ae2104f6ac
Jakub Pawlowski [Fri, 16 Feb 2018 05:50:17 +0000 (05:50 +0000)]
Reduce spammy error log in gatt_attr.cc, plus minor logging improvements am: ae2104f6ac
am: c4b0f9082c

Change-Id: Ia9bc85c27634bc1968bba8cae983babceb5f234f

6 years agoMerge "Make STREAM_TO_UINT64 globally available"
Treehugger Robot [Fri, 16 Feb 2018 05:49:15 +0000 (05:49 +0000)]
Merge "Make STREAM_TO_UINT64 globally available"

6 years agoMerge "Add btif_config_(get/set)_uint64"
Jakub Pawlowski [Fri, 16 Feb 2018 05:37:54 +0000 (05:37 +0000)]
Merge "Add btif_config_(get/set)_uint64"
am: 22e48923d4

Change-Id: Ieb06347f92ab27708bfa0c96532af337773c59f2

6 years agoReduce spammy error log in gatt_attr.cc, plus minor logging improvements
Jakub Pawlowski [Fri, 16 Feb 2018 05:36:28 +0000 (05:36 +0000)]
Reduce spammy error log in gatt_attr.cc, plus minor logging improvements
am: ae2104f6ac

Change-Id: I169e0ae61b33d6062adb8c045779e9d53a9a2549

6 years agoMerge "Add btif_config_(get/set)_uint64"
Treehugger Robot [Fri, 16 Feb 2018 04:49:38 +0000 (04:49 +0000)]
Merge "Add btif_config_(get/set)_uint64"

6 years agoAdd btif_config_(get/set)_uint64
Jakub Pawlowski [Thu, 15 Feb 2018 18:09:03 +0000 (10:09 -0800)]
Add btif_config_(get/set)_uint64

Bug: 69623109
Test: added ConfigTest.config_get_uint64
Change-Id: Id2285a6f961f72d28912defad66663ddd05fb741

6 years agoReduce spammy error log in gatt_attr.cc, plus minor logging improvements
Jakub Pawlowski [Thu, 15 Feb 2018 23:38:39 +0000 (15:38 -0800)]
Reduce spammy error log in gatt_attr.cc, plus minor logging improvements

Test: compilation, observe colored log output on startup
Change-Id: I6671f5a900f15a57cc9b38b01aaec296002ad233

6 years agoMake STREAM_TO_UINT64 globally available
Jakub Pawlowski [Thu, 15 Feb 2018 18:18:29 +0000 (10:18 -0800)]
Make STREAM_TO_UINT64 globally available

Bug: 69623109
Change-Id: I38958dc16d42ab2396d3acd7605b63ec6a6c2dd8

6 years agoMerge "Final IBluetoothHearingAid.aidl improvements" am: b053bd0bf6
Jakub Pawlowski [Thu, 15 Feb 2018 05:45:25 +0000 (05:45 +0000)]
Merge "Final IBluetoothHearingAid.aidl improvements" am: b053bd0bf6
am: fc4b95954b

Change-Id: Ib7f72a28b0a21ef698a6a6b0526dbca938c1b063

6 years agoMerge "Final IBluetoothHearingAid.aidl improvements"
Jakub Pawlowski [Thu, 15 Feb 2018 05:34:25 +0000 (05:34 +0000)]
Merge "Final IBluetoothHearingAid.aidl improvements"
am: b053bd0bf6

Change-Id: I340b14e68ccc28eca81527d8985cc4411c6c93ea

6 years agoMerge "Final IBluetoothHearingAid.aidl improvements"
Treehugger Robot [Thu, 15 Feb 2018 04:14:43 +0000 (04:14 +0000)]
Merge "Final IBluetoothHearingAid.aidl improvements"

6 years agoFinal IBluetoothHearingAid.aidl improvements
Jakub Pawlowski [Wed, 14 Feb 2018 22:04:56 +0000 (14:04 -0800)]
Final IBluetoothHearingAid.aidl improvements

Use HiSyncId instead of CustomerId for unique hearing aid id, use proper
data type for it (64bit).
Make setVolume, adjustVolume return void, like for AVRCP.

Bug: 69623109
Test: compliance with the spec
Change-Id: I5fd51514793052d4ee2c3f9029eb75491145cc25

6 years agoRemove A2DP Source/Sink startup calls during A2DP initialization am: 83255478b0
Pavlin Radoslavov [Wed, 14 Feb 2018 21:27:23 +0000 (21:27 +0000)]
Remove A2DP Source/Sink startup calls during A2DP initialization am: 83255478b0
am: c8141340f4

Change-Id: Ie28a387e434b97d0a0bb28a430fd19f87c9a0311

6 years agoRemove A2DP Source/Sink startup calls during A2DP initialization
Pavlin Radoslavov [Wed, 14 Feb 2018 21:16:25 +0000 (21:16 +0000)]
Remove A2DP Source/Sink startup calls during A2DP initialization
am: 83255478b0

Change-Id: Ifa26a3efcbca74cdfe187e27871dc2123adfaa31

6 years agoRemove A2DP Source/Sink startup calls during A2DP initialization
Pavlin Radoslavov [Wed, 14 Feb 2018 18:26:13 +0000 (10:26 -0800)]
Remove A2DP Source/Sink startup calls during A2DP initialization

Don't call btif_a2dp_source_startup() / btif_a2dp_sink_startup()
inside BtifAvSource::Init() / BtifAvSink::Init() .
Those calls are already happening at the right time later during
BtifAvSource::SetActivePeer() / BtifAvSink::SetActivePeer()

Bug: 72701090
Test: Manual with multiple headsets
Change-Id: I634a2c90a7758891565c97e86b83335608ffab69

6 years agoUse correct call btif_a2dp_sink_startup() for Sink peers am: b600f6b6fc
Pavlin Radoslavov [Wed, 14 Feb 2018 14:30:45 +0000 (14:30 +0000)]
Use correct call btif_a2dp_sink_startup() for Sink peers am: b600f6b6fc
am: da75246960

Change-Id: If01b09cefeb60088c114c54b3e5bbe13a930adc0

6 years agoUse correct call btif_a2dp_sink_startup() for Sink peers
Pavlin Radoslavov [Wed, 14 Feb 2018 14:24:55 +0000 (14:24 +0000)]
Use correct call btif_a2dp_sink_startup() for Sink peers
am: b600f6b6fc

Change-Id: Ifaa3f3cb8c519999cf08273205dccc579f825157

6 years agoUse correct call btif_a2dp_sink_startup() for Sink peers
Pavlin Radoslavov [Wed, 14 Feb 2018 12:12:54 +0000 (04:12 -0800)]
Use correct call btif_a2dp_sink_startup() for Sink peers

Replaced an incorrect call to btif_a2dp_source_startup() with
btif_a2dp_sink_startup() inside BtifAvSink::SetActivePeer()

Also, minor cleanup: fix log messages, add missing description for
some of the methods.

Bug: 72701090
Test: Manual with Headet
Change-Id: I0620833b02bd9012fea63ce2ce5e3c4c74d27bf7

6 years agoA2DP: Cleanup UIPC when no active device am: f88552cdd8
Hansong Zhang [Wed, 14 Feb 2018 07:20:40 +0000 (07:20 +0000)]
A2DP: Cleanup UIPC when no active device am: f88552cdd8
am: 30ba0e2a63

Change-Id: I10915a33d3fa24d831727641ff449c37161b60ba

6 years agoA2DP: Cleanup UIPC when no active device
Hansong Zhang [Wed, 14 Feb 2018 07:15:46 +0000 (07:15 +0000)]
A2DP: Cleanup UIPC when no active device
am: f88552cdd8

Change-Id: If29bd610e0d1d9c63e1337363b33e8f1160b2ccb