Commit graph

619 commits

Author SHA1 Message Date
Treehugger Robot
ccb7204ecf Merge "Use the PDL library for HCI packets" into main am: ab10c92241
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2675951

Change-Id: I7cfe73d0dbe9443a4dc04db615dd1e7e7c95fc15
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-01 21:31:03 +00:00
William Escande
b94637beae Use the PDL library for HCI packets
Bug: 296427840
Test: mma -j32
Change-Id: I5dc1d6cd24890e4558ace5b8de4ed6d93a6abc86
Merged-In: I5dc1d6cd24890e4558ace5b8de4ed6d93a6abc86
2023-09-01 18:02:53 +00:00
Treehugger Robot
3928787308 Merge "Remove PDL from the HAL" into main am: c9174b9a18
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2729993

Change-Id: Iec6c62b9ecde82b23bf5d79cb923db1e8529a8dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-29 01:08:58 +00:00
Myles Watson
47c0282de8 Remove PDL from the HAL
The benefit is small and it's painful to make libraries
available to apexes and the platform.

Bug: 296427840
Test: mma -j32
Change-Id: I7f2ed8636b90de415b8d5635dcd7c568810323bd
2023-08-28 15:24:36 -07:00
Xin Li
879960bdce Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I7b6fffac2ada0e039f79bad8cc9b4d954e9c3460
Change-Id: I9466127d8d0fa38df36ca99f704853b2db871e67
2023-08-25 13:29:30 -07:00
Yung Ti Su
fefceb14d0 enable host_supported for libbluetooth_audio_session_aidl
Test: manual

Change-Id: Iae06114020e5bc4e41fa5caa5df5de8a186dc2ff
Signed-off-by: Yung Ti Su <andysu@google.com>
2023-08-22 09:29:06 +00:00
Igor Tolkov
3b3f7f06fa Move StopServicesSetup later in VtsHalBluetoothV1.0TargetTest am: 8c32f711b5 am: 12320fd071 am: cd47557c62
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2709435

Change-Id: I478ec9b89d874d516b384c211f1ee9acaf022288
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-18 08:26:35 +00:00
Igor Tolkov
cd47557c62 Move StopServicesSetup later in VtsHalBluetoothV1.0TargetTest am: 8c32f711b5 am: 12320fd071
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2709435

Change-Id: Id19f7f18a9a374e92a5790240adf260aa1f92b4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-18 07:57:21 +00:00
Igor Tolkov
8c32f711b5 Move StopServicesSetup later in VtsHalBluetoothV1.0TargetTest
Move StopServicesSetup after RunCommandTargetPreparer in
VtsHalBluetoothV1_0TargetTest. RunCommandTargetPreparer requires
settings service, which is not available after StopServicesSetup.

Bug: 293822620
Test: run vts -m VtsHalBluetoothV1_0TargetTest and inspect logs to make
sure no preparer steps fail.

Change-Id: I935d19c5e941bfdb122554d8c413d3095fef27ac
2023-08-16 15:24:25 +08:00
Henri Chataing
1267ff2c46 bluetooth/aidl: Enable HCI reset in default hal only when running on emulator devices
Bug: 290329516
Test: m
Change-Id: I624f26824372fb708598e6be322adf06e40cb5a2
2023-08-09 22:57:26 +00:00
kuanyuhuang
25b4819e08 BT: add LOW_LATENCY mode if low latency allowed
LatencyMode is not updatable after audio session started.
Currently, if low latency is allowed, audio session should have
LOW_LATENCY latency mode.
Create a workaround to add LOW_LATENCY when low_latency_allowed_ set to
ture at ReportLowLatencyModeAllowedChanged.

Bug: 291760415
Bug: 294498919
Test: play low latency audio with supported headset and check
LOW_LATENCY mode can be selected

Change-Id: Ia324f0a368e47ae8b8056c190d8d1f4a2e09ecec
2023-08-07 05:05:52 +00:00
Mikhail Naganov
d5f0d13ef0 bluetooth: Add AudioSession/Control methods for AIDL track metadata
Add overloads for UpdateSink/SourceMetadata that
accept android.hardware.audio.common.Sink/SourceMetadata types.
Move include of hardware/audio.h to BluetoothAudioSession.cpp.
This allows to use this code from "pure AIDL" modules.

Bug: 228804498
Test: m
Change-Id: Ib0b8c6d1c7db9b846a508d6d4001f67feb2111c6
2023-08-01 13:38:47 -07:00
Ram Mohan
f6497dd78c bluetooth: Fix dependency on android.hardware.audio.common
Make android.hardware.bluetooth.audio-V3 and
VtsHalBluetoothAudioTargetTest to depend on
android.hardware.audio.common-V2. This is needed so that
the audio HAL service can depend on
android.hardware.bluetooth.audio-V3.

Bug: 228804498
Test: m
Change-Id: Ic001e651de4cc6ef6920f1d6d80ab272c45aefe2
Merged-In: Ic001e651de4cc6ef6920f1d6d80ab272c45aefe2
2023-08-01 13:38:47 -07:00
Devin Moore
dfcd3bda4b Freeze android.hardware.bluetooth.audio
This was done in ag/22462586 internally which is too large to
cherry-pick. It's being applied to aosp to unblock some trunk stable
work.

This CL is generated with:
`m android.hardware.bluetooth.audio-freeze-api`

Test: m
Bug: 290265210
Change-Id: Icfcea3d6971dd0b91cd320d9995b70bcb38a3750
Merged-In: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-07-31 23:46:41 +00:00
William Escande
29120123a8 Sync wait for the bluetooth to be disabled / enabled
Bluetooth does not handle well conflicting message

Test: VtsHalBluetoothV1_0TargetTest
Test: VtsHalBluetoothV1_1TargetTest
Bug: 262645484
Bug: 262501652
Bug: 293822620
Change-Id: I0aca127fb5e5e33cc0086aaad19a8f1286fc83d6
(cherry picked from commit cd64ee13fb)
2023-07-31 06:40:19 +00:00
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
c01432b259 Merge "TEST_MAPPING: enable vts hal tests in kernel-presubmit" am: 24a8a39219 am: 69771123ba am: ac75f2d41c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2610093

Change-Id: Id502dbe01f18f68a140290f5f0bf8b709d35bf0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 22:00:27 +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
13f58a77f3 Merge "Set root elements for xsd_config modules" am: ee8374606a am: 5a73645eb0 am: f371c2e7bc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2596609

Change-Id: Idb0d2297407a5708a8e21362ef39c7a32c371dfd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 06:16:20 +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
e908a03e1d Merge "Revert "Remove unused hardware/bluetooth.h include"" am: 3ac998fa8c am: 79119d91d0 am: f1c107e68d
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2594896

Change-Id: I3ca64c9c9e1162c3f1d4f8f8af225c0e821aafb7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 02:53:08 +00: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
f093402a1e Merge "Remove unused hardware/bluetooth.h include" am: 9d2cdddb88 am: 99c2543da3 am: f229895e69
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2589266

Change-Id: Ida1ebb083b03f39b98ff69f5e4689595edbdd9f3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 23:38:05 +00:00
David Duarte
9d2cdddb88 Merge "Remove unused hardware/bluetooth.h include" 2023-05-18 21:50:50 +00:00
Myles Watson
9868117f45 Merge "Bluetooth HIDL 1.0: Log BDADDR source" am: f5212f4528 am: 356da88842 am: 531236e188
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2595997

Change-Id: Id1ef1f0fd85b1fb7d1b1069eef66894441fe0908
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 21:36:16 +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
ba20c7b6b7 Merge "VTS: Reduce TV's advertising set requirement to 10" into udc-dev am: 1b3c54106e
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/23202864

Change-Id: I42e1e03034ebbcfd034be9f9d049dfa11c0d1130
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 19:00:22 +00:00
Treehugger Robot
4b518cc3e7 VTS: Reduce TV's advertising set requirement to 10
Bug: 281798597
Test: atest VtsHalBluetoothVTargetTest
Change-Id: Ia3be5a1c7a7acc5270baef74b295291c32851987
2023-05-11 23:54:11 -07: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
9269b194a6 Merge changes If33bee4e,I0c14c062 am: 6ca63b0e20 am: d64df0bd01 am: fdaef2eb09
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2585012

Change-Id: Ibc56b0b1dc9041f84f3ff13084fcdf5b73fcf112
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 04:17:42 +00: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
Treehugger Robot
62eb791ab2 Merge "VTS: Rename Vsr_Bluetooth5Requirments" am: 3551f2963e am: 5b83b95388 am: 80537228a0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2585149

Change-Id: I60c4bda67ade7725daf6624a6a594fa3ddc65206
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 01:11:29 +00:00
Myles Watson
5bfb3a7995 VTS: Rename Vsr_Bluetooth5Requirments
Bug: 281798597
Test: atest VtsHalBluetoothTargetTest
Change-Id: I7db99066be11a6dae206cfe4997101db751ae059
2023-05-10 14:06:32 -07:00
Thomas Girardier
abf0d08ba1 Merge "Always use audio_configuration_changed_cb_ to notify the config update" into udc-dev am: 98d6368ebb
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/22241290

Change-Id: I2031bfc738b3d1fb97641f5fb252da9b15655688
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-04 05:27:35 +00:00
Thomas Girardier
98d6368ebb Merge "Always use audio_configuration_changed_cb_ to notify the config update" into udc-dev 2023-05-04 04:55:16 +00:00
Treehugger Robot
f3dcc82a6b Merge "Bluetooth AIDL: SetTerminalRaw on fd" am: 4de72a2297 am: bb8c28de90 am: 8b2a877457
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2556557

Change-Id: I31c22dd5c92a8fef9769280885fce4f1f4f49b2e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-28 21:18:19 +00:00
yanggang.yang
d1abb34b44 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
(cherry picked from https://android-review.googlesource.com/q/commit:eb744bc14c0d1e64c4291b3f869d6055db36b0f3)
Merged-In: I97c92c407b7c80442a0ba0812a630525219670a0
Change-Id: I97c92c407b7c80442a0ba0812a630525219670a0
2023-04-28 19:36:38 +00:00
Treehugger Robot
4de72a2297 Merge "Bluetooth AIDL: SetTerminalRaw on fd" 2023-04-28 19:29:33 +00:00
Henri Chataing
a4b4be6c2b Merge "Bluetooth: Enable test Cdd_C_12_1_Bluetooth5Requirements" am: f41cdd3d0d am: 2c2472ee9e am: 30bc77e297
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2551038

Change-Id: Ia47d1611ce185c4ed0faf4a3e85aca404f0c9800
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-28 19:09:56 +00:00
Henri Chataing
f41cdd3d0d Merge "Bluetooth: Enable test Cdd_C_12_1_Bluetooth5Requirements" 2023-04-28 17:35:03 +00:00