- 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
-
- Jan 09, 2017
-
-
Jakub Pawlowski authored
Bug: 30622771 Test: sl4a UniqueFilteringTest BleOpportunisticScanTest Change-Id: I0e6ca8ed3d7d98057277a5187e684246f410d978
-
Jakub Pawlowski authored
Bug: 30622771 Test: sl4a FilteringTest Change-Id: Ib4edfa40038ca59c37ae1dfc763f0cac563177d7
-
Jakub Pawlowski authored
Bug: 30622771 Test: sl4a FilteringTest Change-Id: I93b4f1275b9437a20cf1429d184dbefa79451986
-
Jakub Pawlowski authored
Bug: 30622771 Test: sl4a FilteringTest Change-Id: I58f3c335e84b4d7ee578c321109125084826efa0
-
Jakub Pawlowski authored
Calls to BleScannerInterface are already made using jni thread. Also all this calls do is scheduling to BTA thread, so remove unnecessary call to do_in_jni_thread Bug: 30622771 Test: sl4a FilteringTest Change-Id: I2c799dde720f9bc694fecacd6d3959b96c1b9ba8
-
Jakub Pawlowski authored
This patch use callbacks, instead of custom event queue when scheduling LE filter VSC. Bug: 30622771 Test: sl4a FilteringTest Change-Id: I64ac4392883c647d1e500c257c31a8d3e740a0a8
-
Jakub Pawlowski authored
Test: start connectable advertising using bluetoothtbd Change-Id: Ie7e42570748d43a27bc7691378aee85ab1565a05
-
Jakub Pawlowski authored
Test: start advertising using bluetooth-cli Change-Id: Iead31c5e73a70850c6a209b6bbbeaeb792202608
-
Jack He authored
* libpower dependency was introduced in change I1e8d49b087eff6301373e1e90e8d868f15847c34 * It is never used in any part of the system/bt stack and therefore should be removed from the shared library dependency list Bug: 34079981 Test: code compilation, no user visible effect Change-Id: Ic8e3ad0c369839fb9ced446695c72fdf0ffad1ca
-
Ivan Podogov authored
Currently the upper java layers have full support for all four connection states, yet the lower stack only reports about "connected" and "disconnected". This patch adds sending "connecting" and "disconnecting" messages when bta_hd_connect_act and bta_hd_disconnect_act finish successfully. Test: build, run, logcat Change-Id: I00f9f414daa3854198ff9eee19e9c98a2e18f603
-
Jakub Pawlowski authored
Name must be appended at end, not beginning. Test: run bt-example-hr-server --advertise Change-Id: I70909e0bfc94521c396908d0dcb78cf4439a7e63
-
Jakub Pawlowski authored
Test: build with ninja and mma Change-Id: I31688da8a554ed71b580c30a0e4c000ea4903d70
-
Jakub Pawlowski authored
Test: build with ninja Change-Id: I4993dae7f76479da9bfad70aae88cc51fd7127d5
-
- Jan 06, 2017
-
-
Pavlin Radoslavov authored
* The names of the expected aptX and aptX-HD shared libraries are updated to reflect better their purpose: - aptX: libaptX.so -> libaptX_encoder.so - aptX-HD: libaptXHD.so -> libaptXHD_encoder.so Also: * Add a missing upcall with the codec info the first time the codec is selected internally * Minor cleanup Bug: 30958229 Test: A2DP streaming to aptX/aptX-HD headsets Change-Id: Ib2bfc83823190fb7a057353eb47cd71c5b4d5a3a
-
- Jan 05, 2017
-
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Pavlin Radoslavov authored
The codec can be used if the encoding shared library is installed on the device: libldacBT_enc.so Also, increased the maximum number of SEPs AVDT_NUM_SEPS from 3 to 6 to accomodate Sink devices that support more than 3 codecs. Test: A2DP streaming to LDAC headsets Bug: 30958229 Change-Id: I114c3e6be2ebe1ac8aece62a3146637d37cd938e
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Jack He authored
* Fixed A2DP duration counting. It is now counting from music play start to music play end. * Start logging a2dp connection as Bluetooth sessions. Currently, only A2DP connections are logged. Thus the bluetooth session length will be the total connection length and the length within A2DP session message will be the audio connection length. * Add a audio_duration_millis field in A2DPSession to record audio duration * Add bonded memory constraint for metrics entries * Use a builder mechanism to only build metrics upon dumping * Refactor metrics module into BluetoothMetricsLogger class * Created unit test for BluetoothMetricsLogger Bug: 33694310 Test: Code compilation, Unit test, BtFunhausMetricsTest Change-Id: Iea2a997c4ea074687a5d50860e9229f0e1b82659
-
Jack He authored
* LeakyBondedQueue is a fixed size queue that leaks oldest item when reaching its capacity. This is useful in creating memory bonded data structure where freshness is more important than full coverage. * The queue is protected by a simple mutex and is thread-safe, although improvements could be made to lock enqueue and dequeue separately, it is not implemented at this moment due to lack of demand * The queue uses unique_ptr to automatically free its content when it is destructed * Add several tests to verify its API and memory management * This data structure will be firstly used in the metrics module Bug: 33781460 Test: Code compilation, unit tests Change-Id: I51cb73666ac58e4792d9cba0d6f16dad30a0ff39
-
Pavlin Radoslavov authored
Each of the codecs can be used if the corresponding encoding shared library is installed on the device: - aptX: libaptX.so - aptX-HD: libaptXHD.so Test: A2DP streaming to aptX and aptX-HD headsets Bug: 30958229 Change-Id: I1ca36da653721576f5a5b6bdac186b9ea2790c85
-
- Jan 04, 2017
-
-
Ruchi Kandoi authored
Script erroronously modifies UINT8_TO_BE_STREAM() to uint8_t_TO_BE_STREAM(). Modidy the script to prevent that. Test: Manual; Run the script on system/nfc Change-Id: I9e130b8eb79e400282233fad7da206b4bb1301af Signed-off-by:
Ruchi Kandoi <kandoiruchi@google.com>
-
liuchao authored
This fixes an inappropriate sscanf return value judgment that res check here is not needed while res2 is the one that need to be checked Test: mm -j 8 Change-Id: I3e332286c9434d5b9d01421f5f421039f84ad6c7
-
Ivan Podogov authored
By default, enabling the HID Device service is only possible during disabling the HID Host service. If, on the other hand, the HID Host service was never initialized, then a request to enable the HID Device service should just be executed immediately. Test: manual, on a device without the HID Host profile. Change-Id: I2ab4b8aec413b66d57eb322d38660f1b4c48ba32
-
Treehugger Robot authored
-
Pavlin Radoslavov authored
* Codec config internal abstraction: - Add new classes A2dpCodecConfig and A2dpCodecs that (will) encapsulate all codec-related APIs - Add unit tests for the above two classes - Add method A2dpCodecConfig.buildCodecConfig(), and use it when creating the codec configuration instead of A2DP_InitSource2SinkCodec(). The new method can build the codec config by taking into account optional user codec-related configuration preferences. - Use the A2DP codec config API from the hardware/libhardware bt_av.h API - Replace enum tA2DP_CODEC_SEP_INDEX with btav_a2dp_codec_index_t from the bt_av.h API - Move codec-specific functions from stack/include/a2dp_api.h and stack/a2dp/a2dp_api.cc to stack/include/a2dp_codec_api.h and stack/a2dp/a2dp_codec_config.cc - Create a new base class A2dpCodecConfig() to hold some of the codec-related state, and implement the corresponding A2dpCodecConfigSbc and A2dpCodecConfigSbcSink derived classes. - Move A2DP spec-related constants from stack/include/a2dp_api.h to stack/include/a2dp_constants.h - Move A2DP-related error codes from stack/include/a2dp_api.h to stack/include/a2dp_error_codes.h - Move A2DP SBC spec-related constants from stack/include/a2dp_sbc.h to stack/include/a2dp_sbc_constants.h * Implement the backend mechanism for handling user (re)configuration of A2DP Source codecs as requested via the JNI API calls. Also, any codec changes are reported back via JNI API callbacks. The current audio parameter selection (sample rate, bits per sample, channel mode - mono/stereo) is as follows: - If the user selected parameters are acceptable (based on local codec capability and the remote Sink capability), those parameters are used. - Else if the Audio HAL's requested parameters are acceptable, those are used. - Else if the default settings are acceptable, those are used. - Else use the best match among the local and the remote device's capabilities. * Update the mechanism for handling OTA configuration requests from the remote Sink device. - The OTA prefered codec configuration is ignored if the current codec configuration contains explicit user configuration, or if the codec configuration for the same codec contains explicit user configuration. * Refactor the Audio HAL <-> Bluetooth audio parameter negotiation mechanism: The new mechanism gives some flexibility to the Media Framework to choose the appropriate audio format (sample rate, bits per sample, and channel mode - mono/stereo), and at the same time allows the Bluetooth stack to double-check / overwrite the choice. - out_get_parameters() on the Audio HAL side asks the Bluetooth stack for all currently supported formats (for the current codec), and returns them to the Media Framework: sample rate, bits per sample, and channel mode (mono/stereo). - The first time adev_open_output_stream() is called on the Audio HAL, it asks the Bluetooth stack about the audio format currently selected by the Bluetooth stack (based on codec negotiation with the Sink device, and User Configuration). - The second time adev_open_output_stream() is called on the Audio HAL, its "config" will eventually contain the audio format selected internally by the Media Framework. That audio format is sent to the Bluetooth stack. If that format is acceptable to the Bluetooth stack, the Bluetooth stack will reconfigure itself internally, and will respond back with those values. Otherwise, it will respond back with the values that should be used instead. * Misc other fixes and refactoring: - Fix the BTA handling of A2DP codec reconfiguration - Fix a bug in the implementation of A2DP_BitsSet(), and add the approriate unit test. Also, fix the code that was using this function incorrectly. - The SBC encoder is compiled as a separate library - Replace leftover usage of "false" with "FALSE" for macros, and vice-versa for variable values. Test: A2DP streaming to headsets, TestPlans/71390 Bug: 30958229 Change-Id: I440b6126e2250e33b0075f9789dd93154c007c2b
-
- Jan 03, 2017
-
-
Jakub Pawlowski authored
BTA closure doesn't keep the HDR messages any more, test have keep track of HDR pointers for itself. Bug: 33947176 Test: test/run_unit_tests.sh net_test_bta Change-Id: I32994f248dc2e082bf8bed426a32acf677c58ed5
-
Ivan Podogov authored
With this change, when the app requests a connection to a specific device, it is always "plugged" first. Unplugging the previous device is left for the app to do. Test: make Change-Id: I2e27c12e2ee96d0c311615a3853d8c430f3b2c31
-
- Dec 30, 2016
-
-
Jakub Pawlowski authored
BTA layer for scanner is very complicated. This patch simplifies it: * get rid of type redeclarations for BTM types * get rid of trivial *_act methods and call BTM API directly where possible Bug: 30622771 Test: slra FilterTest Change-Id: I3899b30074b2abc4a3945c5cc14f1bb40a504876
-
Jakub Pawlowski authored
-
- Dec 29, 2016
-
-
Jakub Pawlowski authored
Attach posted_task to the HDR message, instead of using a queue. Bug: 33947176 Test: re-run sl4a FilteringTest 3 times with no flakiness Change-Id: If0b69e82d11eeae52ac8e591bebff634073251f1
-
Hemant Gupta authored
This patch adds support for HID Device role in bluedroid stack allowing DUT to be used as Keyboard or Mouse. Bug: 33011576 Change-Id: I45b581a54f6c7bbc1f25226715a7ea23e34255c0
-
Jakub Pawlowski authored
This patch improves btu_hcif_send_cmd_with_cb, which will accept base::Callback instead of function pointer as argument. It will also carry information about where was packet send from, which can be displayed when command status is received, greatly improving logs. The improved method is also used for handling VSC advertising. Bug: 30622771 Test: sl4a ConcurrentBleAdvertiserTest Change-Id: I55c3e32f9231c00bfa85f971265809d6f1fecdfb
-
- Dec 28, 2016
-
-
Jakub Pawlowski authored
When BLE_VND_INCLUDED is not set, advertising was not properly initialized, which resulted in stack crashes. This patch makes sure that LE advertising is always properly initialized Bug: 33168939 Test: enable LE advertising with BLE_VND_INCLUDED set to false Change-Id: I5fa0b3da39da99e750e1f8b6f0452a628094bfc4
-
Jakub Pawlowski authored
p_cond_param->srvc_uuid is of type tBTA_DM_BLE_PF_UUID_COND Bug: 33910711 Test: sl4a FilteringTest Change-Id: I6b30e1e441f8256d8c8dbf593f746a3d7810eda6
-
- Dec 27, 2016
-
-
Andre Eisenbach authored
Using the pointer to the beginning of a union in a member of the union, which will then be over-written, is a bad idea(TM). Bug: 33910711 Test: manual Change-Id: I0b979e493688bf8c02119a2ef6707d6c8e730dcb
-