- Jan 04, 2017
-
-
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
-
- Dec 21, 2016
-
-
Myles Watson authored
Test: mma -j32 Change-Id: Ia1aae4cd5618816b529449844b3a0724e4eb3200
-
- Dec 20, 2016
-
-
Jakub Pawlowski authored
Test: compilation test Change-Id: I0834431378b015eafbb26c48af342af4a650972b
-
Jakub Pawlowski authored
BTM layer checks if LE is avaliable, and if proper VSC are avaliable, no need to do additional checks in BTA. Test: sl4a FilteringTest Bug: 30622771 Change-Id: I594b152d18f08a46b65930547a991dbb6f188c4b
-
Jakub Pawlowski authored
All calls to filter related code is guarded by check if HCI VSC are available. There is no need to keep double check. Test: sl4a FilteringTest Bug: 30622771 Change-Id: Ib4c53593d536a2985926ef2b725bc69050bdb035
-
Treehugger Robot authored
-
Jakub Pawlowski authored
Get rid of BTA state machine states for BLE scanning. Test: sl4a FilteringTest Bug: 30622771 Change-Id: I8a879604f413c9980cf64983d8ef6b9a94669295
-
- Dec 19, 2016
-
-
Jakub Pawlowski authored
Bug: 30622771 Test: sl4a ConcurrentBleAdvertisingTest Change-Id: I6185e6926e7363824aa573c7d65f7ab66f954e52
-
Jakub Pawlowski authored
Bug: 30622771 Test: sl4a ConcurrentBleAdvertisingTest Change-Id: Id85504922c21f15bc36ac8bb5e4ab962ee356e3d
-
Jakub Pawlowski authored
When LE Advertising Extension is available on the controller we must use both extended advertising and scanning commands. Otherwise, according to the spec, controller will return error. This patch makes sure that proper avaliable HCI calls are made. Bug: 30622771 Test: sl4a ConcurrentBleAdvertisingTest as scanner Change-Id: I6906c381f0f758bd24b592390a4ef46e7fae36ed
-
Jakub Pawlowski authored
This patch updates BleAdvertiserHciInterface to be on pair with Bluetooth 5.0 LE Advertising Extension feature. Bug: 30622771 Test: net_test_stack_multi_adv native test Change-Id: Ie0ec8c7f8ed0d7a874e392123b3486c767121140
-
Jakub Pawlowski authored
Make BleAdvertiserHciExtendedImpl report when advertising set is disabled because of new connection. Bug: 30622771 Test: sl4a ConcurrentBleAdvertisingTest Change-Id: Ic13a31fe4bb92f121a29d540274d13893775a450
-
Jakub Pawlowski authored
This patch implements current BleAdvertiserHciInterface using LE Advertising extension HCI commands. Bug: 30622771 Test: sl4a ConcurrentBleAdvertisingTest Change-Id: Icaaf24d6d02d8a887b3bb57d5b858b929f11c413
-
Jakub Pawlowski authored
Bug: 30622771 Test: sl4a BleScanTest Change-Id: I55e6c201849a057995c0c6fda1c52af826749922
-
Sanket Agarwal authored
-- Also fix a bug introduced by change of data types in AVRCP Open state and AVRCP Browse Open state. Due to change in data type and field mismatch the status value was being read incorrectly Bug: b/33750053 Test: Manual test of browse connect Test: PTS test for UUIDs changed Change-Id: Ifecf9480a3fabeee8ad8302ebb7cd48f5322dea7
-
- Dec 18, 2016
-
-
Jack He authored
* btif uses AudioTrack from frameworks/av which is under libaudioclient * Current dependency on libmedia is incorrect as it is an indirect dependency to libaudioclient Bug: 33718447 Test: code compilation, no user visible effect Change-Id: I7c44095cd282fabf8595015910670193077c1514
-
- Dec 17, 2016
-
-
Treehugger Robot authored
-
- Dec 16, 2016
-
-
Jakub Pawlowski authored
This patch converts btgatt_scanner_interface_t struct into BleScannerInterface class. It also refactors three most important methods from this interface: RegisterAdvertiser, Scan, and Unregister. Rest of this interface will be updated in following patches. Bug: 30622771 Test: sl4a BleScanApiTest Change-Id: Ie35356f6c3c4f5488514ef55a48a32c93fb21b83
-
Sanket Agarwal authored
For incoming connections we are not storing the handles in BTIF which implies that BTIF ignores the message (and so does jni -> java). This is fixed by sending the handle as part of BTA message on incoming accept. Other bugs include connection from remote (incoming) and disconnecting from host. They also depended on not storing the handle properly in first place. Bug: b/33555377 Bug: b/30984220 Test: Manual testing of incoming connections Change-Id: I84950d42aba2d2c975ea86cc8217fd0129cc90e9
-
Jack He authored
* Add unit test for confirm (c1), p1, and p2 * Refactor the code to reduce number of methods * Refactor c1's code to make it testable Bug: 32413756 Test: Code compilation, Unit Test, PTS SM Tests Change-Id: I5cc876b7dd2b21a0780ac9a5236420223df6cddb
-
Myles Watson authored
Simplify the code to fix a typo. F_SETFD should have been F_SETFL. Test: run unit tests out/host/linux-x86/nativetest/test-vendor_test_host/test-vendor_test_host \ --gtest_filter=AsyncManagerSocketTest.* Change-Id: I215381d6e130428acae7d73d80fefc97cbf64651
-
Treehugger Robot authored
-
Myles Watson authored
Test: run the unit tests out/host/linux-x86/nativetest/test-vendor_test_host/test-vendor_test_host \ --gtest_filter=AsyncManagerSocketTest.* Change-Id: I8c5e05c5506a067a6148d54dc23bbb931ad612e7
-
Jack He authored
* Replace assert with CHECK * Remove all NDEBUG definitions * Remove hacks for BT_LIBCHROME_NDEBUG * Removed some removed directories from Makefile such as hcis, brcm, rpc Coccinelle-assisted: @@ @@ - #include "base/logging.h" + #include <base/logging.h> @ assert_included @ @@ @ base_logging_included @ @@ @ depends on (assert_included && !(base_logging_included)) @ @@ - #include <assert.h> + #include <base/logging.h> @ depends on (assert_included && base_logging_included) @ @@ - #include <assert.h> @@ expression E; @@ - assert(E); + CHECK(E); And a bash script: for file in $(find . -name "*.cc"); do spatch --sp-file replace_assert_with_CHECK.cocci --in-place $file done The following files are maually edited: btif/src/btif_config.cc btif/src/btif_avrcp_audio_track.cc btif/src/btif_gatt_client.cc osi/src/data_dispatcher.cc osi/src/reactor.cc osi/src/thread.cc osi/src/fixed_queue.cc osi/src/list.cc osi/src/allocation_tracker.cc osi/src/alarm.cc osi/test/wakelock_test.cc Bug: 31781465 Test: Code compilation, Unit Tests, BtStressTest, BtFunhausMetricsTest Change-Id: I21dc10a45be31665e41441b75b0515ed87523988
-
Jakub Pawlowski authored
This patch replace BTA state machine state associated with registration of new application, together with BTA_GATTC_API_REG_EVT, and tBTA_GATTC_API_REG. Instead, it uses closure to post registration task, and callback for registration event. Bug: 30622771 Test: sl4a ConcurrentBleAdvertiserTest GattConnectTest Change-Id: I62d68485170ef5472237d62b285353f2c9bc8250
-
- Dec 15, 2016
-
-
Jack He authored
* This function used to take (const uint8_t*) as the second parameter and it causes all its calls to cast a (const char*) to this type * This patch changes it to (const char*) so no cast needed Coccinelle-assisted: @ rule1 @ type T; expression A, B, C; @@ smp_debug_print_nbyte_little_endian(A, - (T) B, C); and for file in $(find . -name "*.cc"); do spatch --sp-file refactor_smp_print_func.cocci --in-place $file done Bug: 33663033 Test: code compilation, no user visible effect Change-Id: Ibeed0b414514acc4a8e94e47e99117bdb3e454ff
-
Ajay Panicker authored
Test: Code still compiles Change-Id: I4a86cd3b515ad3da8f852f024952e3f7a85d1071
-
- Dec 14, 2016
-
-
Jakub Pawlowski authored
Bug: 30622771 Test: compilation test Change-Id: I0e502fb9b5b2cc3ccad0aa142a0ec9fedea7d1df
-