OSDN Git Service
TreeHugger Robot [Wed, 19 Apr 2017 22:40:13 +0000 (22:40 +0000)]
Merge "test_vendor: Remove unused libbt-vendor files" into oc-dev
Jacky Cheung [Wed, 19 Apr 2017 21:40:33 +0000 (21:40 +0000)]
Do not GATT_ERROR on MTU change am:
a365626943
am:
f21c3dede7 -s ours
Change-Id: I34f636613c211a859da4e2a095e02ca801944b61
Jacky Cheung [Wed, 19 Apr 2017 21:35:03 +0000 (21:35 +0000)]
Do not GATT_ERROR on MTU change
am:
a365626943
Change-Id: I956c4ca2e31d5c98e986738be0890c17e21b1186
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
Bug:
36055995
Change-Id: I9245f726f37ffd666d143d2232dac868a2cc3268
(cherry picked from commit
6510a471696f24a051b79ca9fd7a210bf7e293bc)
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
(cherry picked from commit
10b43d2fa0f408dbe465febb27aace0e111b01ff)
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
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
(cherry picked from commit
a825f565504fa17d5458c57092f4c0ec0e539128)
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
(cherry picked from commit
648ea508c95ade2d8cb8b2928c70ae123fab8334)
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
(cherry picked from commit
2dc048b0ed2684d8e538f0eaf67cd2b7ea79ce96)
TreeHugger Robot [Tue, 18 Apr 2017 13:42:18 +0000 (13:42 +0000)]
Merge "AVRCP CT: Only call handle_rc_features if target registered" into oc-dev
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
(cherry picked from commit
86ae6c0200347fb5734491555be4a4d59eaabfea)
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
(cherry picked from commit
7745e29576703a84f4a6b47f13b3cec068033e28)
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
(cherry picked from commit
ad372cfa3376f882046284a5655ed9c6fdf24daf)
Jacky Cheung [Fri, 14 Apr 2017 20:49:23 +0000 (13:49 -0700)]
Do not GATT_ERROR on MTU change
Bug:
37305498
Test: manual on MSM8909
Change-Id: Iabec87375da1e8cd05356a7be490a66205d24e78
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
(cherry picked from commit
a3292051d9c088769b0f4e46ffaf7c66b1127194)
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
(cherry picked from commit
1f5ec7304fc4e297f9f9868b5bd9382c2a26c8cc)
TreeHugger Robot [Fri, 14 Apr 2017 02:45:48 +0000 (02:45 +0000)]
Merge "Move audio.a2dp.default to vendor" into oc-dev
TreeHugger Robot [Thu, 13 Apr 2017 20:05:37 +0000 (20:05 +0000)]
Merge "HFP: Disable BTRH feature" into oc-dev
Po-Chien Hsueh [Tue, 7 Mar 2017 02:27:21 +0000 (10:27 +0800)]
Move audio.a2dp.default to vendor
Default HAL should go to /vendor/.
Bug:
35907904
Bug:
35979581
Test: Compiled and checked install path. Verified on Sailfish with
$ lsof | grep default. MP3 playback over my BT headset.
Change-Id: I93a341cc96b8d991dea52070f633566bf71f0dc0
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
Test: make, PTS test
Change-Id: If1aa32291491982851ecd480c4ba8390f39a27a2
Merged-In: If1aa32291491982851ecd480c4ba8390f39a27a2
(cherry picked from commit
a25ef0b60b4ca10385dac02334dc3e4e2ad23edb)
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
(cherry picked from commit
7a9892c63bad8f8d93681fb74d5532a79387b60e)
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
(cherry picked from commit
5e9f56940e1865d16892639e4c9144a65547626e)
Jack He [Tue, 11 Apr 2017 22:49:06 +0000 (22:49 +0000)]
Check LE advertising data length before caching advertising records am:
1bef3546a6 am:
e6620d18cf am:
585e0c08f5 am:
005eb1d305 am:
7752061901 am:
0ddb124e6e am:
2feb43b5b1 am:
72270d976b
am:
e0702cd5b8 -s ours
Change-Id: I3157998e2357ece35235b6636d9ab45bcc60ef60
Jack He [Tue, 11 Apr 2017 22:38:39 +0000 (22:38 +0000)]
Check LE advertising data length before caching advertising records am:
1bef3546a6 am:
e6620d18cf am:
585e0c08f5 am:
005eb1d305 am:
7752061901 am:
0ddb124e6e am:
2feb43b5b1
am:
72270d976b
Change-Id: I6dbf93e14a6c31092d2ecce2738b7680b738220c
Jack He [Tue, 11 Apr 2017 22:33:09 +0000 (22:33 +0000)]
Check LE advertising data length before caching advertising records am:
1bef3546a6 am:
e6620d18cf am:
585e0c08f5 am:
005eb1d305 am:
7752061901 am:
0ddb124e6e
am:
2feb43b5b1
Change-Id: I3d16a2939976a326ca20056b29818e2df550ee67
Jack He [Tue, 11 Apr 2017 22:28:08 +0000 (22:28 +0000)]
Check LE advertising data length before caching advertising records am:
1bef3546a6 am:
e6620d18cf am:
585e0c08f5 am:
005eb1d305 am:
7752061901
am:
0ddb124e6e
Change-Id: I61b9f5741d5fd6035fb7d472b83dc9df54eb3483
Jack He [Tue, 11 Apr 2017 22:23:08 +0000 (22:23 +0000)]
Check LE advertising data length before caching advertising records am:
1bef3546a6 am:
e6620d18cf am:
585e0c08f5 am:
005eb1d305
am:
7752061901
Change-Id: I1f821df2a72958ed17ce5bf8baed431a52dfb087
Jack He [Tue, 11 Apr 2017 22:18:07 +0000 (22:18 +0000)]
Check LE advertising data length before caching advertising records am:
1bef3546a6 am:
e6620d18cf am:
585e0c08f5
am:
005eb1d305
Change-Id: Ic4f826e4f963f969c360fe39c6e720c3fb013d23
Jack He [Tue, 11 Apr 2017 22:13:06 +0000 (22:13 +0000)]
Check LE advertising data length before caching advertising records am:
1bef3546a6 am:
e6620d18cf
am:
585e0c08f5
Change-Id: If70a5f9b56845e758c2a2a3150936a72cac9f438
Jack He [Tue, 11 Apr 2017 22:08:06 +0000 (22:08 +0000)]
Check LE advertising data length before caching advertising records am:
1bef3546a6
am:
e6620d18cf
Change-Id: I412c0dd7854d7f6157e1974e285078909543bb41
Jack He [Tue, 11 Apr 2017 22:03:05 +0000 (22:03 +0000)]
Check LE advertising data length before caching advertising records
am:
1bef3546a6
Change-Id: Ibbf6183833d7f00937742fa337a04569c4ef3c2f
Jack He [Thu, 6 Apr 2017 00:59:58 +0000 (17:59 -0700)]
Check LE advertising data length before caching advertising records
Bug:
33899337
Test: make, receive LE advertising
Change-Id: I06b249ac5cabdef64528deda07b8bae749e1d2fd
(cherry picked from commit
d57adbc350fdee4f27b82c9e39a14bd745d92320)
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
(cherry picked from commit
b0aca861fee4f0fbab809b5a1ef75c31d10055bd)
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
(cherry picked from commit
1f62c122e908573497a8c69ccd7bd829ce02a0b9)
Jakub Pawlowski [Mon, 10 Apr 2017 09:19:29 +0000 (02:19 -0700)]
Linux build fix
Test: manual
Change-Id: I5c86e96b9bb1cee5b535ea1fa6ba0b6d078a9b09
(cherry picked from commit
17f449dab52a6092422a0405e6fe589488661594)
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
(cherry picked from commit
f6db7cb9a30b34493df8658d59b2fe2232bc828a)
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
(cherry picked from commit
6bd467a004f4416aafc7fbd4da19b1e54578fd18)
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
(cherry picked from commit
e7f14a682d57811d9df0d64372f222bcc143ec86)
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
(cherry picked from commit
302113d4e44f06e90f90a5903e33ae830edb58a3)
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
(cherry picked from commit
304ceeb5202060a9c625a55369cbf28d72f5e2d9)
Jacky Cheung [Fri, 7 Apr 2017 23:57:19 +0000 (23:57 +0000)]
DO NOT MERGE ANYWHERE Mark AutoConnParamUpdateAddr on first auto connection param update am:
dd467f108f -s ours
am:
1386ae5d92 -s ours
Change-Id: Ieea4194c4ea69e72f92a21dbd08eff94d390a02d
Jacky Cheung [Fri, 7 Apr 2017 23:53:48 +0000 (23:53 +0000)]
DO NOT MERGE ANYWHERE Mark AutoConnParamUpdateAddr on first auto connection param update
am:
dd467f108f -s ours
Change-Id: Iae88352c83d7f3b1430c02e2af3a683bebae3bb2
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
(cherry picked from commit
16899e9d1ef49aedba8435ff3a5e4476f036427a)
Myles Watson [Tue, 7 Mar 2017 13:00:04 +0000 (05:00 -0800)]
Finish conversion to Android.bp
Bug:
35651902,
35672576,
36810308
Test: build, Android Cloud Bluetooth net_test_bluetooth
Change-Id: Ie99966d610ea35ab8caf8a084d92c43618e90b94
TreeHugger Robot [Wed, 5 Apr 2017 17:51:07 +0000 (17:51 +0000)]
Merge "test: Add a simulated Bluetooth HAL implementation" into oc-dev
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
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
(cherry picked from commit
b32704f424e0ab4cd33ad670173997f8e3a0a31c)
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
(cherry picked from commit
77c6bc5886da34011fc6b6bfcc15cf19dc4b5b68)
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
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
(cherry picked from commit
5204c62f137de9b6c2834391fd329457d3fdbc84)
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
(cherry picked from commit
9389b64629776238e6ee69b1f37bdec97187e75e)
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
(cherry picked from commit
f685bfb7b1f6da17165a33590b18f559476e670f)
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
TreeHugger Robot [Thu, 30 Mar 2017 02:40:54 +0000 (02:40 +0000)]
Merge "l2cap: Use CHECK for memory allocation errors" into oc-dev
TreeHugger Robot [Thu, 30 Mar 2017 01:39:52 +0000 (01:39 +0000)]
Merge "osi: Update error messages" into oc-dev
TreeHugger Robot [Thu, 30 Mar 2017 01:36:05 +0000 (01:36 +0000)]
Merge "hci: Update error messages" into oc-dev
Myles Watson [Tue, 21 Mar 2017 17:28:20 +0000 (10:28 -0700)]
osi: Update error messages
Test: build
Change-Id: I5af34f01c47d8037d56c27e7e3fab3cc2f5fd2bc
(cherry picked from commit
1dc4b361ddc16ec8d917b052c8a3d9bdb28bbd1c)
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
(cherry picked from commit
1d418ba650480d99cdf10ee814b6224de4ee88ce)
Myles Watson [Tue, 21 Mar 2017 17:21:15 +0000 (10:21 -0700)]
hci: Update error messages
Test: builds
Change-Id: I33544572122a166523a40dde090f276b102df247
(cherry picked from commit
ec728d3136aabcd7675aba4a672d932e0709c509)
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
(cherry picked from commit
2073c3eb61f69864e645c50005f11c4e8b5e2588)
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
(cherry picked from commit
e4f2b615678ccb1fe7e13da4f166c9a45fd16136)
fen wang [Tue, 28 Mar 2017 05:20:02 +0000 (05:20 +0000)]
Integration of LDAC Adaptive Bit Rate mechanism am:
dfc02a91a1 am:
2bbd84b0e3
am:
66d7309640
Change-Id: I53f5b3af71ff05c24c40e428665dde981712df7a
fen wang [Tue, 28 Mar 2017 05:11:49 +0000 (05:11 +0000)]
Integration of LDAC Adaptive Bit Rate mechanism am:
dfc02a91a1
am:
2bbd84b0e3
Change-Id: Iae3bb76449af74af89a37be6ef4445fc828996f7
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
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
Jakub Pawlowski [Mon, 27 Mar 2017 20:54:21 +0000 (20:54 +0000)]
Add option to specify initial LE connection PHY (1/3) am:
96fb273d92 am:
f0b97cad96
am:
4ee5145383
Change-Id: I49a3c0d17f3987cbff52ddbdbbfd7fab4a8ecaea
Jakub Pawlowski [Mon, 27 Mar 2017 20:51:21 +0000 (20:51 +0000)]
Add option to specify initial LE connection PHY (1/3) am:
96fb273d92
am:
f0b97cad96
Change-Id: I16eee0c1c46b93e9e0773e906782f17a9c432900
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
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
Zach Johnson [Fri, 24 Mar 2017 21:26:33 +0000 (21:26 +0000)]
Merge "btm_sec: p_name fails matching security records" am:
e9082e66c2 am:
73071a04b1
am:
f98c8de067
Change-Id: Icebcbde0d537c9bc5d37a9d0577ce12114d32b75
Zach Johnson [Fri, 24 Mar 2017 21:24:03 +0000 (21:24 +0000)]
Merge "btm_sec: p_name fails matching security records" am:
e9082e66c2
am:
73071a04b1
Change-Id: Ic2036538f8eb950c01de850411d4017732d80c0d
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
Zach Johnson [Fri, 24 Mar 2017 21:19:30 +0000 (21:19 +0000)]
Merge "btm_sec: p_name fails matching security records"
Jakub Pawlowski [Fri, 24 Mar 2017 20:47:14 +0000 (20:47 +0000)]
Expose connection update callback (1/3) am:
b5ba4fdbc4 am:
8e6bf08046
am:
f45314ce13
Change-Id: Iee7714ddedf1a594209657192406ec468be60410
Jakub Pawlowski [Fri, 24 Mar 2017 20:42:05 +0000 (20:42 +0000)]
Expose connection update callback (1/3) am:
b5ba4fdbc4
am:
8e6bf08046
Change-Id: I283b1416e2ad4122137ac585762f4ffa6bfbb9bc
Jakub Pawlowski [Fri, 24 Mar 2017 20:36:43 +0000 (20:36 +0000)]
Expose connection update callback (1/3)
am:
b5ba4fdbc4
Change-Id: I609d1fb2788c93ced5cf4a6afa302fed59543a6d
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
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
Myles Watson [Fri, 24 Mar 2017 15:57:14 +0000 (15:57 +0000)]
hci: Timestamp HCI commands for timeouts am:
17d3595cf1 am:
8bc0c70cc1
am:
92dd65aa67
Change-Id: I8794647aef2153008ced8c9e021598f2494facea
Myles Watson [Fri, 24 Mar 2017 15:54:40 +0000 (15:54 +0000)]
hci: Timestamp HCI commands for timeouts am:
17d3595cf1
am:
8bc0c70cc1
Change-Id: Ic6aac41fb0320e35bb9e88dfd4782a7ffa4f0655
Myles Watson [Fri, 24 Mar 2017 15:52:39 +0000 (15:52 +0000)]
hci: Timestamp HCI commands for timeouts
am:
17d3595cf1
Change-Id: Ic22314e4b18e8b405f96f38e93849ae2c3dbade8
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
Jakub Pawlowski [Fri, 24 Mar 2017 01:17:00 +0000 (01:17 +0000)]
Set preferred PHY and read PHY implementation (3/3) am:
eafd45d086 am:
ba23876865
am:
abe47b88c5
Change-Id: I1f94325ea389cba9a1fa56e6cbdb407d98f9a1a4
Jakub Pawlowski [Fri, 24 Mar 2017 01:15:01 +0000 (01:15 +0000)]
Set preferred PHY and read PHY implementation (3/3) am:
eafd45d086
am:
ba23876865
Change-Id: Ie4bdf53b73df8e4aae8a348d1d23776fc3c546fa
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
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
Myles Watson [Fri, 24 Mar 2017 00:05:14 +0000 (00:05 +0000)]
hci: Cancel timer before running callbacks am:
e7be6de450 am:
dc01e4c0f4
am:
f384911dc7
Change-Id: I49cd56678a508622c9edfa37b12f702b044cc82c
Myles Watson [Fri, 24 Mar 2017 00:03:44 +0000 (00:03 +0000)]
hci: Cancel timer before running callbacks am:
e7be6de450
am:
dc01e4c0f4
Change-Id: Ic588bd854e0365aa49c9f35b8ec0e71879d05f01
Myles Watson [Fri, 24 Mar 2017 00:02:14 +0000 (00:02 +0000)]
hci: Cancel timer before running callbacks
am:
e7be6de450
Change-Id: I96b4b1d76a9354f2564296e8b607f507e69b59e8
Myles Watson [Thu, 23 Mar 2017 18:49:13 +0000 (11:49 -0700)]
hci: Cancel timer before running callbacks
Bug:
36507488
Test: Turn Bluetooth on/off, scan for devices
Change-Id: Ia9334d83b2191504acdab50f777b6d10073226e0
Ajay Panicker [Thu, 23 Mar 2017 20:58:27 +0000 (20:58 +0000)]
Merge "Increase size of written bytes for snprintf for AT+BIND" am:
fca1242cf1 am:
7d2fc68df8
am:
65c4b0a87f
Change-Id: I7a537d99b6e1c1fcab5e5fc9e1086df269e05732
Ajay Panicker [Thu, 23 Mar 2017 20:54:57 +0000 (20:54 +0000)]
Merge "Increase size of written bytes for snprintf for AT+BIND" am:
fca1242cf1
am:
7d2fc68df8
Change-Id: I6a8a5df14408ac09807a5e881dfe94f05e1a8283
Pavlin Radoslavov [Thu, 23 Mar 2017 20:52:39 +0000 (20:52 +0000)]
Fix a race condition inside command_timed_out() when printing log info am:
b77d7129b2 am:
fd7231f3e6
am:
099fc1c9d3
Change-Id: I1b86659b70b2514e748c9710e7292b9bacb5183f
Ajay Panicker [Thu, 23 Mar 2017 20:52:30 +0000 (20:52 +0000)]
Merge "Increase size of written bytes for snprintf for AT+BIND"
am:
fca1242cf1
Change-Id: I648cdddbc18cd94c0b2568082834b1142b666463
Pavlin Radoslavov [Thu, 23 Mar 2017 20:50:11 +0000 (20:50 +0000)]
Fix a race condition inside command_timed_out() when printing log info am:
b77d7129b2
am:
fd7231f3e6
Change-Id: I6509c9929c9f6b8725a8ca53bf207d40c41d2ada
Treehugger Robot [Thu, 23 Mar 2017 20:47:55 +0000 (20:47 +0000)]
Merge "Increase size of written bytes for snprintf for AT+BIND"
Pavlin Radoslavov [Thu, 23 Mar 2017 20:46:46 +0000 (20:46 +0000)]
Fix a race condition inside command_timed_out() when printing log info
am:
b77d7129b2
Change-Id: Ib3dd8f598b62b2706314fea6c3a17f0dac789425
Pavlin Radoslavov [Thu, 23 Mar 2017 19:24:57 +0000 (12:24 -0700)]
Fix a race condition inside command_timed_out() when printing log info
Release the lock after we don't need anymore access to the wait_entry
that was protected by the lock.
Note: We are keeping the lock right before restarting the Bluetooth
process, hence it doesn't matter we are holding it for a bit longer
than before.
Test: Code compilation
Change-Id: Id393a285fce9b9e28efcf0f55fcc32821c5a72b6
Ajay Panicker [Thu, 23 Mar 2017 18:10:12 +0000 (18:10 +0000)]
Merge "AVRCP version interop pereference (1/3)" am:
921f514bcf am:
484e89038a
am:
54666d3a5f -s ours
Change-Id: I18c6e5eda57f79f10d6e548e4bc2b13cdb49ba31
Ajay Panicker [Thu, 23 Mar 2017 18:04:04 +0000 (18:04 +0000)]
Merge "AVRCP version interop pereference (1/3)" am:
921f514bcf
am:
484e89038a
Change-Id: I3edf0eac58364069cae764bebe9805a2d3b87839