summaryrefslogtreecommitdiff
path: root/system/device/src
AgeCommit message (Collapse)Author
2025-03-12IOP fix for not reading LE appearance characteristics Himanshu Rawat
Some devices don't respond to GATT Read by UUID requests for LE Appearance characteristics. This causes ATT transaction blockage and disconnection due to ATT transaction timeout. Test: mmm packages/modules/Bluetooth Flag: EXEMPT IOP fix Bug: 402213061 Change-Id: Ib8cc3fbf32ccd0c1291314b65e56abe523acfdd6
2025-02-26Enforce -Wmissing-prototypes Henri Chataing
Bug: 369381361 Test: m com.android.bt Flag: EXEMPT, no logical change Change-Id: I88e569e1e0b6c04716fa48345c1ede816fb405a3
2025-02-03Merge "Acquire lock before validating config" into main Bhakthavatsala Raghavendra
2025-01-31Acquire lock before validating config Bhakthavatsala Raghavendra
Acquire lock before validating config to avoid race conditions where config being reset with device_iot_config_clear and other thread trying to access config instance Bug: 365139919 Flag: Exempt, minor change Test: mmm packages/modules/Bluetooth Change-Id: I37f602648e4336b4a8740ef903b394d9dc940e7b
2025-01-31Revert "Add interop for SetAddressedPlayer reject notification" Étienne Ruffieux (xWF)
This reverts commit 704f84e152e253bbc5efe69d2a8f200b42203572. Reason for revert: Does not fix the issue. Change-Id: Ie7e45b65500d4f0ff3c9c84090a49da6bc875406
2025-01-30Add interop for SetAddressedPlayer reject notification Etienne Ruffieux
Once an AddressedPlayerChange notification has been sent, the target device should reject PLAYBACK_STATUS_CHANGED, TRACK_CHANGED, PLAYBACK_POS_CHANGED and NOW_PLAYING_CONTENT_CHANGED notifications for completion. Some carkits don't handle it properly and will loop in setAddressedPlayer as though it was rejected. we need to have an interop for those. Note: this change is not directly flagged but should be considered as such because this part of the code isn't reachable without a flag enabled. Bug: 393059901 Bug: 379039786 Bug: 381719439 Bug: 352279986 Flag: com.android.bluetooth.flags.set_addressed_player Test: atest BluetoothInstrumentationTests Change-Id: I075abd8d319b53bb8d87d42005ce5547885476f8
2025-01-30Merge "Revert "Add interop for SetAddressedPlayer reject notification"" into ↵ Thomas Girardier
main
2025-01-30Revert "Add interop for SetAddressedPlayer reject notification" Étienne Ruffieux (xWF)
This reverts commit c2c7b9a9c7abbac4236bd8e7887c1640d5129685. Reason for revert: One interop address was wrong Change-Id: Icb18f868164902fa46b2c1f6bb4c0139c09e1a3c
2025-01-30Merge "Only one CSIP earbud connected after pairing" into main Omair Kamil
2025-01-30Add interop for SetAddressedPlayer reject notification Etienne Ruffieux
Once an AddressedPlayerChange notification has been sent, the target device should reject PLAYBACK_STATUS_CHANGED, TRACK_CHANGED, PLAYBACK_POS_CHANGED and NOW_PLAYING_CONTENT_CHANGED notifications for completion. Some carkits don't handle it properly and will loop in setAddressedPlayer as though it was rejected. we need to have an interop for those. Note: this change is not directly flagged but should be considered as such because this part of the code isn't reachable without a flag enabled. Bug: 393059901 Bug: 379039786 Bug: 381719439 Bug: 352279986 Flag: com.android.bluetooth.flags.set_addressed_player Test: atest BluetoothInstrumentationTests Change-Id: If5e5febaa42a19d0312670549e2d2e6348e1aa12
2025-01-28Only one CSIP earbud connected after pairing Lalit
Steps to reproduce: |- 1. Turn on BT 2. DUT pair/connect with remote buds Repro rate: 10/10 times Expected result: Both earbuds paired and connected Observed result: only one earbud getting connected Root cuase: For the second earbud the SIRK verification was not happening successfully as remote not able to handle GATT_READ_BY_TYPE Fix: Allow IOT devices to use GATT_READ_CHAR_VALUE instead of GATT_READ_BY_TYPE Test: m -j bug: 383695743 Flag: EXEMPT interop fix Change-Id: I81dae7b91f4ff691957765759d023c98e82a7024
2025-01-1024Q4: Removal of device_iot_config_logging Jakub Rotkiewicz
Bug: 290844229 Fix: 290844229 Flag: com.android.bluetooth.flags.device_iot_config_logging Test: atest bluetooth_test_gd Change-Id: I02c0b58cbafaaaa4c00973fe8ded997aea5fb420
2025-01-08[bt] Add the Google module in pixel image William Escande
Flag: EXEMPT adding Google module to build is not flagged Test: presubmit Test: m then flash device then check Bluetooth version & functionality Bug: 383863941 Change-Id: If3ec0ce5bd6243721680510e2c7078ad61c2f0a3 Merged-In: If3ec0ce5bd6243721680510e2c7078ad61c2f0a3 (cherry picked from commit 14ba754f98634ab7ce42e020bf1b6e8736fd32c0)
2025-01-03floss: interop JBL Flip 5/6 to disregard HFP Jeremy Wu
JBL Flip 5/6 does not support HFP by specs and so is it in practice, but it advertises the profile and that could cause trouble for Floss media policy. This CL adds an interop to disregard the HFP profile when advertised by these headsets. Bug: 381009230 Tag: #floss Test: mmm packages/modules/Bluetooth Flag: EXEMPT, enum adding and Floss-only logic change Change-Id: I9079b0a877a3070cd1cbe7db9df202495e72f594
2024-11-20system: Migrate from {fmt} to std::format Henri Chataing
Bug: 305066880 Test: m com.android.btservices Flag: EXEMPT, log change Change-Id: If1dbab99250a4f62626206fc9f73d27e71ebab56
2024-11-19osi: Always implement strlcpy as osi_strlcpy Henri Chataing
This function is inconsistently implemented by libc implementations as it is not a standard ISO-C method. Rename the filler implementation and make sure it is always used in place of the BSD version. Bug: 379338269 Test: m com.android.btservices Flag: EXEMPT, no logical change Change-Id: I3c78d6e8ebf55da8137fbcced5aa9e97dbcf0b44
2024-11-08cpplint: fix and enable whitespace/blank_line William Escande
Bug: 364967694 Test: m . Flag: Exempt refactor Change-Id: Ic26c9b0305b76f66a461a4449845a8ca10726c36
2024-10-17Remove os/log.h Henri Chataing
The logging macros within have long been removed, this is just cleanup work to inline the included headers where necessary Bug: 331817295 Test: m com.android.btservices Flag: EXEMPT, no logical change Change-Id: I2147ce4bdcea977b92318b2cb96e7020a8958161
2024-10-14interop: force a MTU exchange for certain keyboards Michael Sun
Some HOGP keyboards expect a MTU exchange flow as part of the initialization to function properly. Trigger a MTU exchange for a device in the interop list. Bug: 332761737 Tag: #floss Test: mmm packages/modules/Bluetooth Test: Manual test on Brya, Brydge keyboard working Flag: EXEMPT, interop change and apply only to one and currently non-functioning device Change-Id: I2efb78cae6072fb8fdd74a87628fb71804869164
2024-10-14interop: extended truncated report map for specific device Michael Sun
The HID specification allows report maps to exceed 512 bytes. However, the Bluetooth specification requires all GATT attributes to be 512 bytes or less. This creates an interoperability issue when a device manufacturer implements a HID report map as a single GATT characteristic. This change handles this edge case by extending the report map after receiving the initial 512 bytes. This ensures compatibility with both HID and Bluetooth standards. As this workaround is currently implemented for one specific device, the extra bytes of the report map exist as static const arrays; if more devices need such workarounds, it is suggested to store the report map in a separate file which can be loaded from the file system. Bug: 332761737 Tag: #floss Test: mmm packages/modules/Bluetooth Test: Manual test on Brya, Brydge keyboard working Flag: EXEMPT, interop change and apply only to one and currently non-functioning device Change-Id: If9eb2e5e2828d0dea17f486207421525ffcccffc
2024-09-25Enforce -Wmissing-prototypes Henri Chataing
This lint check will raise an error if a function is implemented without a corresponding prototype declaration included in scope. The main use case will be to ensure mock functions do not become out of sync causing the original function to be linked instead. Because of the large amount of errors, this change suppresses errors in all locations, to be cleaned up gradually. Bug: 369381361 Test: m com.android.btservices Flag: EXEMPT, lint fixes Change-Id: I888b5e284e237d8a6e2864bdde55c0a7fc0c348d
2024-08-15Only use DSP codec when offloading Yun-Hao Chung
For the devices only use software path, the esco parameters should not be changed to the DSP codec. Bug: 358375314 Test: mmm packages/modules/Bluetooth Test: manually test swb Change-Id: Ief666dd7a2a965bd4034e6a206c6ec6f46875993
2024-07-07Format: apply clang rules William Escande
Restore SpacesBeforeTrailingComments to 2 to match current style Then run clang-format -i **/**.{c,h,cc,cpp,hpp} Then fix a bunch of typo (reported by gerrit) Then fix unnecessary multiline string Then fix whitespace for disabled clang format (reported by cpplint) This is no-op Bug: 311772251 Test: mmm packages/modules/Bluetooth Flag: Exempt Format only Change-Id: If135447803a40a2a07d4630ba2195e08ef8d250c
2024-06-26Merge "HOGP connection with some HOGP devices were slowed down" into main Jakub Pawłowski
2024-06-18Remove use_dsp_codec_when_controller_does_not_support flag Yuyang Huang
This flag was added in 24Q2 to allow the DSP to be used for LC3 when the BT controller does not support it. This is now the default behavior, so the flag is no longer needed. Bug: 347316578 Change-Id: I581d217fa07472152cded36f160b964168735328 Flag: exempt, nextfood flag removal change Test: atest net_test_bta
2024-06-12HOGP connection with some HOGP devices were slowed down Ruina Liu
Updating connection parameter with non-zero latency before finishing HOGP connection causes some HOGP devices reponse slowly during profile connection. To avoid slowing down the connection, use interop list to set zero latency for those devices. They can request proper latency later based on its power state. Bug: 346692549 Test: m com.android.btservices Test pairing and reconnecting HOGP devices(Mad mouse) and confirm the connection won't be slow down. Change-Id: Ida03591bc4fa5137bd4b6960b4a92cf4f8ea3b15
2024-06-06Floss: Remove TARGET_FLOSS in esco_parameters Yun-Hao Chung
Replacing TARGET_FLOSS with aflag. The esco_parameters change was used to pass HFP 1.9 Qualification, but since Android always uses HFP offload path, we made it Floss only. Added behind aflag in this patch. Bug: 345365532 Tag: #floss Test: mmm packages/modules/Bluetooth Flag: EXEMPT, Floss-only changes Change-Id: I72fa6fe080f4ef0067806b00ca4606487de94dfb
2024-05-21Fix some logs across the stack William Escande
Bug: 305066880 Flag: Exempt, trivial log change Test: None Change-Id: Icd642d73648c0a5401d910fda31a82ed21b42ecc
2024-05-08Merge "Interop: Remove unused BROWSE_PLAYER_ALLOW_LIST" into main William Escande
2024-05-07Interop: Remove unused BROWSE_PLAYER_ALLOW_LIST William Escande
Bug: 337054479 Test: m . Flag: Exempt, dead code removal Change-Id: I957d5d98455df494693f542f0b5e397743fdc7b9
2024-05-07IOT Device Info: Replace legacy with trunk stable flag Jakub Rotkiewicz
Bug: 261319328 Bug: 290844229 Bug: 261319328 Flag: com.android.bluetooth.flags.device_iot_config_logging Test: atest bluetooth_test_gd Change-Id: I80b2e09529da260183da5e20f0a166e35be03173
2024-04-25flags: Remove android_bluetooth_flags.h wrapper David Duarte
Bug: 307006275 Test: m com.android.btservices Test: ./floss/build/build-in-container.py Flag: EXEMPT no-op Change-Id: Ia7c600f4ce1aa698b1a6c2739e7f6302e1e5f62f
2024-04-22system/device: Remove UNUSED_ATTR Myles Watson
Comment out unused parameters to have the compiler check that they're unused. Bug: 336310650 Test: mma -j32 Flag: EXEMPT, mechanical refactor Change-Id: Id72f34af9f5a2cac076717e519c094d8ac2bf1de
2024-04-19Merge "system: Remove include directives for <stdio.h>" into main Henri Chataing
2024-04-19system: Remove include directives for <stdio.h> Henri Chataing
Test: m com.android.btservices Bug: 305066880 Flag: EXEMPT, mechanical refactor Change-Id: I44e5106562fbbeb70a49c5640626e123ee7b568e
2024-04-18system: Remove most ADDRESS_TO_LOGGABLE_(CSTR|STR) Henri Chataing
The added formatters for address types have all the same behavior. ADDRESS_TO_LOGGABLE_STR still occurs in BTM_History, dumpsys, log::assert_that calls Test: m com.android.btservices Bug: 305066880 Flag: EXEMPT, mechanical refactor Change-Id: I950f76bd2f1d000638752759a3f08ba0be6f014c
2024-04-16Floss: Restrict allowed packet types of SCO codec Yun-Hao Chung
Per HFP 1.9 spec 6.7.3 and 6.7.4, each codec has its own packet type. After this CL, only the packet types defined in the spec would be sent in the setup. Bug: 324157546 Bug: 332650199 Test: m -j Tag: #floss Change-Id: Ie1a53fb743ef9bf7fbfaeff1b18c6f419aa95ce2
2024-04-16Floss: Allow fallback to CVSD S1 from CVSD S3 or S4 Yun-Hao Chung
According to HFP 1.9 spec 6.7.1.2, AG should retry S1 as a 'safe setting' when the previous setup was rejected. This patch is needed for the below tests HFP/AG/ACC/BV-22-C HFP/AG/ACC/BV-23-C Bug: 324157546 Bug: 332650199 Test: Run above qualification tests Test: m -j Tag: #floss Change-Id: If57eb871cd08616807a346fab0a51cb910425dc5
2024-04-10A2DP: Skip A2DP SDP for IOT devices yamei du
Some A2DP sink devices don't respond SDP request during A2DP reconnection. Add an IOT device list for these devices to avoid A2DP reconnection issue Test: m com.android.btservices Test: Manual. Trigger A2DP reconnection from peer device. Change-Id: Id42f41dd008571fae771564e89f5c4f1c5cf4782
2024-04-08Remove legacy header system/include/check.h Henri Chataing
Used to include selectively <base/check.h> or <base/logging.h> depending on the version of libchrome Bug: 331817295 Test: m com.android.btservices Flag: EXEMPT, dead code removal Change-Id: I55c747973f1e354745cbb54f6c605ba6c07d9471
2024-04-05Remove includes of <base/logging.h> Henri Chataing
Convert remaining DLOG, LOG, CHECK_xx occurences in the same pass Test: m com.android.btservices Bug: 305066880 Flag: EXEMPT, mechanical refactor Change-Id: I7ae3e14c84b6ee5dc2ac0babc652c699c7424418
2024-04-05system: Migrate CHECK to log::assert_that Henri Chataing
Test: m com.android.btservices Bug: 305066880 Flag: EXEMPT, mechanical refactor Change-Id: I40e01004b3cf81037ed2926397aa18904d7446fe
2024-03-29[ALPS07916456] Fix coverity error Henri Chataing
This issue is detected by Checker: NO_EFFECT Type: Enum compared against 0 Checker Wiki: https://swwiki.mediatek.inc/display/SCA/NO_EFFECT Defect is in: File: vendor/mediatek/proprietary/packages/modules/Bluetooth/system/device/src/esco_parameters.cc Fucntion and lines: esco_parameters_for_codec(esco_codec_t, bool):215 Bug: 328847127 Test: m com.android.btservices Flag: EXEMPT, no logical change Change-Id: I53325e00a1c6e77b50ee6902139a3ecd728be5ce
2024-03-21system/device: Migrate to libbluetooth_log Henri Chataing
Test: m com.android.btservices Bug: 305066880 Flag: EXEMPT, mechanical refactor Change-Id: I134695be10eb0f8307753481027441e47bb0a803
2024-03-19GD Controller: replace is_ready Myles Watson
is_ready can be replaced by GetController, since the controller is ready if the shim returns it. Bug: 321273521 Test: atest bluetooth_test_gd_unit Flag: EXEMPT, no logical change Change-Id: I8a2b7c700867674b9298e1433438d6f8941c38de
2024-03-14interop: allow hid host to connect to not-first HOG service Michael Sun
Due to the limitations of the current HID host implementation, it assumes that the HID peripheral has only one HOG service, or if there are multiple HOG services, the first one is always active. To address this issue temporarily, an interop quirk has been introduced to allow the HID host to connect to a non-first HID service for certain devices. However, for a long-term solution, the HID stack needs to be refactored to handle multiple HID services simultaneously. Bug: 286413526 Bug: 328129633 Tag: #floss Test: mmm packages/modules/Bluetooth Test: Manual test on Brya, Logitech CASA working Flag: EXEMPT, apply only to one and not-functioning device Change-Id: I339908bc08bf33a977cf80b0f72ae63db1a61986
2024-03-14Revert "interop: allow hid host to connect to not-first HOG service" Michael Sun
This reverts commit c8c845228643298fbbc19f0e1756be98a24fda3b. Reason for revert: Logic error Change-Id: I75f0791dbb2b6920c9b906508dd6b12d82141c95
2024-03-14interop: allow hid host to connect to not-first HOG service Michael Sun
Due to the limitations of the current HID host implementation, it assumes that the HID peripheral has only one HOG service, or if there are multiple HOG services, the first one is always active. To address this issue temporarily, an interop quirk has been introduced to allow the HID host to connect to a non-first HID service for certain devices. However, for a long-term solution, the HID stack needs to be refactored to handle multiple HID services simultaneously. Bug: 286413526 Bug: 328129633 Tag: #floss Test: mmm packages/modules/Bluetooth Test: Manual test on Brya, Logitech CASA working Flag: EXEMPT, apply only to one and not-functioning device Change-Id: I0733f1597d9058c992e46b99c6a31748714d8dfa
2024-02-09Inline osi/include/log.h David Duarte
Bug: 279512287 Test: mmm packages/modules/Bluetooth Flag: Exempt, mechanical refactor Change-Id: I962860d1e39a0b1b32bfa2816c12a79b557b8a62
2024-01-29HCI: Make a pure virtual controller interface Myles Watson
Bug: 301661850 Test: mma -j32 Flag: EXEMPT, build change Change-Id: I21075c2ceeb3c468a1c6e5c7aeac8d03054582e3