Commit Graph

579 Commits

Author SHA1 Message Date
xiaoshun.xu
4e85c09959 Fix vts sco test fail for usb interface
[Description]
If bt controller device is usb interface,
sco loopback single pkt and bandwidth test can not pass
because pkt size is limited accroding to core spec

[Root Cause]
USB sco packet size is limited in spec

[Solution]
If is bt usb chip, continuous receive sco packets
  from controller until size is enough

[Test Report]
Test Pass

Bug: 286355871
Change-Id: Idb150d8a72149f7e1dfaccfd7bc82a91710da59c
2023-07-18 09:34:08 +08:00
Myles Watson
44628f38d2 BluetoothAudio: Statically link HAL dependencies
Bug: 290666670
Bug: 289857524
Bug: 284091286
Bug: 289489060
Test: mma -j32
Change-Id: I2b3c32b133e208ec2cfb1b244ccb24ad249f22df
2023-07-11 16:08:27 -07:00
Bao Do
00dede017f Add a config with test skipping for SDK < 33
Test: atest VtsHalBluetoothAudioTargetTest
Bug: 288598199
Change-Id: I563c8d50b186f2da2cf077dc3631808f8c2a9eee
2023-07-10 07:43:09 +00:00
Treehugger Robot
e959d0923d Merge "Revert "Fix VTS Fuzz issue"" 2023-07-03 12:43:04 +00:00
Guillaume Bailey
a2b4a18ab7 Revert "Fix VTS Fuzz issue"
This reverts commit 1adfae9364.

Reason for revert: Causes Sabrina/Boreal bt stacks to timeout on startup
Bug: 247053367

Change-Id: Ibef97f054510c826920bb30725fed168c755cc14
2023-07-03 12:10:36 +00:00
yanggang.yang
6ebe251322 Fix bluetooth AIDL restart fail when open HCI Fail
[Description]
If aidl open HCI fail at the first time, the aidl state
can not change to enable for the next time to initialize.

[Root Cause]
Bluetooth AIDL State is always equal to INITIALIZING after
open hci fail at the first time.

[Solution]
When open HCI fail at the first time, initialize the mstate to ready

Bug: 285517442
Test: pass

Change-Id: I19756d6602ba931242d0f95942db55c505a210bb
2023-06-28 09:13:57 +00:00
Edward Liaw
24a8a39219 Merge "TEST_MAPPING: enable vts hal tests in kernel-presubmit" 2023-06-01 20:34:33 +00:00
Edward Liaw
24696b3e32 TEST_MAPPING: enable vts hal tests in kernel-presubmit
Enable the following tests:
VtsHalBluetoothAudioTargetTest
VtsHalGraphicsComposerV2_4TargetTest

Bug: 284307085
Bug: 258819618
Test: atest :kernel-presubmit
Change-Id: I8667eaee120777a776339481f72558566e6c94b3
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-06-01 16:08:42 +00:00
Jooyung Han
16d5af6755 Set root elements for xsd_config modules
This reduces the code size by not generating unnecessary code for
non-root elements.

Bug: 283700992
Test: m
Change-Id: I23bd5c2a0ccc40fded3ca08155ead5f4680c2ed9
2023-05-22 16:43:12 +09:00
Yichun Li
3ac998fa8c Merge "Revert "Remove unused hardware/bluetooth.h include"" 2023-05-19 00:45:21 +00:00
Yichun Li
6d9773daf4 Revert "Remove unused hardware/bluetooth.h include"
Revert submission 2517798-remove_bluetooth_h

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_tm-qpr-dev-plus-aosp&target=aosp_bramble-userdebug&lkgb=10164200&lkbb=10164726&fkbb=10164208

Reverted changes: /q/submissionid:2517798-remove_bluetooth_h

Bug: 10164208
Change-Id: I52877f236db874e95228707d533698e3c12ecde1
2023-05-19 00:33:14 +00:00
David Duarte
9d2cdddb88 Merge "Remove unused hardware/bluetooth.h include" 2023-05-18 21:50:50 +00:00
Myles Watson
970886d163 Bluetooth HIDL 1.0: Log BDADDR source
Bug: 283116345
Test: atest VtsHalBluetoothV1_0TargetTest
Change-Id: I2099dac406035a5f4698806a2d3b016e5dc1a913
2023-05-18 10:32:39 -07:00
David Duarte
26e456b792 Remove unused hardware/bluetooth.h include
Change-Id: I1877f6266cd105bb830a37ff4ac964f240dfa163
2023-05-15 20:30:54 +00:00
Treehugger Robot
5e0277ff94 VTS: Reduce TV's advertising set requirement to 10
Bug: 281798597
Test: atest VtsHalBluetoothVTargetTest
Change-Id: Ia3be5a1c7a7acc5270baef74b295291c32851987
2023-05-11 23:51:26 -07:00
Treehugger Robot
6ca63b0e20 Merge changes If33bee4e,I0c14c062
* changes:
  Improve AudioProvider logging
  Fix deathRecipient of BluetoothAudioProvider
2023-05-12 02:17:13 +00:00
William Escande
fb6dd74b2c Improve AudioProvider logging
Bug: 245009140
Test: looked at some beautiful log when bluetooth is killed (RIP)
Change-Id: If33bee4e875812ce3710d41014cae8bd54d840f2
2023-05-12 00:46:05 +00:00
William Escande
f3faab081a Fix deathRecipient of BluetoothAudioProvider
The "provider" is managed with a shared_ptr but we do not hold it and
instead are giving the raw inner pointer as binderDiedCallbackAidl.
This can randomly generate crash as the provider may be freed outside of
this code.

Replacing the provider with a context that we can manually allocate and
deallocate.
Setup AIBinder_DeathRecipient_setOnUnlinked to clean the data allocated

Bug: 245009140
Test: m android.hardware.bluetooth.audio-impl and start / stop session +
      manually kill bluetooth process during audio play
Change-Id: I0c14c062a8bde7e532ff02f01991d66da33ec569
2023-05-11 17:45:43 -07:00
Myles Watson
5bfb3a7995 VTS: Rename Vsr_Bluetooth5Requirments
Bug: 281798597
Test: atest VtsHalBluetoothTargetTest
Change-Id: I7db99066be11a6dae206cfe4997101db751ae059
2023-05-10 14:06:32 -07:00
Treehugger Robot
4de72a2297 Merge "Bluetooth AIDL: SetTerminalRaw on fd" 2023-04-28 19:29:33 +00:00
Henri Chataing
f41cdd3d0d Merge "Bluetooth: Enable test Cdd_C_12_1_Bluetooth5Requirements" 2023-04-28 17:35:03 +00:00
yanggang.yang
eb744bc14c Bluetooth AIDL: SetTerminalRaw on fd
Call SetTerminalRaw on the fd that was opened, since mFD has not been set. If SetTerminalRaw fails, log it but continue, since some platforms do not need this call.

Bug: 279870989
Test: start Bluetooth on a device that doesn't need SetTerminalRaw
Change-Id: I97c92c407b7c80442a0ba0812a630525219670a0
2023-04-28 17:02:08 +00:00
Henri Chataing
8e9bf734b4 Merge "Bluetooth: Add a test for alignment" 2023-04-21 17:33:23 +00:00
Treehugger Robot
de5c086b79 Merge "Fix HCI parser and packetizer" 2023-04-21 17:22:19 +00:00
Myles Watson
bcc997bdf3 Bluetooth: Add a test for alignment
Bug: 276652301
Test: atest --host bluetooth-vendor-interface-hci-test
Change-Id: I3e862dd88aeed65e7a4ef1f9a223cc520a1ccc54
2023-04-21 16:48:16 +00:00
Henri Chataing
2845303342 Fix HCI parser and packetizer
Issue found from the test H4ProtocolAsyncTest#TestMultiplePackets.
The packetizer does not correctly handle a packet termination
at the beginning of a chunk.

Test: atest --host bluetooth-vendor-interface-hci-test
Bug: 276652301
Change-Id: I1b61efcfa5f817fdb8b5870e81d660be5279fdea
2023-04-21 16:10:22 +00:00
Elie Kheirallah
3f2f348c48 Merge "Fix null dereference read in android::hardware::bluetooth::hci::H4Protocol::Send" 2023-04-21 15:04:56 +00:00
Henri Chataing
0c581a084a Bluetooth: Enable test Cdd_C_12_1_Bluetooth5Requirements
The requirements have been added to RootCanal:
 - LE Periodic Advertising
 - LL Privacy
 - LE 2M Phy

Test: atest
Bug: 275847929
Change-Id: Ifa49494091727bf162554a658629bc4ec3c3cd63
2023-04-20 23:12:06 +00:00
Elie Kheirallah
cd1bf1e530 Fix null dereference read in android::hardware::bluetooth::hci::H4Protocol::Send
Bug: 276375037
Test: atest VtsHalBluetoothTargetTest
Change-Id: Ib9f99a75a97538899ac64a3c02fff1ec5804a0e6
2023-04-20 21:37:50 +00:00
Myles Watson
18bd4096a9 Bluetooth AIDL: Set max thread count to 0
The default HAL only uses one thread, which is 0 more than
the default of 1.

Bug: 205758693
Test: VtsHalBluetoothTargetTest
Change-Id: I8828cab2b4eb4d2a28ecc41cb75e3eb470cd0da6
2023-04-18 15:46:32 -07:00
Myles Watson
048b8f7517 Run VtsHalBluetoothTargetTest with hwasan
Bug: 276457982
Test: atest VtsHalBluetoothTargetTest
Change-Id: I4d203f4217f6509c08c5519dc3ff53b9eca5c172
2023-03-31 13:15:19 -07:00
Treehugger Robot
7c0d76357c Merge changes I53a67135,I235ca85f,If3180282
* changes:
  VTS: Add VSR requirement tests to VTS
  Fix clang-tidy errors
  VtsHalBluetooth: Use PDL to generate packets
2023-03-30 04:09:07 +00:00
Jack He
2d2f3c272d VTS: Add VSR requirement tests to VTS
* Enforce that LMP version must be greater than or equal to HCI version
* Enforce that minimum advertising set is 16 when HCI version is 5.0 and
  above
* Enforce Link Layer Security, 2M Phy, Coded PHY requirements at BT 5
* Enforce minimum 8 resolving list entries at BT 5

Bug: 263257831
Test: vts
Change-Id: I53a6713563c0b9a5ba27eecf2a69caff0a57f30b
2023-03-29 18:24:55 -07:00
Jack He
dbceaca8e1 Fix clang-tidy errors
Bug: 263257831
Test: vts
Change-Id: I235ca85f9c1c84ab0a929572221020bfd568a2b0
2023-03-28 00:07:21 -07:00
Myles Watson
51b8baeb00 VtsHalBluetooth: Use PDL to generate packets
Bug: 266221125
Test: atest VtsHalBluetoothTargetTest
Change-Id: If3180282249027ffab45b7e84138a660266ce2b8
2023-03-27 17:31:53 -07:00
Ayushi Khopkar
3d396973ff Updated fuzz_config in Android.bp file
Added new fields in fuzz_config like - hotlists,
description, vector, service_privilege, users, fuzzed_code_usage, etc.

Bug: 271384401
Test: Build bluetoothV1.0_fuzzer

Change-Id: I71936ab4b16dd5ade636d3da9b1eafa6a6fea6b0
2023-03-23 14:31:05 +05:30
Myles Watson
a794f83162 VtsHalBluetoothV1: Always wait for completed packets
Bug: 266140831
Test: atest VtsHalBluetoothV1_1TargetTest
Change-Id: I09503e2e4596c2488da65c7ca3a5580798dc2bce
2023-03-02 13:45:53 -08:00
Sagar Verma
62df910355 BT: AptxAdaptive LE/LEX codec and AAC ABR AIDL Changes
AptxAdaptive LE/LEX codec and AAC ABR AIDL side changes

Bug: 254567319
Tag: #feature
Test: m android.hardware.bluetooth.audio-freeze-api &&
      m android.hardware.bluetooth.audio-update-api &&
      atest VtsHalBluetoothAudioTargetTest
Change-Id: I74a2df64ba6ef2ae02e08850b0f6c7784b24b02b
2023-02-22 09:19:17 +05:30
Treehugger Robot
f2d9196a6c Merge "Add field isStreamActive in LeAudioConfiguration to indicate the stream status" 2023-02-14 02:58:34 +00:00
Himanshu Rawat
50f5a577e9 Interface change for setting path for head tracking data
Added two new latency modes for Audio HAL to enable Dynamic Spatial
audio with LE audio, and the path through which the head tracking data
has to be routed.

Bug: 268568163
Test: m android.hardware.bluetooth.audio-update-api
Tag: #feature
Change-Id: I92b529e4eee3c862934d46164117450975e017ef
2023-02-13 21:07:06 +00:00
Rongxuan Liu
6945dd3bb3 Update android.hardware.bluetooth.audio to V3
Tag: #feature
Bug: 266740545
Test: m android.hardware.bluetooth.audio-update-api &&
      atest VtsHalBluetoothAudioTargetTest
Change-Id: Ia92043aeedf12a8c68d7f4ee18a1dd52ac5a252f
Merged-In: Ia92043aeedf12a8c68d7f4ee18a1dd52ac5a252f
2023-02-10 04:11:44 +00:00
Rongxuan Liu
c1aea3238f Add new field 'pcmStreamId' in LeAudioBroadcastConfiguration
This field is used to indicate the PCM stream source for given stream
handle

Tag: #feature
Bug: 264692800
Test: m android.hardware.bluetooth.audio-update-api
Change-Id: I3df9066e98ca552329bb58ae5fbc5346d1021b10
Merged-In: I3df9066e98ca552329bb58ae5fbc5346d1021b10
2023-02-10 04:10:58 +00:00
Myles Watson
f99027f39a H4ProtocolTest: Time out after 5 seconds
This test isn't a performance test.  In rare cases it
takes longer than 100ms (usually around 5ms).

Bug: 268408355
Test: bluetooth-btlinux-hci-test
Change-Id: I6d2f23eb05541bc0f9676cbfd8b097340a131e09
2023-02-09 09:30:52 -08:00
Treehugger Robot
47c304ee1e Merge "Parse broadcast offload capabilities" 2023-02-07 08:41:05 +00:00
Myles Watson
0daa164e59 VtsHalBluetooth: Add test for double init
Bug: 266221125
Test: atest VtsHalBluetoothTargetTest
Change-Id: Ic9c0abd27171e210367c2224f8a97991f4088285
2023-02-01 17:17:58 -08:00
Myles Watson
65b47f5f99 BluetoothHAL: Reset the chip on open(), close once
Sending a reset and discarding extra packets
helps ensure that tests are hermetic for devices
that do not power off the chip with rfkill.

Add a mutex to make sure that close only gets
called once.

Bug: 266221125
Test: atest VtsHalBluetoothTargetTest
Change-Id: Ifb259a675202aa5399a8c7570ba8c4df2083e10e
2023-01-31 14:42:57 -08:00
Myles Watson
3443ca47b8 Merge "VtsHalBluetoothTargetTest: test loopback" 2023-01-23 20:47:31 +00:00
Myles Watson
e1708c8c44 VtsHalBluetoothTargetTest: test loopback
Add tests for loopback testing mode.

Bug: 205758693
Test: atest VtsHalBluetoothTargetTest
Change-Id: Ie4d23136f0cff901435ec33f8668dd1e261d9870
2023-01-20 17:52:31 -08:00
Myles Watson
022e49b684 Bluetooth HAL: Fail loudly on a write failure
Bug: 205758693
Test: VtsHalBluetoothTargetTest
Change-Id: I2151b324247a83a454b81c28c9f0f5cd5581be09
2023-01-20 17:49:06 -08:00
Treehugger Robot
115b1a7dae Merge changes Ie7e60128,I1a648227
* changes:
  Move AIDL library from shared to static for BT VTS
  Add bluetooth VTS to TEST_MAPPING
2023-01-20 02:02:52 +00:00