Commit graph

542 commits

Author SHA1 Message Date
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
Devin Moore
21ca742b9e Move AIDL library from shared to static for BT VTS
It can't find the .so in /system when the binary is pushed to the
device.

Test: na
Bug: 205758693
Change-Id: Ie7e601285b96d8242d6c8e162c452363a78ed87e
2023-01-20 00:28:50 +00:00
Treehugger Robot
b53e8ef9b4 Merge "Dispatch correct callbacks from AIDL HAL" 2023-01-19 23:01:25 +00:00
Devin Moore
c1b5f69ea0 Add bluetooth VTS to TEST_MAPPING
Test: na
Bug: 205758693
Change-Id: I1a64822740e4cff402a2b5bd62eed359e3c2f123
2023-01-19 21:13:36 +00:00
David Duarte
a58b79d44e Dispatch correct callbacks from AIDL HAL
Test: pts-bot
Bug: 266052984
Change-Id: I323f32ddbc9773df08f7cc466d37c395279e3dd9
2023-01-19 21:01:13 +00:00
Dylan Tian
8a6e09c72d Vts implementation for Bluetooth Hci
Bug: 205758693
Test: atest VtsHalBluetoothTargetTest
Change-Id: If3e193303881990cbca858a0882891a7b8e19c75
2023-01-18 17:24:27 -08:00
Patty Huang
0412eca504 Add field isStreamActive in LeAudioConfiguration to indicate the stream status
Tag: #feature
Bug: 249614160
Test: m android.hardware.bluetooth.audio-update-api
Change-Id: I7930d30a1bc2f2862489f9e70e45926589996ce7
2023-01-12 21:54:49 +08:00
Myles Watson
efa25d7287 bluetooth: Add support for linux bluetooth raw hci sockets
The implementation is imported from
packages/modules/Bluetooth/system/vendor_libs/linux/interface
with modifications to modernize the code.

The default bluetooth HAL implementation now jointly uses
the serial implementation and the bluetooth socket
implementation.

Bug: 205758693
Test: VtsHalBluetoothTargetTest
Change-Id: I791fd406e56a0144e1117cb6f8e27ec71b48a192
2023-01-05 17:09:09 -08:00
Treehugger Robot
78925da485 Merge "specify import version (I)" 2022-12-28 02:37:10 +00:00
Steven Moreland
e489590628 specify import version (I)
Required to automate AIDL finalization - makes errors show up
now instead of later.

Bug: 188871598
Test: build
Change-Id: I6f46a39f76a73f27a71bc36e600941249ccbe8ee
Merged-In: Ic544707bac671d8327d8cc704a9d453470141e8e
2022-12-23 03:49:06 +00:00
William Escande
cd64ee13fb 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
Change-Id: I0aca127fb5e5e33cc0086aaad19a8f1286fc83d6
2022-12-21 18:20:54 -08:00
Patty Huang
ac077efa16 Parse broadcast offload capabilities
1. Parse the broadcast capability from capability file
2. Convert broadcast HAL format to stack format
3. Update test to validate broadcast capability parsing
4. Correct the map size before accessing in VTS test

Tag: #feature
Bug: 242472419
Test: atest BluetoothLeAudioCodecsProviderTest
Test: atest VtsHalBluetoothAudioTargetTest
Change-Id: I8ac88c1e9024ca03757620bf48eacdd60ada7eb4
2022-11-24 19:32:39 +08:00
Treehugger Robot
99817822f7 Merge "Add BluetoothLeAudioCodecsProvider Unit Test" 2022-11-10 05:20:56 +00:00
Myles Watson
df485f9f27 Merge "Bluetooth HCI Hal: Initialize has_died_" 2022-11-04 16:45:22 +00:00
Treehugger Robot
c865dedf53 Merge "Fix VTS Fuzz issue" 2022-11-04 03:42:34 +00:00
xiaoshun.xu
1adfae9364 Fix VTS Fuzz issue
[Description]
Fix is designed to fix VTS Fuzz issue,
1. Add null pointer check in bluetooth_hci.cc and
vendor_interface.cc
2. send should return if open is not done;
3. add lock in callback and set new callback

Bug: 247053367
Test:
1. Build Pass
2. Test VTS fuzz pass

Change-Id: I78da5aeb82f9f78b2b4a156196199183ce0dd8f2
2022-11-04 00:55:50 +00:00
Myles Watson
ad7374c571 hardware/interfaces/Bluetooth: Consolidate OWNERS
Bug: 205758693
Test: Treehugger
Change-Id: I3e3173204ae9b29ab54ab3db9d600a626d44d0db
2022-11-03 10:46:48 -07:00
Myles Watson
8678c75bca Bluetooth HCI Hal: Initialize has_died_
Bug: 205758693
Test: kill Bluetooth
Change-Id: Ia0c844a454524f9cf945c9622fa795dfda12ad3a
2022-11-03 10:44:05 -07:00
Bob Badour
7cde2eee1f [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  bluetooth/aidl/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I40e2b864e3ebe3d70dd37c32b2ea7b1c45010c58
2022-11-03 07:03:39 -07:00
Myles Watson
6d5e77283d Bluetooth HAL: Add an AIDL default implementation
Bug: 205758693
Test: VtsHalBluetoothTargetTest
Change-Id: Ie8839e38448a309f2e6616d852026066b6c6c064
2022-11-01 09:29:23 -07:00
Myles Watson
e4501e549c Start with async and HCI
Bug: 205758693
Test: unit tests
Change-Id: I16a8be44bce5f2d233582ab6db17c30d068fa9c0
2022-11-01 09:29:23 -07:00
Myles Watson
10d29e4934 Bluetooth HIDL -> AIDL conversion
Bug: 205758693
Test: updated vts tests
Change-Id: Iac4d387dba3715d17c63369f392d091e9228333a
2022-11-01 09:29:23 -07:00
shihchienc
d7f565a943 Add BluetoothLeAudioCodecsProvider Unit Test
Add unit test for BluetoothLeAudioCodecsProvider and simplify
the public interface of BluetoothLeAudioCodecsProvider class

Bug: 253569201
Test: atest VtsHalBluetoothAudioTargetTest
Test: atest BluetoothLeAudioCodecsProviderTest
Test: manual test
Change-Id: I064eb4058b129a571cf9dbb91b85bafe7236b735
2022-11-01 06:36:30 +00:00
shihchienc
3ab9f5e2f0 Update Bluetoot Audio HAL Target Test
Since we change the design of loading LE Audio Capabilities in BT
Audio HAL, we update the VTS test to make sure no matter a device
supports LE Audio Offload or not, it can pass all tests that they
should pass.
Also, update vts test to match C++ coding style.

Bug: 248181252
Test: atest VtsHalBluetoothAudioTargetTest
Change-Id: Ie46c86663e0a22627c324f96360063cd4d4874e4
2022-09-27 07:18:59 +00:00
Treehugger Robot
a59abdd935 Merge "Add soft_audio_configuration_changed_cb_ to handle the streamMap changed" 2022-09-20 07:24:12 +00:00
shihchienc
8ed901a977 Expose different offload audio capabilities by project
The current LE audio offload capabilities is hardcode in the
Bluetooth audio HAL. It has the limitation that all the project
would expose the same capabilities. As the newer project comes,
if the ADSP or the controller could handle more configuration
with higher quality or higher bandwidth. It would impact older
project may not work on it. So we plan the feature to make the
le audio offload support to be more flexible.

Bug: 238983662
Test: 1. atest VtsHalBluetoothAudioTargetTest
      2. make sure offload capabilities can be supported with those
         devices having config XML file
Change-Id: Id82581fdcd22e38108f17c7942bca997b53bab35
2022-09-13 15:19:03 +00:00
Alice Kuo
851ef342ed Add soft_audio_configuration_changed_cb_ to handle the streamMap changed
Based on the stream status and Bluetooth Audio Session to switch the
different configuration_changed_cb_ notifcation.

audio_configuration_changed_cb_ for the context type handover case
soft_audio_configuration_changed_cb_ for the streamMap changed during
media stream case

Bug: 231084798
Test: LE audio offload later join and disappear with downmix enable
Change-Id: I199c2b765b128875fb2c66abb1a500e4a6c820b7
2022-09-13 00:06:42 +08:00
William Escande
2591c3d0cf [Bluetooth apex] Use new apex name
The Bluetooth apex name is now called com.android.btservices

Bug: 243054261
Test: Build
Change-Id: Ib63646722cbef948b5198fc5f2a9b5ac2ca52ae3
2022-08-22 11:27:58 -07:00
Treehugger Robot
56ff7775f4 Merge "le_audio_offload: Support two sources for conversational" am: 5b4464928a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2058869

Change-Id: I997da918ceece45e17d1c607d4d15ca8a2ca9ca3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-09 03:01:20 +00:00
Treehugger Robot
5b4464928a Merge "le_audio_offload: Support two sources for conversational" 2022-08-09 02:42:58 +00:00
Patty
51f165b314 le_audio_offload: Support two sources for conversational
Tag: #feature
Bug: 241775706
Test: atest VtsHalBluetoothAudioTargetTest
Change-Id: I1bc59d09ec2ad3a8e65712c2fa099e806cce3c2d
2022-08-08 15:44:14 +00:00
Alice Kuo
fb6b495535 Bluetooth audio hal check broadcast configuraiton for the broadcast offload am: ee398a93f5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2147741

Change-Id: I913250b6070b9d16bd03669c7fe078ea6c5bcbab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 05:20:27 +00:00
Alice Kuo
ee398a93f5 Bluetooth audio hal check broadcast configuraiton for the broadcast offload
The patch contains the following changes
1. Check the broadcast audio configuration as starting broadcast offload
   session
2. Update audio configuration checker for broadcast offload
3. Remove the IsOffloadLeAudioConfigurationValid function that the audio
   configuraiton is invalid as session started, so we don't need to
   check it at that time

Bug: 210987580
Test: start the offload broadcast stream, and check the session status
Change-Id: I60b1b506051873f6d942f2febace6562634fc12a
2022-07-13 04:39:00 +00:00
Alice Kuo
3034ecf2b3 Supoort audio configuration update to audio HAL for broadcast offload am: 36a879796b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2148553

Change-Id: I35f75c717ba2c0a256532ca4a59b2a2e16b1cfa6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 22:20:02 +00:00
Alice Kuo
36a879796b Supoort audio configuration update to audio HAL for broadcast offload
Bug: 210987580
Test: start the broadcast offload, check log
Change-Id: Iadae625d10ad179089b952ac94ff66ae90a6236e
2022-07-08 00:35:08 +08:00
Jooyung Han
d81d6a12be Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
2022-06-14 16:42:42 +09:00
Jooyung Han
c0b24f4f13 Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Ignore-AOSP-First: some libs are still in internal master only.

Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
(cherry picked from commit 5527adfd7f)
2022-06-14 14:08:59 +09:00
Treehugger Robot
23384a2403 Merge "VtsHalBluetoothV1_1: Turn off/on BT at RunCommandTargetPreparer" am: ace4b2577b am: e438c8e1b6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2097964

Change-Id: I6fa70632ed6a5077162ee02c79f83be30a71f310
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 22:06:00 +00:00