- Jan 26, 2017
-
-
Stephen Li authored
This is because patchset 1 of change 328081 got merged in to the branch and not patchset 2, despite what gerrit UI says. This is a known error and is being worked on. Change-Id: If4f6f3d705e93f03d120c6441e16e9b0afc3d9ca
-
Treehugger Robot authored
-
Andre Eisenbach authored
Test: compiles Change-Id: Ia5bf3395bd5a18a27168f05a0a2239a37ddb2c2c
-
Pavlin Radoslavov authored
Also: - Implemented data fragmentation inside bta_av_data_path() that is RTP compatible. - Do not use the codec_type when composing the RTP payload type per RFC 3016, Section 4.2. That value doesn't have actual meaning in the context of the Bluetooth supported codecs, and is ambiguous: all vendor codecs map to the same value 0xFF. - Updated support function A2DP_BitsSet() so it works for up to 64-bit integers. - Updated a log message inside l2c_data_write() to print packet length and peer MTU on error. Test: A2DP streaming to AAC headsets Bug: 30958229 Change-Id: I1b530f1c5c495b8231fd68bed788d4567096683d
-
- Jan 25, 2017
-
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Srinu Jella authored
As the BTIF config updation have delay in writing items to the NVRAM, some times there is a chance of not updating incase of battery removal happens before the actual write onto NVRAM. As SDP UUIDs is important data to store, it will update immediately onto NVRAM. Test: manual Change-Id: I6637dc326f3a53211a5bbf988a2dca1020203128
-
Andre Eisenbach authored
Test: compiles Change-Id: Ia5bf3395bd5a18a27168f05a0a2239a37ddb2c2c
-
Ivan Podogov authored
In some cases, we end up in a state where we can neither connect nor forcefully end connection, and will require disabling the Bluetooth adapter to fix this state. When a device is taking too long to connect (or out of range), the user may want to cancel the connection by calling disconnect method, which will be ignored in any state other than BTA_HD_CONN_ST. It is a lot better to immediately cease the connection process at this point, so: - BTA_HD_API_DISCONNECT_EVT is now not ignored in BTA_HD_IDLE_ST; - bta_hd_disconnect_act now reports a correct MAC address during disconnection (it used to send 00:00:00:00:00:00 before); - HidDevDisconnect now allows to forcefully end the connection, and does it in exactly the same way we handle the errors. When L2CAP connection fails, both hidd_l2cif_config_ind and hidd_l2cif_config_cfm set conn_state to HID_CONN_STATE_UNUSED, which is immediately overwritten by the hidd_conn_disconnect call (it will set conn_state to HID_CONN_STATE_DISCONNECTING, because ctrl_cid != 0 in both cases), thus making any subsequent calls to connect failing with "already connecting" error. More than that, all functions send the HID_DHOST_EVT_CLOSE event when failing, which is, again, ignored in the BTA_HD_IDLE_ST state. So: - BTA_HD_INT_CLOSE_EVT is now not ignored in BTA_HD_IDLE_ST; - conn_state is set to HID_CONN_STATE_UNUSED after the call to hidd_conn_disconnect, but before sending the close event. Test: Build, run, connect/disconnect multiple times. Change-Id: I85bb03f760bb9a6fd4c1b944d515232c1be12300
-
- Jan 24, 2017
-
-
Jack He authored
* In certain cases btif_a2dp_source_stop_audio_req() could be called before btif_a2dp_source_start_audio_req() is called, resulting in session_start_us to be 0. In this case, audio_duration_ms = time_get_os_boottime_us() - 0 will be a very large number that is not the actual audio duration. This CL marks audio_duration_ms as -1 in the above situation so that we can differentiate between valid and invalid audio durations * Set default timer and counter values to 0 when tx_queue_dequeue_stats.total_updates > 1 * Move update_scheduling_stats for tx_queue_enqueue_stats to btif_a2dp_source_audio_handle_timer as we intend to capture the time intervals for enqueue scheduling instead of time intervals between frame enqueue (i.e. one scheduling event can enqueue multiple frames) * Use tx_queue_enqueue_stats for metrics instead of *dequeue* since only enqueue is triggered by timer event Bug: 33694310 Test: Code compilation, BtFunhausMetricsTest Change-Id: I10984920afd4d77f07a5ac75736f8dcd69b13af8 (cherry picked from commit aa79f0fb)
-
- Jan 23, 2017
-
-
Jakub Pawlowski authored
Some controllers are strict about VSC handle mapping, and don't allow using zero value. Test: manual test Change-Id: Ia2df17af16e0e4da375d6e7d5b5f882ced508ce9
-
IHLHO KIM authored
GATT server disconnect and HOGP disconnect are not working after the following commit: bd9e1ef1. ‘BTA_GATTS_CancelOpen’ makes ‘gatt_update_app_hold_link_status’ return FALSE value. As a result, ‘BTA_GATTS_Close’ cannot disconnect the link. The sequence has to be changed like GATT client. And the above mentioned fix removed ‘found’ checking routine in ‘gatt_update_app_hold_link_status’. It makes two app hold links with same gatt_if when HOGP is connected and background connection is added. But HOGP disconnect removes only one held link. So HOGP is never disconnected. The ‘found’ checking routine has to be rolled back. Test: manual Change-Id: Ibea825b5cc844195f0cf4a30cbcca831880c9088
-
- Jan 21, 2017
-
-
Jakub Pawlowski authored
When advertising is enabled with timeout, enable callback was not called. Also we were not scheduling the disable operation after the timeout passes. This patch fixes that. It also make sure that the timeout callback is called on proper thread. Bug: 34440704 Test: sl4a ConcurrentBleAdvertising:test_timeout Change-Id: I233c2692c690f55ef6243325640e48b37818c9d5
-
- Jan 20, 2017
-
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Nagarjuna Kristam authored
When a BLE remote read remote feature complete event is received initial commands flow is proceeding if error code is not connection failed to establish (0x3E). Instead, the flow should fail on any error. Test: Re-connection stress tests with LE device Change-Id: I4ab80b6601f5f852fcf8da2911807438584fd3f4
-
Kamal Negi authored
Use Case: Repeated BT ON/OFF Failure: ANR due to race condition between random advertisement address generation completion(adv_raddr_timer) and BT shutdown. Steps: SNS Stress testing. Root Cause: Race condition happens between random advertisement address generation completion(adv_raddr_timer) and BT shutdown. Fix: For non-periodic alarms, set alarm's queue to NULL once alarm expired. Test: mm -j8 Change-Id: Idf8e2bebdc2ca7621aef06dd5f2075ef2c5fa08c
-
Srinu Jella authored
Use Case: BT crash seen while transferring data using HDP APP to remote health device. Steps: 1. Pair with HDP device 2. Run HDP APP and transfer data to Remote HDP device. Failure: BT automatically resets and recovers. Root Cause: Synchronize BITF HL free buffer as simultaneously free buffer from BTIF and BTU thread lead to sigabort. Fix: Validate Tx packet before memcpy as it can be free from different thread. Test: mm -j8 Change-Id: I566f62ce02c8e95c9f4b8d7155132e4434657f66
-
Satish Kodishala authored
Usecase: 1. Turn ON BT 2. Pair and connect with Headset 3. Play Music over A2DP 4. Make GetRssi timeout 5. Bt app crashes Failure: BT app crashes. Rootcause: Calling callback with NULL and in callback handling NULL check with assert. Fix: Call the callback with error instead of NULL. Change-Id: I20a9e504a513697945cd76d218ec12a0ef1e3330
-
Sanket Agarwal authored
Initialize the block with invalid SCO state so that while allocating the if condition does not ignore the block. This was causing the stack to not initiate a SCO connection to the remote (AG role) Bug: b/33555377 Test: Check for SCO initialied on audio call Change-Id: I3f5619c69288483bfa45c2a1adcf22008e353841
-
Jack He authored
* Set the maximum number of wake events logged to 1000 * Stop logging wake log name as it takes too much memory * Add counters for each of the repeated values in BluetoothLog so that the true number of events can be determined while oldest event get dropped * Log Bluetooth session disconnect reasons using enum instead of string in order to save memory usage * Apply other branch changes to bluetooth.proto on system/bt Bug: 33694310 Test: Code compilation and unit tests Change-Id: I2cc6f9304725938b63b211d615eb1941eac60edf (cherry picked from commit 7ab4b59672013eddcb706e288962ab7309a75628)
-
- Jan 19, 2017
-
-
Myles Watson authored
Bug: 34357009 Test: push test-vendor lib as libbt-vendor.so, Bluetooth starts Change-Id: Id3a5f85f6b3da5a723dba04527db8b66de0e84a8
-
Jakub Pawlowski authored
This patch fixes bad comparison in add_service_impl. Instead of checking wether service is one of two excluded services, it was excluding all services. Test: sl4a GatReadTest Bug: 34280184 Change-Id: I3195e94b6fafe4d2e3c61fc7bfd7398c2855b78e
-
Treehugger Robot authored
-
Jorge E. Moreira authored
Test: Start the test vendor library with no error message Bug: 34357009 Change-Id: Id2821199ad675e2b95a9f333afa803dcced811a3
-
Jack He authored
* Current parser does not support multi-directory lists, which may cause a build failure if BoardConfig.mk defines one. * This CL splits the list of directories using whitespace and adds them individually to the include list Bug: 34396100 Test: Code compilation, no user visible effect Change-Id: I59e901d76d1bc20f50b54941a3007c5521ded214
-
- Jan 18, 2017
-
-
Jack He authored
* Convert top level Android.mk into build templates in build/Android.bp and build/fluoride.go * Initial conversion is done by "androidmk Android.mk > Android.bp" * Android.bp does not allow source inclusion from external directories and therefore they have to be made in to cc_library_static in their respective sub-directories and linked using whole_static_libs in the modules where they are used * As Android.bp does not allow multiple modules of the same name, same-name mudules for different target are merged into one definition with target specific setup * Generated proto header path has to be changed in osi/src/metrics.cc as Android.bp only generate header path relative to the Android.bp file instead of top-level directory such as system/bt * Android.bp does not support resource copying yet and hence conf files are left un-touched. * Android.bp does support conditional module declaration and therefore test-vendor libs are left untouched except for unit tests * The goal of this CL is to direct (almost) translate Android.mk to Android.bp first with Android.bp specific optimizations coming later Bug: 32958753 Test: Code compilation, manual testing by test team Change-Id: I5249e1f2135c4121205619b1d735ce448feb7499
-
Treehugger Robot authored
-
Sanket Agarwal authored
Bug: b/33552136 Test: adb shell dumpsys bluetooth_manager Change-Id: I3cb6c28bffe6b335cf82cac63dc78ce4957d78f4
-
Hemant Gupta authored
Usecase: 1) User tried to connect to HID Device. 2) SDP is internally performed by DUT. SDP is at stage, where L2CAP connection, configuration is done, and data fetch is ongoing. 3) BT was turned off from UI. Observation: BT crashed while accessing memory that was freed already because BT turn off, caused ACL disconnection, leading to L2CAP disconnect indication in stack, leading to sdp disconnect indication. backtrace: #00 pc 000f98d4 /system/lib/hw/bluetooth.default.so (SDP_FindServiceUUIDInDb+51) #1 pc 000b5dbd /system/lib/hw/bluetooth.default.so (hidh_search_callback+0x40) #02 pc 000f770b /system/lib/hw/bluetooth.default.so (sdp_disconnect_ind+0x5e) #03 pc 00107a5f /system/lib/hw/bluetooth.default.so (l2c_csm_execute+3446) #04 pc 001080e7 /system/lib/hw/bluetooth.default.so (l2c_link_hci_disc_comp+122) #05 pc 000fda81 /system/lib/hw/bluetooth.default.so (btu_hcif_process_event+588) #06 pc 000fec81 /system/lib/hw/bluetooth.default.so (btu_hci_msg_ready+96) #07 pc 00118191 /system/lib/hw/bluetooth.default.so #08 pc 0011917f /system/lib/hw/bluetooth.default.so #09 pc 00041993 /system/lib/libc.so (_ZL15__pthread_startPv+30) #10 pc 000192b5 /system/lib/libc.so (__start_thread+6) Register Dump pid: 15740, tid: 15761, name: bluedroid wake/ >>> com.android.bluetooth <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x20000 r0 815a5cac r1 a1a2f370 r2 00000000 r3 85d4e541 r4 00020000 r5 815a5cac r6 a1a2f370 r7 b6d3ae40 r8 00000000 r9 b6d3ae40 sl 00000002 fp 00000013 ip a228c050 sp a1a2f360 lr a20eddc1 pc a21318d4 cpsr 200e0030 Rootcause The above scenario could lead to crash we see as below, as bta_hh_cb.p_disc_db would be freed during HID Host cleanup, and would be accessed via callback received for parsing SDP results on SDP completion. Fix: While cleaning up HID Host, Cancel SDP search before freeing and resetting bta_hh_cb.p_disc_db. This will internally send L2CAP disconnect request for SDP, and would lead to sdp_disconnect_cfm call when L2CAP is disconnected, and would lead to call of hidh_search_callback with result code as SDP_CANCEL. Change-Id: I63563cb23dd69946f87a70cafa203c44edc9b753
-
- Jan 17, 2017
-
-
Pavlin Radoslavov authored
Codecs like aptX and aptX-HD are supported on the device if the corresponding shared library is installed. Fix the unit tests to conditionally test for aptX/aptX-HD. Also, update function descriptions in files a2dp_sbc.h and a2dp_vendor_ldac.h . Test: Running unit tests on a device that doesn't have aptX/aptX-HD Change-Id: I44dc275ca6e0cb5438ee6ed0b6213213d56592f4
-
liuchao authored
This fixes a potential NULL-pointer access in case cb is returned NULL Test: mm -j 8 Change-Id: Iaf7aa0ba736b5cb161811726b4aaea7f1ab7e5b3
-
Treehugger Robot authored
-
Jakub Pawlowski authored
Those services are automatically added by the stack, and overriding them results in invalid GATT database being created. Bug: 34280184 Test: Manual test Change-Id: Ie6a09e9d606e40066bef6f6a2c934eacd17bf53b
-
Jakub Pawlowski authored
When doing a discovery of invalid GATT database, where two services are added with same start handle, characteristics are added to the first one, where descriptors are added to the later. This cause NPE when adding descriptor. Bug: 34280184 Test: manual test Change-Id: I27619098df33a641cb089b82cf4d4ffd3c6e6aea
-
Pavlin Radoslavov authored
Also, fixed a typo in a log message. Test: A2DP streaming to headset, and capturing "adb logcat" output Change-Id: I525d78e3ebde334857261f0cbd256a7f6a946e96
-
Reddy Praveen authored
With BT 5.0 extended advertisement scan parameter length is configured with correct value. Test: BT scan from settings menu Change-Id: I749099282a9f2cf190d4f9576649aefe88564809 Signed-off-by:
Reddy Praveen <praveen.reddy@intel.com>
-
- Jan 11, 2017
-
-
Pavlin Radoslavov authored
The feeding_init call is not used anymore - it has been superseded by the newer A2dpCodecs.setCodecAudioConfig() mechanism. Also, moved aptx_init_framing_params() and aptx_hd_init_framing_params() calls to the corresponding encoder_update functions. Test: A2DP streaming to Bluetooth headsets Change-Id: I52f42b4701d04fe2ddb8f115bb9cd57fe38e2b38
-
- Jan 10, 2017
-
-
Pavlin Radoslavov authored
* Add compile-time dependency on the libldacBT_enc module in external/libldac * Use the <ldacBT.h> header and remove local typedefs and defines Also, fix an initialization issue of the LDAC handler inside file a2dp_vendor_ldac_encoder.cc Bug: 30958229 Test: A2DP streaming to LDAC headset Change-Id: I3757230c9901509daab36f2b2018faa05490171d
-
Treehugger Robot authored
-