From 563b2ac5ead8803dda11b31a209ac7ea63a942ad Mon Sep 17 00:00:00 2001 From: kuanyuhuang Date: Thu, 29 Jun 2023 09:07:10 +0000 Subject: [PATCH] [BT] enable Bluetooth LE Audio Set BT profiles and add codec capabilies for LE Audio. Test: connect le audio headset and play music Bug: 289339525 Change-Id: I23c7bd5ecf6146bdd87735e502223f36bed05afd --- bluetooth/Android.bp | 27 +++++++ bluetooth/le_audio_codec_capabilities.xml | 85 +++++++++++++++++++++++ device-akita.mk | 23 ++++++ 3 files changed, 135 insertions(+) create mode 100644 bluetooth/Android.bp create mode 100644 bluetooth/le_audio_codec_capabilities.xml diff --git a/bluetooth/Android.bp b/bluetooth/Android.bp new file mode 100644 index 0000000..8012310 --- /dev/null +++ b/bluetooth/Android.bp @@ -0,0 +1,27 @@ +// +// Copyright (C) 2023 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +soong_namespace { +} + +package { + default_applicable_licenses: ["device_google_akita_license"], +} + +prebuilt_etc { + name: "le_audio_codec_capabilities.xml", + vendor: true, + src: "le_audio_codec_capabilities.xml", +} diff --git a/bluetooth/le_audio_codec_capabilities.xml b/bluetooth/le_audio_codec_capabilities.xml new file mode 100644 index 0000000..9dcdd01 --- /dev/null +++ b/bluetooth/le_audio_codec_capabilities.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device-akita.mk b/device-akita.mk index 0d9c70a..74acaab 100644 --- a/device-akita.mk +++ b/device-akita.mk @@ -139,6 +139,29 @@ PRODUCT_PACKAGES_DEBUG += \ PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.a2dp_aac.vbr_supported=true +# Bluetooth LE Audio +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_switcher.supported=true \ + bluetooth.profile.bap.unicast.client.enabled=true \ + bluetooth.profile.csip.set_coordinator.enabled=true \ + bluetooth.profile.hap.client.enabled=true \ + bluetooth.profile.mcp.server.enabled=true \ + bluetooth.profile.ccp.server.enabled=true \ + bluetooth.profile.vcp.controller.enabled=true + +# Bluetooth LE Audio enable hardware offloading +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=false + +# Include Bluetooth soong namespace +PRODUCT_SOONG_NAMESPACES += \ + device/google/akita/bluetooth + +# Bluetooth LE Auido offload capabilities setting +PRODUCT_PACKAGES += \ + le_audio_codec_capabilities.xml + # Enable one-handed mode PRODUCT_PRODUCT_PROPERTIES += \ ro.support_one_handed_mode=true