Commit graph

189 commits

Author SHA1 Message Date
Yung Ti Su
d395fce754 enable host_supported for libbluetooth_audio_session_aidl
Test: manual

Change-Id: Iae06114020e5bc4e41fa5caa5df5de8a186dc2ff
Merged-In: Iae06114020e5bc4e41fa5caa5df5de8a186dc2ff
Signed-off-by: Yung Ti Su <andysu@google.com>
2023-08-24 06:38:03 +00:00
kuanyuhuang
f51add9de2 BT: add LOW_LATENCY mode if low latency allowed am: 182457597e
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24365913

Change-Id: I57580aca1af36c5d6b311f83b2afb1a7ecad453a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-10 00:52:59 +00:00
kuanyuhuang
182457597e 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
Test: play low latency audio with supported headset and check
LOW_LATENCY mode can be selected
(cherry picked from https://android-review.googlesource.com/q/commit:25b4819e08280ea1bffa019a231e1d60edea7338)
Merged-In: Ie0626179a56334125cd48a048d162f09882888eb
Merged-In: I9d5510116225aa5857d1bd086956bc46d46a3eba
Change-Id: Ia324f0a368e47ae8b8056c190d8d1f4a2e09ecec
2023-08-09 04:00:01 +00:00
Mikhail Naganov
4bb14a9cdf 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
(cherry picked from commit d5f0d13ef0)
Merged-In: Ib0b8c6d1c7db9b846a508d6d4001f67feb2111c6
2023-08-03 10:55:45 -07:00
Ram Mohan
a7d3a0dc06 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
(cherry picked from commit f6497dd78c)
2023-08-03 10:55:16 -07:00
Treehugger Robot
b41fbbdbec Merge "BluetoothAudio: Statically link HAL dependencies" into stage-aosp-udc-ts-dev am: e6da8fb752 am: 99e5913e0a am: d8e7fa4e03
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/24039765

Change-Id: I192b91378f6aed60e771d34c8a762e3e06595335
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-13 01:18:16 +00:00
Myles Watson
5aadf9ad17 BluetoothAudio: Statically link HAL dependencies
Bug: 290666670
Bug: 289857524
Bug: 284091286
Bug: 289489060
Test: mma -j32
(cherry picked from https://android-review.googlesource.com/q/commit:44628f38d2f60a8e9c283315485d2d62605f677d)
Merged-In: I2b3c32b133e208ec2cfb1b244ccb24ad249f22df
Change-Id: I2b3c32b133e208ec2cfb1b244ccb24ad249f22df
The 32-bit libraries may not be present on the device.  This makes the test more self-contained.
2023-07-12 17:07:14 +00:00
William Escande
d1de935e1d Improve AudioProvider logging
Bug: 245009140
Test: looked at some beautiful log when bluetooth is killed (RIP)
(cherry picked from https://android-review.googlesource.com/q/commit:fb6dd74b2c84bf6ab0238760e06bcd3d078011c4)
Merged-In: If33bee4e875812ce3710d41014cae8bd54d840f2
Change-Id: If33bee4e875812ce3710d41014cae8bd54d840f2
2023-05-15 18:47:05 +00:00
William Escande
01d65e01d0 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
(cherry picked from https://android-review.googlesource.com/q/commit:f3faab081a543ad43e86eec6d03cd7835ef5c712)
Merged-In: I0c14c062a8bde7e532ff02f01991d66da33ec569
Change-Id: I0c14c062a8bde7e532ff02f01991d66da33ec569
2023-05-15 18:47:00 +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
Patty Huang
f5b38af6df Always use audio_configuration_changed_cb_ to notify the config update
There is a new API `isStreamActive` can indicate the stream handle
state. We don't need to use soft_audio_configuration_change_cb to
update the connection map and audio location

Bug: 249614160
Bug: 277857154
Test: LE audio offload disappear and later join with downmix enable
Change-Id: I02357ebe09425525e356ba0f793a3f081953d866
2023-04-13 10:31:20 +08:00
Alex Buynytskyy
ec1198d941 UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-04-07 23:41:20 +00: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
Treehugger Robot
47c304ee1e Merge "Parse broadcast offload capabilities" 2023-02-07 08:41:05 +00: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
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
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
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
Omer Osman
b229ac5fd1 Merge "Add Opus to BT Audio HAL and update version to V2" into tm-dev 2022-05-13 16:54:28 +00:00
Jakub Pawłowski
11daf7e4f8 Merge "Add 32kHz as supported setting" into tm-dev 2022-05-12 16:30:05 +00:00
Omer Osman
a2587da5b2 Add Opus to BT Audio HAL and update version to V2
This CL adds Opus as a supported A2DP codec to the BT Audio HAL and
updates HAL compatibility matrix.

Bug: 226441860
Test: A2DP sink device using bds-dev
Change-Id: I21249e3e7e76412af7ed62a3fc9ec133434cf963
2022-05-12 05:56:08 +00:00
Łukasz Rymanowski
4d14c1edba Add 32kHz as supported setting
Bug: 230550335
Test: Build, test audio
Change-Id: I94c4c54092d0afb71aee555fa46936e228397444
(cherry picked from commit 12f82bb40c)
Merged-In: I94c4c54092d0afb71aee555fa46936e228397444
2022-05-12 12:03:51 +08:00
Treehugger Robot
e3b10a1f84 Merge "Add 32kHz as supported setting" 2022-05-12 04:01:03 +00:00
Jakub Pawlowski
780d8c5ab6 Bluetooth LE Audio: pass the 24 bit stream as unpacked through HAL
LC3 encoder/decoder expects unpacked 24 bit stream

Bug: 230578655
Test: use 24_2 configuration to play over LE Audio
Merged-In: I298d6d3a0cd9786581730de88487c982e1fa9d9d
Change-Id: I298d6d3a0cd9786581730de88487c982e1fa9d9d
2022-05-11 08:49:12 +02:00
Jakub Pawlowski
7230958c05 Bluetooth LE Audio: pass the 24 bit stream as unpacked through HAL
LC3 encoder/decoder expects unpacked 24 bit stream

Bug: 230578655
Test: use 24_2 configuration to play over LE Audio
Change-Id: I298d6d3a0cd9786581730de88487c982e1fa9d9d
2022-05-10 15:40:44 +02:00
Łukasz Rymanowski
12f82bb40c Add 32kHz as supported setting
Bug: 230550335
Test: Build, test audio
Change-Id: I94c4c54092d0afb71aee555fa46936e228397444
2022-05-06 17:17:04 +00:00
Patty Huang
bdf65ba94f Support 24k and 32k config for LE Audio Offload
Bug: 230402180
Test: Manual
Change-Id: If4931999009b27423adeab3af50238dd6d8c8637
(cherry picked from commit f4e3551eb1)
Merged-In: If4931999009b27423adeab3af50238dd6d8c8637
2022-05-04 17:31:51 +08:00
Patty Huang
f4e3551eb1 Support 24k and 32k config for LE Audio Offload
Bug: 230402180
Test: Manual
Change-Id: If4931999009b27423adeab3af50238dd6d8c8637
2022-04-28 10:53:29 +08:00
Treehugger Robot
d667e6583e Merge "BtAudio: Prevent unlink dead binder" am: dc1a419baf am: 6afd301d16 am: 31a6eb814c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2046266

Change-Id: I3f0ad7c0c535bd1312871e1b53bc2cf0597a2434
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 20:32:30 +00:00
Treehugger Robot
dc1a419baf Merge "BtAudio: Prevent unlink dead binder" 2022-04-07 18:56:44 +00:00
Josh Wu
08255b45d9 BtAudio: Prevent unlink dead binder
Tag: #stability
Bug: 227029886
Test: manually kill bt process
Change-Id: Ic976a33feb5a3636ab828637faf0ba109f5948ce
2022-04-07 09:02:20 -07:00
Jiyong Park
703e97920e Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-31 12:01:39 +09:00