OSDN Git Service

android-x86/system-bt.git
7 years agoMerge changes from topics 'bt-a2dp-ldac-abr-adjustments', 'bt-a2dp-ldac-dropped-count'
Pavlin Radoslavov [Wed, 19 Apr 2017 21:27:56 +0000 (21:27 +0000)]
Merge changes from topics 'bt-a2dp-ldac-abr-adjustments', 'bt-a2dp-ldac-dropped-count'

* changes:
  Print the LDAC adaptive bit rate adjustments
  Fix/update the computation of the total dropped packets for LDAC and AAC

7 years agoMerge "Remove libbt-vendor from system/bt/main/Android.bp"
Treehugger Robot [Wed, 19 Apr 2017 20:31:45 +0000 (20:31 +0000)]
Merge "Remove libbt-vendor from system/bt/main/Android.bp"

7 years agotest_vendor: Remove unused libbt-vendor files
Myles Watson [Mon, 17 Apr 2017 20:43:05 +0000 (13:43 -0700)]
test_vendor: Remove unused libbt-vendor files

Bug: 36810308
Test: builds
Change-Id: I50b4a3efaac622959dbf25c0f854d455057e6f3e

7 years agoRemove libbt-vendor from system/bt/main/Android.bp
Myles Watson [Tue, 7 Mar 2017 12:57:03 +0000 (04:57 -0800)]
Remove libbt-vendor from system/bt/main/Android.bp

Platforms that need libbt-vendor, which is deprecated, should include the
build dependency in device.mk.

Bug: 36810308
Test: Angler Bluetooth starts/stops
Change-Id: I0e37bf48536ca134493aaa3a496bafb3b80cd882

7 years agoMerge "bta_gattc_cache: Initialize gatt_db_elemement_t permissions to 0"
Treehugger Robot [Wed, 19 Apr 2017 20:07:46 +0000 (20:07 +0000)]
Merge "bta_gattc_cache: Initialize gatt_db_elemement_t permissions to 0"

7 years agoFix line formatting per clang-format
Pavlin Radoslavov [Wed, 19 Apr 2017 18:44:19 +0000 (11:44 -0700)]
Fix line formatting per clang-format

The fix is needed to resolve a merge conflict.

Test: Code compilation
Change-Id: I41cd79db1750b526fafa33e097c56a7cb46ba6af

7 years agoPrint the LDAC adaptive bit rate adjustments
Pavlin Radoslavov [Wed, 19 Apr 2017 17:50:16 +0000 (10:50 -0700)]
Print the LDAC adaptive bit rate adjustments

A2DP LDAC State:
  ...
  LDAC quality mode                                       : ABR
  LDAC transmission bitrate (Kbps)                        : 990
  LDAC saved transmit queue length                        : 0
  LDAC adaptive bit rate encode quality mode index        : 0
  LDAC adaptive bit rate adjustments                      : 4

Test: A2DP streaming to headsets that support LDAC
Bug: 37287785
Change-Id: Ife8017ca129fa9b06ea85f6029c553a52a306cc2

7 years agoFix/update the computation of the total dropped packets for LDAC and AAC
Pavlin Radoslavov [Wed, 19 Apr 2017 03:05:39 +0000 (20:05 -0700)]
Fix/update the computation of the total dropped packets for LDAC and AAC

Also:
 * Print the "LDAC transmission bitrate (Kbps)"
 * Print the "LDAC adaptive bit rate encode quality mode index"
   when the LDAC quality mode is ABR

A2DP LDAC State:
  ...
  LDAC quality mode                                       : ABR
  LDAC transmission bitrate (Kbps)                        : 990
  LDAC saved transmit queue length                        : 0
  LDAC adaptive bit rate encode quality mode index        : 0

Test: A2DP streaming to headsets that support LDAC
Bug: 37287785
Change-Id: I83b22090b087eb8a1e49d1853468b7dbbf9d9ad3

7 years agoMerge "Read by UUID for PTS tests (4/5)"
Treehugger Robot [Wed, 19 Apr 2017 06:08:48 +0000 (06:08 +0000)]
Merge "Read by UUID for PTS tests (4/5)"

7 years agobta_gattc_cache: Initialize gatt_db_elemement_t permissions to 0
Bailey Forrest [Wed, 19 Apr 2017 04:04:10 +0000 (21:04 -0700)]
bta_gattc_cache: Initialize gatt_db_elemement_t permissions to 0

Previously this value was uninitialized. Attribute permissions are not
discovable via the attribute protocol.

Bug: None
Test: Build. permissions are 0.
Change-Id: I5fdac3b90683245a0af0d6e27a2873499ca90e6c

7 years agoMerge "AVRCP TG: Get Item Attribute command not working"
Treehugger Robot [Wed, 19 Apr 2017 00:41:26 +0000 (00:41 +0000)]
Merge "AVRCP TG: Get Item Attribute command not working"

7 years agostack: AVRCP: add missing debug arguments
Hemant Gupta [Fri, 14 Apr 2017 06:37:37 +0000 (12:07 +0530)]
stack: AVRCP: add missing debug arguments

Fixes a crash while sending AVRCP Get Item Attribute response due to missing
function arguments.

Test: test with BMW kit, Crysler kit which trigger this bug

Bug: 37334553
Fixes: 37474772
Change-Id: Ie129e22e427896028a50e6b0ae8c2cdd151b0ea1

7 years agoRead by UUID for PTS tests (4/5)
Jakub Pawlowski [Fri, 14 Apr 2017 14:27:49 +0000 (07:27 -0700)]
Read by UUID for PTS tests (4/5)

Add a hidden api for reading characteristic by UUID for PTS.

Bug: 35150313
Test: sl4a GattReadTest.byUuid
Change-Id: I072473c5f7b761707774efd89f8a22bfdf012135

7 years agoDo not GATT_ERROR on MTU change
Jacky Cheung [Mon, 17 Apr 2017 20:38:39 +0000 (13:38 -0700)]
Do not GATT_ERROR on MTU change

Bug: 37305498
Test: manual on MSM8909
Change-Id: I07389620efc914d0ece52262edc2c35b498d5564

7 years agoAdd missing NULL pointer assignment after fixed_queue_free and alarm_free
Pavlin Radoslavov [Fri, 14 Apr 2017 10:45:18 +0000 (03:45 -0700)]
Add missing NULL pointer assignment after fixed_queue_free and alarm_free

Bug: 37285767
Test: Code compilation
Change-Id: I53f759ea477079b0b6aed4bcbeefb645886263d6

7 years agoFix a race condition during HCI module shutdown
Pavlin Radoslavov [Thu, 13 Apr 2017 21:33:30 +0000 (14:33 -0700)]
Fix a race condition during HCI module shutdown

If an HCI event (e.g., incoming event) happens during
HCI module shutdown, and the processing of that event
calls update_command_response_timer() right after
"alarm_free(command_response_timer)" in the beginning
of hci_module_shut_down(), then update_command_response_timer()
will try to schedule an alarm on command_response_timer that is NULL.

Test: Enable/disable Bluetooth, added unit tests
Bug: 37241256
Change-Id: I7fd58446caedc135e906953644201f88b5df32bb

7 years agoDo not remove device security record on LMP timeout
Andre Eisenbach [Thu, 13 Apr 2017 21:49:36 +0000 (14:49 -0700)]
Do not remove device security record on LMP timeout

If an LMP timeout is encountered in the middle of authentication, the
link key is removed from the controller (but not from NVRAM). This can
result in a follow up connction triggering a LINK_KEY_MISSING reply,
which in turn can cause a remote device to initiate pairing which will
then finally remove the link key stored in NVRAM as well.

This change prevents the link key from being removed from the Bluetooth
controller in case of a timeout during link authentication.

Bug: 36798442
Test: manual
Change-Id: Ic89a16b45756e3d40b2e374c645c8f245f6ce3fc

7 years agoAVRCP TG: Get Item Attribute command not working
Hemant Gupta [Thu, 13 Apr 2017 14:34:36 +0000 (20:04 +0530)]
AVRCP TG: Get Item Attribute command not working

Usecase:
1) Connect from carkit supporting AVRCP 1.4/1.5 CT to DUT
2) Issue get item attribute command with valid attribute list.

Expected behaviour:
Get item attribute command succeeds and returns the requested
attributes of particular item

Observed result:
Get Item attribute command fails with BAD Param Error

Root Cause:
Wrong structure from tAVRC_COMMAND was being passed to fill_attribute_id_array
which was leading to error being returned.

Fix:
Use get_attrs of type tAVRC_GET_ATTRS_CMD instead of get_elem_attrs of type
tAVRC_GET_ELEM_ATTRS_CMD when remote device requests for get item attributes.

Test: Checked that now bad param error is not returned in response for
get item attribute command from remote device.

Bug: 37302234
Change-Id: I9245f726f37ffd666d143d2232dac868a2cc3268

7 years agoReduce the audio A2DP HAL output audio stream buffer size
Pavlin Radoslavov [Wed, 5 Apr 2017 23:38:42 +0000 (16:38 -0700)]
Reduce the audio A2DP HAL output audio stream buffer size

Reduce the audio A2DP HAL output audio stream buffer size
(per constant AUDIO_STREAM_OUTPUT_BUFFER_PERIODS) from 4 to 2.
After the change, the output buffer size is double the buffer period.

Bug: 35849921
Test: A2DP streaming with various codec settings. Testplans/83305.
Change-Id: I2a15d468e748a03b481bf2117903ab06cddd02a3

7 years agoMerge "HFP: Disable BTRH feature"
Treehugger Robot [Tue, 11 Apr 2017 20:09:18 +0000 (20:09 +0000)]
Merge "HFP: Disable BTRH feature"

7 years agoFix log record after return
liuchao [Tue, 11 Apr 2017 12:41:29 +0000 (20:41 +0800)]
Fix log record after return

Put log before the returned BUSY

Test: mm -j8
Change-Id: Ic3fb15a35adac363519cabecfcf8a2d3da60107c

7 years agoHFP: Disable BTRH feature
Yoshiharu Kurita [Wed, 25 Nov 2015 09:00:30 +0000 (18:00 +0900)]
HFP: Disable BTRH feature

Fluoride does not notify application layer upon AT+BTRH, and always
sends error response (BTRH is not supported) to remote device.
That is, Fluoride does not support BTRH feature.
But BTRH is enabled by default, so OK is sent to remote device by mistake
before the error response is sent. This makes some carkits unstable.

Bug: 29587048

Change-Id: If1aa32291491982851ecd480c4ba8390f39a27a2

7 years agoMerge "Add support for inband ringing feature"
Jack He [Mon, 10 Apr 2017 22:47:54 +0000 (22:47 +0000)]
Merge "Add support for inband ringing feature"

7 years agoAdd A2DP codec-specific information to dumpsys output
Pavlin Radoslavov [Thu, 6 Apr 2017 22:13:16 +0000 (15:13 -0700)]
Add A2DP codec-specific information to dumpsys output

Now we print the following information:
 * Current codec name
 * Info for each supported codec:
   - Priority
   - Encoder interval (ms)
   - Codec Config: Sampling rate, Bits per sample, Channel mode (MONO/STEREO)
   - Selectable codec configuration
   - Codec's local capability
   - Packet counts (expected/dropped)
   - PCM read counts (expected/actual)
   - PCM read bytes (expected/actual)
 * LDAC codec-specific info:
   - LDAC quality mode: HIGH/MID/LOW/ABR
   - LDAC saved transmit queue length [used in ABR mode]
 * SBC codec-specific info:
   - Frames counts (expected/dropped)

Sample of the new format is below:

---
A2DP Codecs State:
  Current Codec: LDAC

A2DP LDAC State:
  Priority: 1000000
  Encoder interval (ms): 20
  Config: Rate=96000 Bits=32 Mode=STEREO
  Selectable: Rate=44100|48000|88200|96000 Bits=16|24|32 Mode=MONO|STEREO
  Local capability: Rate=44100|48000|88200|96000 Bits=16|24|32 Mode=MONO|STEREO
  Packet counts (expected/dropped)                        : 596 / 161
  PCM read counts (expected/actual)                       : 2488 / 2488
  PCM read bytes (expected/actual)                        : 2547712 / 2547712
  LDAC quality mode                                       : ABR
  LDAC saved transmit queue length                        : 0

A2DP aptX-HD State:
  Priority: 4001
  Encoder interval (ms): 0
  Config: Invalid
  Selectable: Invalid
  Local capability: Rate=44100|48000 Bits=24 Mode=STEREO
  Packet counts (expected/dropped)                        : 0 / 0
  PCM read counts (expected/actual)                       : 0 / 0
  PCM read bytes (expected/actual)                        : 0 / 0

A2DP aptX State:
  Priority: 3001
  Encoder interval (ms): 0
  Config: Rate=44100 Bits=16 Mode=STEREO
  Selectable: Rate=44100|48000 Bits=16 Mode=STEREO
  Local capability: Rate=44100|48000 Bits=16 Mode=STEREO
  Packet counts (expected/dropped)                        : 0 / 0
  PCM read counts (expected/actual)                       : 0 / 0
  PCM read bytes (expected/actual)                        : 0 / 0

A2DP AAC State:
  Priority: 2001
  Encoder interval (ms): 20
  Config: Rate=44100 Bits=16 Mode=STEREO
  Selectable: Rate=44100|48000 Bits=16 Mode=STEREO
  Local capability: Rate=44100|48000|88200|96000 Bits=16 Mode=STEREO
  Packet counts (expected/dropped)                        : 0 / 0
  PCM read counts (expected/actual)                       : 0 / 0
  PCM read bytes (expected/actual)                        : 0 / 0

A2DP SBC State:
  Priority: 1001
  Encoder interval (ms): 20
  Config: Rate=44100 Bits=16 Mode=STEREO
  Selectable: Rate=44100 Bits=16 Mode=STEREO
  Local capability: Rate=44100 Bits=16 Mode=STEREO
  Packet counts (expected/dropped)                        : 580 / 0
  PCM read counts (expected/actual)                       : 2900 / 2900
  PCM read bytes (expected/actual)                        : 1484800 / 1484800
  Frames counts (expected/dropped)                        : 3724 / 0
---

Bug: 36567128
Test: Stream A2DP and "adb shell dumpsys bluetooth_manager"
Change-Id: Idd86005b842a4e569b7df91b8bbaf0632ed7f7c9

7 years agoBuild fix for BLE_PRIVACY_SPT == FALSE
Jakub Pawlowski [Mon, 10 Apr 2017 20:00:27 +0000 (13:00 -0700)]
Build fix for BLE_PRIVACY_SPT == FALSE

Bug: 30622771
Test: manual
Change-Id: I9a418b8c0477ac50ec2a81e318895c2788e5ceec

7 years agoAdd support for inband ringing feature
Jack He [Fri, 3 Feb 2017 01:42:40 +0000 (17:42 -0800)]
Add support for inband ringing feature

* Change HFP init API so that the HFP feature bit field depends on
  whether in-band ringing is supported on the device
* Feature disabled by default unless system property enables it

Bug: 19171297
Test: mm -j 40, HFP regression test, testplans/82144
Change-Id: Ib8ba28ac6e70eb23b2a2ad11c5805793911a4e43

7 years agoMerge "AVRC: Configure absolute volume to false if remove device not supprot it"
Treehugger Robot [Mon, 10 Apr 2017 19:32:29 +0000 (19:32 +0000)]
Merge "AVRC: Configure absolute volume to false if remove device not supprot it"

7 years agoAVRC: Configure absolute volume to false if remove device not supprot it
Tsuyoshi Kamata [Tue, 7 Mar 2017 06:46:34 +0000 (15:46 +0900)]
AVRC: Configure absolute volume to false if remove device not supprot it

Some AVRCP(ver>1.4) devices don't support absolute volume, when connected
to such device, volume control doesn't work properly on phone.

This patch fix the problem as bellow:
 - check category of remote device
     when add absolute volume feature flag.
 - remove absolute volume feature flag
     if remote device responses REJECT or NOT_IMPLEMENT.

Bug: 33441894
Change-Id: Icfd6f61699490efd937fa6d2383f333eb0f0144a

7 years agoAdvertising manager improvements
Jakub Pawlowski [Tue, 4 Apr 2017 11:08:19 +0000 (04:08 -0700)]
Advertising manager improvements

* Keep track wether advertiser is enabled.
* Make sure that random address for connectable advertisers is updated
  when advertising is disabled, as per ESR11-E7716.
* Make sure that the local variable holding the address is properly
  updated after the address is pushed to the controller.
* Use "LE Remove Advertising Set" command to free advertiser after use.

Bug: 35935853
Bug: 30622771
Test: manual
Change-Id: I1415f7272dd99e5e81ce1e2b7ef2bf98f7229cf9

7 years agoLinux build fix
Jakub Pawlowski [Mon, 10 Apr 2017 09:19:29 +0000 (02:19 -0700)]
Linux build fix

Test: manual
Change-Id: I5c86e96b9bb1cee5b535ea1fa6ba0b6d078a9b09

7 years agoUse device privacy mode as default
Jakub Pawlowski [Fri, 7 Apr 2017 13:19:50 +0000 (06:19 -0700)]
Use device privacy mode as default

This change configures device privacy mode for each
remote device added to the resolving list.
Before exercising the privacy command it confirms
whether the set privacy HCI command is supported.

This patch is based on CAF patch by niarora@codeaurora.org
36fa3c528d2ae58e0b3f969665e3d25986dcdbaa

Test: manual
Bug: 35935853
Change-Id: I839045ccc3ddb73dc9c0cbe05d87c25dae9b9236

7 years agoESR11-E7716: Disable scans while setting local RPA
Jakub Pawlowski [Fri, 7 Apr 2017 12:50:16 +0000 (05:50 -0700)]
ESR11-E7716: Disable scans while setting local RPA

This change is required to disable any ongoing classic
advertisement or any scan before setting the RPA for the
DUT, and reenable them after the Set RPA command.
If a direct connection is ongoing, the RPA is not set.
A background connection is suspended and resumed for
sending the "Set RPA" HCI command.

This patch is based on CAF patch by niarora@codeaurora.org
690c2db21f650f74c202fd380cca4ca74cbdf83c

Test: manual
Bug: 35935853
Change-Id: Ifbc90d0c52c8f1fa627ac80c20a69149e89cb794

7 years agoSupport for H7 function for key derivation
Jakub Pawlowski [Mon, 20 Mar 2017 22:38:56 +0000 (15:38 -0700)]
Support for H7 function for key derivation

This change sets bit 5 of the auth req to 1 to display
the support for H7 function, for key derivation.
Also, it adds the implementation of the h7 function as
defined in the spec (ERRATA E7301]
H7 is used if both host and remote devices exhibit
their support for H7 function in the auth request,
else the key derivation falls back to the H6
implementation.
The method is similar for derivation from either
transports with the only difference being in the first
byte of the SAL used in h7.

This patch is based on CAF patch by niarora@codeaurora.org
70668ad34ff15d0a53aea612d3c488fa575176ca

Test: manual
Bug: 35935853
Change-Id: I2fa29b2f3d2b3ac007b2f5f024871f81220237d8

7 years agoCreate unit test framework for audio_a2dp_hw
Pavlin Radoslavov [Wed, 5 Apr 2017 23:18:26 +0000 (16:18 -0700)]
Create unit test framework for audio_a2dp_hw

Create unit test framework for audio_a2dp_hw and implement a unit test
for function audio_a2dp_hw_stream_compute_buffer_size()

Also:
 * Remove obsolete check for mixer unit size inside out_get_buffer_size()
 * Reorganize the file structure inside directory audio_a2dp_hw/ :
   - Moved the source code files *.cc to audio_a2dp_hw/src/
   - Moved the header file(s) *.h to audio_a2dp_hw/include/
   - The unit test file(s) are stored in audio_a2dp_hw/test/

Bug: 35849921
Test: This is the unit test. Code compilation and unit test succeed
Change-Id: I3dcc508cb6799462b7103cb2ee452b4399843899

7 years agoFix "LE Read Maximum Advertising Data Length" response parsing
Jakub Pawlowski [Thu, 6 Apr 2017 13:59:20 +0000 (06:59 -0700)]
Fix "LE Read Maximum Advertising Data Length" response parsing

The value is uint16_t, not uint8_t

Bug: 30622771
Test: manual
Change-Id: I93e8687fa74cb0f5877f9921a860b2ba83106691

7 years agoMerge "Add default AVRCP version to prevent confusing log message"
Treehugger Robot [Wed, 5 Apr 2017 23:36:40 +0000 (23:36 +0000)]
Merge "Add default AVRCP version to prevent confusing log message"

7 years agoMerge "Add test config to net_test_hci"
Dan Shi [Wed, 5 Apr 2017 16:29:14 +0000 (16:29 +0000)]
Merge "Add test config to net_test_hci"

7 years agoMerge "Add test config to net_test_device"
Dan Shi [Wed, 5 Apr 2017 16:28:39 +0000 (16:28 +0000)]
Merge "Add test config to net_test_device"

7 years agoMerge "Add test config to net_test_btcore"
Treehugger Robot [Wed, 5 Apr 2017 08:14:16 +0000 (08:14 +0000)]
Merge "Add test config to net_test_btcore"

7 years agoAdd test config to net_test_hci
Dan Shi [Sat, 1 Apr 2017 00:12:46 +0000 (17:12 -0700)]
Add test config to net_test_hci

This change allows TradeFederation to run the test directly.
Refer to b/35882476 for design and discussion of this change.

Bug: 35882476
Test: local test
tradefed.sh run template/local --template:map test=net_test_hci

Change-Id: Ifbac48ad8b425f43e6c919696cc72d5997e614db

7 years agoMerge "Compute the audio data buffer size based on stream characteristics"
Treehugger Robot [Wed, 5 Apr 2017 02:30:35 +0000 (02:30 +0000)]
Merge "Compute the audio data buffer size based on stream characteristics"

7 years agoMerge "Add test config to net_test_bluetooth"
Treehugger Robot [Wed, 5 Apr 2017 02:07:44 +0000 (02:07 +0000)]
Merge "Add test config to net_test_bluetooth"

7 years agoCompute the audio data buffer size based on stream characteristics
Pavlin Radoslavov [Tue, 4 Apr 2017 18:31:29 +0000 (11:31 -0700)]
Compute the audio data buffer size based on stream characteristics

Use the audio data stream characteristics (sample rate, bits per sample,
channel mode) to compute the audio stream output buffer size from
the Audio A2DP HAL to the Bluetooth stack.

Previously, the buffer size was pre-computed based on the original
(44.1kHz, 16 bits per sample, Stereo) PCM audio stream used by SBC.
NOTE: We cannot change the buffer size on the receiver side (Bluetooth),
because SO_RCVBUF option does not have effect for Domain Sockets.

Also, removed uipc_linux.h header file, because it is not used.

Test: A2DP streaming and switching the codecs, sample rate, bits per sample
Bug: 35849921
Change-Id: Ib6772f7564442ac18a02876a5aa5e3208e5aade1

7 years agoAdd test config to net_test_bluetooth
Dan Shi [Thu, 30 Mar 2017 20:41:12 +0000 (13:41 -0700)]
Add test config to net_test_bluetooth

This change allows TradeFederation to run the test directly.
Refer to b/35882476 for design and discussion of this change.

Bug: 35882476
Test: local test
Change-Id: I45100b2be22906f2b631d3377749b86f8f1b6ecd

7 years agoFinish conversion to Android.bp
Myles Watson [Tue, 7 Mar 2017 13:00:04 +0000 (05:00 -0800)]
Finish conversion to Android.bp

Bug: 356519023567257636810308
Test: build, Android Cloud Bluetooth net_test_bluetooth
Change-Id: Ie99966d610ea35ab8caf8a084d92c43618e90b94

7 years agotest: Add a simulated Bluetooth HAL implementation
Myles Watson [Tue, 7 Mar 2017 12:28:51 +0000 (04:28 -0800)]
test: Add a simulated Bluetooth HAL implementation

Bug: 35672576
Test: Angler Bluetooth starts/stops with test HAL
      Android Cloud net_test_bluetooth tests pass
Change-Id: I104e0dd3946f0efff9709e05c056bee3538394f7

7 years agoaudio_a2dp_hw: add device lock
Andy Hung [Mon, 3 Apr 2017 18:55:30 +0000 (18:55 +0000)]
audio_a2dp_hw: add device lock
am: 2328b5754d

Change-Id: Ia27886aed87b2e7076d92f68b303d34cfd22df66

7 years agoaudio_a2dp_hw: add device lock
Andy Hung [Thu, 30 Mar 2017 23:28:46 +0000 (16:28 -0700)]
audio_a2dp_hw: add device lock

Prevent conflict between closing a stream (adev_close_output_stream)
and setting parameters (adev_set_parameters).

Test: Manual - Bluetooth A2DP streaming and changing codec parameters
Bug: 36723276
Change-Id: Id8b9fcdf594e3d5fde139719d324420468c4c0aa
(cherry picked from commit b1a900fcc9903f0988b6f8c1a470b9c718aedf1f)

7 years agoMerge "Add test config to bluetoothtbd_test"
Dan Shi [Sun, 2 Apr 2017 05:52:24 +0000 (05:52 +0000)]
Merge "Add test config to bluetoothtbd_test"
am: 615b7cdd98

Change-Id: If1f5c7a9aee317a14d26d2f3d384d0336aee6b97

7 years agoMerge "Add test config to net_test_osi"
Dan Shi [Sun, 2 Apr 2017 05:49:24 +0000 (05:49 +0000)]
Merge "Add test config to net_test_osi"
am: 4f9e3c6376

Change-Id: Iffa7f3862d25d09735cd69bd891554efc85f5dc4

7 years agoMerge "Add test config to bluetoothtbd_test"
Treehugger Robot [Sun, 2 Apr 2017 05:48:36 +0000 (05:48 +0000)]
Merge "Add test config to bluetoothtbd_test"

7 years agoMerge "Add test config to net_test_osi"
Treehugger Robot [Sun, 2 Apr 2017 05:46:57 +0000 (05:46 +0000)]
Merge "Add test config to net_test_osi"

7 years agoBluetooth 5 advertising duration refactoring (1/4)
Jakub Pawlowski [Sat, 1 Apr 2017 04:42:53 +0000 (04:42 +0000)]
Bluetooth 5 advertising duration refactoring (1/4)
am: 5204c62f13

Change-Id: I5aa32aae1934ef4116f2bcf6160a075252aa335d

7 years agoBluetooth 5 advertising duration refactoring (1/4)
Jakub Pawlowski [Fri, 31 Mar 2017 03:41:02 +0000 (20:41 -0700)]
Bluetooth 5 advertising duration refactoring (1/4)

Expose both duration and maximum extended advertising events to limit
advertising time.

Test: manual
Bug: 30622771
Change-Id: I4475c322347899946b39e65026d8009e02c93759

7 years agoAVRCP CT: Only call handle_rc_features if target registered
Bailey Forrest [Sat, 1 Apr 2017 00:32:46 +0000 (00:32 +0000)]
AVRCP CT: Only call handle_rc_features if target registered
am: 7745e29576

Change-Id: I68e25e8a3bc03fe3b739e9ca62df82655a2cf1e0

7 years agoAdd test config to bluetoothtbd_test
Dan Shi [Sat, 1 Apr 2017 00:13:12 +0000 (17:13 -0700)]
Add test config to bluetoothtbd_test

This change allows TradeFederation to run the test directly.
Refer to b/35882476 for design and discussion of this change.

Bug: 35882476
Test: local test
tradefed.sh run template/local --template:map test=bluetoothtbd_test

Change-Id: I6a243fc0245e4c3aa0fc51f3ded40c63492e31e8

7 years agoAdd test config to net_test_btcore
Dan Shi [Sat, 1 Apr 2017 00:12:55 +0000 (17:12 -0700)]
Add test config to net_test_btcore

This change allows TradeFederation to run the test directly.
Refer to b/35882476 for design and discussion of this change.

Bug: 35882476
Test: local test
tradefed.sh run template/local --template:map test=net_test_btcore

Change-Id: I336af9f5360540cec5fb406d38c90706891af5be

7 years agoAdd test config to net_test_osi
Dan Shi [Sat, 1 Apr 2017 00:12:37 +0000 (17:12 -0700)]
Add test config to net_test_osi

This change allows TradeFederation to run the test directly.
Refer to b/35882476 for design and discussion of this change.

Bug: 35882476
Test: local test
tradefed.sh run template/local --template:map test=net_test_osi

Change-Id: I5e26b7a9047e44aeeed12c4bcfce1f998183b597

7 years agoAdd test config to net_test_device
Dan Shi [Sat, 1 Apr 2017 00:12:28 +0000 (17:12 -0700)]
Add test config to net_test_device

This change allows TradeFederation to run the test directly.
Refer to b/35882476 for design and discussion of this change.

Bug: 35882476
Test: local test
tradefed.sh run template/local --template:map test=net_test_device

Change-Id: Ie3e287aba9cd38cbfceef36885c863ba2d34b31a

7 years agoAVRCP CT: Only call handle_rc_features if target registered
Bailey Forrest [Fri, 31 Mar 2017 04:43:28 +0000 (21:43 -0700)]
AVRCP CT: Only call handle_rc_features if target registered

If target is not registered, handle_rc_features would clear feature
flags before handle_rc_ctrl_features can use them.

Bug: b/35807779
Test: AVRCP controller track info works on iOS.
Change-Id: Iee781f2fc926a053ba9cf30089d3a49e56b94539

7 years agoAdd default AVRCP version to prevent confusing log message
Ajay Panicker [Fri, 31 Mar 2017 16:53:12 +0000 (09:53 -0700)]
Add default AVRCP version to prevent confusing log message

Test: Log message shows more info
Change-Id: Ic042d1cf1489e391fe6e9cc3d6239acb79917b01

7 years agoMerge "Include flags in all connectable packets"
Jakub Pawlowski [Thu, 30 Mar 2017 20:55:04 +0000 (20:55 +0000)]
Merge "Include flags in all connectable packets"
am: b4bed63632

Change-Id: Id710017c3e63d45ee1b09c82a7f507ef4b3e189e

7 years agoMerge "Include flags in all connectable packets"
Treehugger Robot [Thu, 30 Mar 2017 20:53:10 +0000 (20:53 +0000)]
Merge "Include flags in all connectable packets"

7 years agoDelete bt_snoop.log when snoop logging is disabled
Ajay Panicker [Thu, 30 Mar 2017 19:49:58 +0000 (19:49 +0000)]
Delete bt_snoop.log when snoop logging is disabled
am: f786aac482

Change-Id: I3359087dc96042e914ef8bcfcff3a735140c2751

7 years agoInclude flags in all connectable packets
Jakub Pawlowski [Thu, 30 Mar 2017 18:52:53 +0000 (11:52 -0700)]
Include flags in all connectable packets

According to Bluetooth CSSv7, the flags field shall be included in all
connectable packets, not only legacy packets.

Test: manal
Bug: 30622771
Change-Id: I006f9bd6d31ca0673d78405f320b18623e6e5b16

7 years agoDelete bt_snoop.log when snoop logging is disabled
Ajay Panicker [Thu, 30 Mar 2017 17:33:19 +0000 (10:33 -0700)]
Delete bt_snoop.log when snoop logging is disabled

This patch will immediatly delete the snoop log if Bluetooth is on. If Bluetooth
is off it will delete the log as soon as Bluetooth starts again.

Test: Turn off logging while Bluetooth is on and off
Bug: 36718948
Change-Id: Ib660cd442c93f1a34c948d51c5cffc38695558d5

7 years agoBluetooth 5 periodic scan (2/3)
Jakub Pawlowski [Thu, 30 Mar 2017 03:30:10 +0000 (03:30 +0000)]
Bluetooth 5 periodic scan (2/3)
am: f685bfb7b1

Change-Id: I36365df844aa015b9481c0f1fbfb6e8b5450e321

7 years agoBluetooth 5 periodic scan (2/3)
Jakub Pawlowski [Wed, 29 Mar 2017 21:28:43 +0000 (14:28 -0700)]
Bluetooth 5 periodic scan (2/3)

This patch wires calls/callbacks through stack to prepare for actual
implementation.

Test: manual
Bug: 30622771
Change-Id: Iac8c74a228f34f5ea4231a76848e22ea64f11d06

7 years agoMerge "Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()"
Pavlin Radoslavov [Wed, 29 Mar 2017 22:46:33 +0000 (22:46 +0000)]
Merge "Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()"
am: 14bf663fb4

Change-Id: I030c6950b56373b5eeb9a93eada8b4ea581f2434

7 years agoMerge "Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()"
Treehugger Robot [Wed, 29 Mar 2017 22:41:13 +0000 (22:41 +0000)]
Merge "Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()"

7 years agoMerge "test-vendor-lib: Enable building for 64 bits"
Jorge E. Moreira [Wed, 29 Mar 2017 20:12:00 +0000 (20:12 +0000)]
Merge "test-vendor-lib: Enable building for 64 bits"
am: 46bd270740

Change-Id: Ifa8b3d8d8201f6df80d6156e536137e93d90bd01

7 years agoMerge "test-vendor-lib: Enable building for 64 bits"
Treehugger Robot [Wed, 29 Mar 2017 20:08:25 +0000 (20:08 +0000)]
Merge "test-vendor-lib: Enable building for 64 bits"

7 years agoAdd new internal API: enableOptionalCodecs()/disableOptionalCodecs()
Pavlin Radoslavov [Fri, 24 Feb 2017 18:35:30 +0000 (10:35 -0800)]
Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()

This API can be used to enable the optional codecs, or disable them
and use only the mandatory SBC.
Internally, it is implemented by raising the SBC priority to
highest (so SBC will be used/selected), or reducing the SBC priority
to its default value (lowest).

Test: A2DP streaming and enabling/disabling/selecting optional codecs
Bug: 35873828
Change-Id: Ia1311d790441b7b5471c9fda7aeee8aa3306b16e

7 years agoAdd missing dependency on the Sony LDAC ABR library libldacBT_abr.so
Pavlin Radoslavov [Wed, 29 Mar 2017 06:18:10 +0000 (06:18 +0000)]
Add missing dependency on the Sony LDAC ABR library libldacBT_abr.so
am: e4f2b61567

Change-Id: I5b18f74c9f85d30b207ef41623d4adc2afc3abef

7 years agoAdd missing dependency on the Sony LDAC ABR library libldacBT_abr.so
Pavlin Radoslavov [Wed, 29 Mar 2017 01:40:32 +0000 (18:40 -0700)]
Add missing dependency on the Sony LDAC ABR library libldacBT_abr.so

Test: Code compilation
Bug: 35381097
Change-Id: Ib347319942aef4fef6bfd7edc23a4df004fc19fa

7 years agotest-vendor-lib: Enable building for 64 bits
Jorge E. Moreira [Mon, 27 Mar 2017 22:44:55 +0000 (15:44 -0700)]
test-vendor-lib: Enable building for 64 bits

Removes LOCAL_MODULE_PATH which is not supported for 64 bit builds.
Uses LOCAL_PROPRIETARY_MODULE to let the build system know it should
go in the vendor directory.

Test: builds
Change-Id: Iba55d497d8cbe97911a41a5623248306a8954ec2

7 years agoosi: Update error messages
Myles Watson [Tue, 28 Mar 2017 22:39:40 +0000 (22:39 +0000)]
osi: Update error messages
am: 1dc4b361dd

Change-Id: I82f5536a0b088f31d6f922bb671e16fce9f454d7

7 years agoosi: Update error messages
Myles Watson [Tue, 21 Mar 2017 17:28:20 +0000 (10:28 -0700)]
osi: Update error messages

Test: build
Change-Id: I5af34f01c47d8037d56c27e7e3fab3cc2f5fd2bc

7 years agoMerge "hci: Update error messages"
Myles Watson [Tue, 28 Mar 2017 20:41:15 +0000 (20:41 +0000)]
Merge "hci: Update error messages"
am: 09329eede8

Change-Id: I855deb3f27fa270b13ff61c1f5cea83a6767168d

7 years agoMerge "l2cap: Use CHECK for memory allocation errors"
Myles Watson [Tue, 28 Mar 2017 20:41:01 +0000 (20:41 +0000)]
Merge "l2cap: Use CHECK for memory allocation errors"
am: b8e1fbd04a

Change-Id: I7464be3483402908d397eda4220c295cbc165669

7 years agoMerge "hci: Update error messages"
Treehugger Robot [Tue, 28 Mar 2017 20:37:09 +0000 (20:37 +0000)]
Merge "hci: Update error messages"

7 years agoMerge "l2cap: Use CHECK for memory allocation errors"
Treehugger Robot [Tue, 28 Mar 2017 20:29:26 +0000 (20:29 +0000)]
Merge "l2cap: Use CHECK for memory allocation errors"

7 years agoMerge "BTA HF_CLIENT: Always reply to +BCS"
Sanket Agarwal [Tue, 28 Mar 2017 20:14:54 +0000 (20:14 +0000)]
Merge "BTA HF_CLIENT: Always reply to +BCS"
am: 04f88ffb6c

Change-Id: I71a088b4454333f767aa0d6b106320ad2d7a966c

7 years agoMerge "BTA HF_CLIENT: Always reply to +BCS"
Treehugger Robot [Tue, 28 Mar 2017 20:03:52 +0000 (20:03 +0000)]
Merge "BTA HF_CLIENT: Always reply to +BCS"

7 years agol2cap: Use CHECK for memory allocation errors
Myles Watson [Tue, 21 Mar 2017 17:16:44 +0000 (10:16 -0700)]
l2cap: Use CHECK for memory allocation errors

Test: LE connection
Change-Id: I43c170b40b125345b91e1c91a7993f0d138ac1c5

7 years agoBTA HF_CLIENT: Always reply to +BCS
Sanket Agarwal [Wed, 22 Feb 2017 19:55:34 +0000 (11:55 -0800)]
BTA HF_CLIENT: Always reply to +BCS

Phones don't like when we don't reply to +BCS codec-negotiation. We were
having this behavior because not always do we want to accept a
connection request over SCO. Instead of not replying to +BCS (which is
essentially a codec negotiation) we rather refuse the SCO request when
it comes in. This creates other issues such as some phones trying to
connect SCO in an infinite loop but it still keeps interoperability with
other devices such as iPhones and Microsoft phones intact

Bug: b/35469963
Bug: b/35431871
Bug: b/35419773

Test: SCO (Phone Audio) test with iPhone, Microsoft and Nexus phones

Change-Id: I5319edcb4da9d66c6d6b3a49742248c90dee98e6

7 years agohci: Update error messages
Myles Watson [Tue, 21 Mar 2017 17:21:15 +0000 (10:21 -0700)]
hci: Update error messages

Test: builds
Change-Id: I33544572122a166523a40dde090f276b102df247

7 years agoIntegration of LDAC Adaptive Bit Rate mechanism
fen wang [Tue, 28 Mar 2017 05:03:51 +0000 (05:03 +0000)]
Integration of LDAC Adaptive Bit Rate mechanism
am: dfc02a91a1

Change-Id: I5a82550e3f70768063f811c64b7d68e4a85e7ce6

7 years agoIntegration of LDAC Adaptive Bit Rate mechanism
fen wang [Wed, 15 Mar 2017 05:52:52 +0000 (14:52 +0900)]
Integration of LDAC Adaptive Bit Rate mechanism

LDAC ABR controls LDAC encoder bit rate based on A2DP transmit queue
length.
It can be used if the LDAC ABR library is installed on the device:
libldacBT_abr.so

Test: manual
Bug: 35381097
Change-Id: Idcc2fabe86acaf441f5a71f5d2bb66ad29252cdb

7 years agoAdd option to specify initial LE connection PHY (1/3)
Jakub Pawlowski [Mon, 27 Mar 2017 20:48:19 +0000 (20:48 +0000)]
Add option to specify initial LE connection PHY (1/3)
am: 96fb273d92

Change-Id: I083e1ef7f4fe6d958fb2f3d4d3faaffd02c2d3be

7 years agoAdd option to specify initial LE connection PHY (1/3)
Jakub Pawlowski [Sat, 25 Mar 2017 00:52:02 +0000 (17:52 -0700)]
Add option to specify initial LE connection PHY (1/3)

For whitelist connections we always use all possible PHYs, for direct
connection use PHY specified by client.

Test: manual
Bug: 30622771
Change-Id: I720f134e2800dc3d282135bb7ffbe3882117c680

7 years agoMerge "btm_sec: p_name fails matching security records"
Zach Johnson [Fri, 24 Mar 2017 21:22:08 +0000 (21:22 +0000)]
Merge "btm_sec: p_name fails matching security records"
am: e9082e66c2

Change-Id: Ia2c574d1a36f840045110d55a6d34fb89776890e

7 years agoMerge "btm_sec: p_name fails matching security records"
Zach Johnson [Fri, 24 Mar 2017 21:19:30 +0000 (21:19 +0000)]
Merge "btm_sec: p_name fails matching security records"

7 years agoExpose connection update callback (1/3)
Jakub Pawlowski [Fri, 24 Mar 2017 20:36:43 +0000 (20:36 +0000)]
Expose connection update callback (1/3)
am: b5ba4fdbc4

Change-Id: I609d1fb2788c93ced5cf4a6afa302fed59543a6d

7 years agobtm_sec: p_name fails matching security records
Martin Brabham [Thu, 16 Feb 2017 23:06:30 +0000 (15:06 -0800)]
btm_sec: p_name fails matching security records

When doing a comparison on p_name that is passed in against
the p_name in the struct will never match if the passed in
name is >= 21 characters.  This is due to the strlcpy replacing
the last character with a null termination character.

Without this patch, you will observe 2 security records for
"Android Network Acce" (which is supposed to be "Android Network Access Point")

BTM_SEC_SERVCE_NAME_LEN = 21

                                                    21
passed in: |A|n|d|r|o|i|d| |N|e|t|w|o|r|k| |A|c|c|e|s|s| |P|o|i|n|t|
           ---------------------------------------------------------
structval: |A|n|d|r|o|i|d| |N|e|t|w|o|r|k| |A|c|c|e|\0|

Bug: 34707848
Test: Compile, Manual
Change-Id: I24e0204d8faf54545c7b720a0fbc6765db9a1295

7 years agoExpose connection update callback (1/3)
Jakub Pawlowski [Fri, 24 Mar 2017 01:11:04 +0000 (18:11 -0700)]
Expose connection update callback (1/3)

Test: manual
Bug: 30622771
Change-Id: I94d25f6f22b42fb1432a9288c97b82503d57db86

7 years agohci: Timestamp HCI commands for timeouts
Myles Watson [Fri, 24 Mar 2017 15:52:39 +0000 (15:52 +0000)]
hci: Timestamp HCI commands for timeouts
am: 17d3595cf1

Change-Id: Ic22314e4b18e8b405f96f38e93849ae2c3dbade8

7 years agohci: Timestamp HCI commands for timeouts
Myles Watson [Thu, 23 Mar 2017 21:34:40 +0000 (14:34 -0700)]
hci: Timestamp HCI commands for timeouts

Test: Start Bluetooth with COMMAND_PENDING_TIMOUT_MS=2
Change-Id: I393592ede7b9b0aab9c13f6c79756c24edd3d930

7 years agoSet preferred PHY and read PHY implementation (3/3)
Jakub Pawlowski [Fri, 24 Mar 2017 01:12:59 +0000 (01:12 +0000)]
Set preferred PHY and read PHY implementation (3/3)
am: eafd45d086

Change-Id: I59ac8486bd565062ebc5c5a9908100c834a0344c

7 years agoSet preferred PHY and read PHY implementation (3/3)
Jakub Pawlowski [Thu, 23 Mar 2017 02:00:47 +0000 (19:00 -0700)]
Set preferred PHY and read PHY implementation (3/3)

Test: manual
Bug: 30622771
Change-Id: I4267238a0b5c7bc373ae1846ebd19a716881a4ec