Merge "[BT] enable Bluetooth LE Audio" into udc-qpr-dev
This commit is contained in:
commit
1a5c7ffba8
3 changed files with 135 additions and 0 deletions
27
bluetooth/Android.bp
Normal file
27
bluetooth/Android.bp
Normal file
|
@ -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",
|
||||
}
|
85
bluetooth/le_audio_codec_capabilities.xml
Normal file
85
bluetooth/le_audio_codec_capabilities.xml
Normal file
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!---
|
||||
This is an example to configure LE Audio hardware offload supported capability settings
|
||||
codecConfigurationList:
|
||||
Supported codec capability along with its parameter setting
|
||||
|
||||
strategyConfigurationList:
|
||||
ASE Configuration strategies
|
||||
|
||||
configurationList:
|
||||
For each configuration, there are two attributes
|
||||
- codecConfiguration
|
||||
- strategyConfiguration
|
||||
|
||||
scenarioList:
|
||||
There would be only one `scenarios` group
|
||||
For each scenario, the are two attributes
|
||||
- encode
|
||||
- decode
|
||||
If a scenario is unidirectional, mark another direction as `invalid`
|
||||
The configuration should be chosen from `configurationList`
|
||||
-->
|
||||
<leAudioOffloadSetting>
|
||||
<scenarioList>
|
||||
<!-- encode only -->
|
||||
<scenario encode="OneChanMono_16_1" decode="invalid"/>
|
||||
<scenario encode="TwoChanStereo_16_1" decode="invalid"/>
|
||||
<scenario encode="OneChanStereo_16_1" decode="invalid"/>
|
||||
<scenario encode="OneChanMono_16_2" decode="invalid"/>
|
||||
<scenario encode="TwoChanStereo_16_2" decode="invalid"/>
|
||||
<scenario encode="OneChanStereo_16_2" decode="invalid"/>
|
||||
<scenario encode="OneChanMono_24_2" decode="invalid"/>
|
||||
<scenario encode="TwoChanStereo_24_2" decode="invalid"/>
|
||||
<scenario encode="OneChanStereo_24_2" decode="invalid"/>
|
||||
<scenario encode="OneChanMono_48_4" decode="invalid"/>
|
||||
<scenario encode="TwoChanStereo_48_4" decode="invalid"/>
|
||||
<scenario encode="OneChanStereo_48_4" decode="invalid"/>
|
||||
<!-- encode and decode -->
|
||||
<scenario encode="OneChanStereo_16_1" decode="OneChanStereo_16_1"/>
|
||||
<scenario encode="OneChanStereo_16_1" decode="OneChanMono_16_1"/>
|
||||
<scenario encode="TwoChanStereo_16_1" decode="OneChanMono_16_1"/>
|
||||
<scenario encode="OneChanMono_16_1" decode="OneChanMono_16_1"/>
|
||||
<scenario encode="OneChanStereo_16_2" decode="OneChanStereo_16_2"/>
|
||||
<scenario encode="OneChanStereo_16_2" decode="OneChanMono_16_2"/>
|
||||
<scenario encode="TwoChanStereo_16_2" decode="OneChanMono_16_2"/>
|
||||
<scenario encode="OneChanMono_16_2" decode="OneChanMono_16_2"/>
|
||||
<scenario encode="TwoChanStereo_32_2" decode="OneChanMono_32_2"/>
|
||||
<scenario encode="OneChanMono_32_2" decode="OneChanMono_32_2"/>
|
||||
<!-- broadcast -->
|
||||
<scenario encode="invalid" decode="invalid" broadcast="BcastStereo_24_2"/>
|
||||
<scenario encode="invalid" decode="invalid" broadcast="BcastStereo_16_2"/>
|
||||
</scenarioList>
|
||||
<configurationList>
|
||||
<configuration name="OneChanMono_16_1" codecConfiguration="LC3_16k_1" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="TwoChanStereo_16_1" codecConfiguration="LC3_16k_1" strategyConfiguration="STEREO_TWO_CISES_PER_DEVICE"/>
|
||||
<configuration name="OneChanStereo_16_1" codecConfiguration="LC3_16k_1" strategyConfiguration="STEREO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="OneChanMono_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="TwoChanStereo_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="STEREO_TWO_CISES_PER_DEVICE"/>
|
||||
<configuration name="OneChanStereo_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="STEREO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="OneChanMono_24_2" codecConfiguration="LC3_24k_2" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="TwoChanStereo_24_2" codecConfiguration="LC3_24k_2" strategyConfiguration="STEREO_TWO_CISES_PER_DEVICE"/>
|
||||
<configuration name="OneChanStereo_24_2" codecConfiguration="LC3_24k_2" strategyConfiguration="STEREO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="OneChanMono_32_2" codecConfiguration="LC3_32k_2" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="TwoChanStereo_32_2" codecConfiguration="LC3_32k_2" strategyConfiguration="STEREO_TWO_CISES_PER_DEVICE"/>
|
||||
<configuration name="OneChanMono_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="MONO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="TwoChanStereo_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="STEREO_TWO_CISES_PER_DEVICE"/>
|
||||
<configuration name="OneChanStereo_48_4" codecConfiguration="LC3_48k_4" strategyConfiguration="STEREO_ONE_CIS_PER_DEVICE"/>
|
||||
<configuration name="BcastStereo_24_2" codecConfiguration="LC3_24k_2" strategyConfiguration="BROADCAST_STEREO"/>
|
||||
<configuration name="BcastStereo_16_2" codecConfiguration="LC3_16k_2" strategyConfiguration="BROADCAST_STEREO"/>
|
||||
</configurationList>
|
||||
<codecConfigurationList>
|
||||
<codecConfiguration name="LC3_16k_1" codec="LC3" samplingFrequency="16000" frameDurationUs="7500" octetsPerCodecFrame="30"/>
|
||||
<codecConfiguration name="LC3_16k_2" codec="LC3" samplingFrequency="16000" frameDurationUs="10000" octetsPerCodecFrame="40"/>
|
||||
<codecConfiguration name="LC3_24k_2" codec="LC3" samplingFrequency="24000" frameDurationUs="10000" octetsPerCodecFrame="60"/>
|
||||
<codecConfiguration name="LC3_32k_2" codec="LC3" samplingFrequency="32000" frameDurationUs="10000" octetsPerCodecFrame="80"/>
|
||||
<codecConfiguration name="LC3_48k_4" codec="LC3" samplingFrequency="48000" frameDurationUs="10000" octetsPerCodecFrame="120"/>
|
||||
</codecConfigurationList>
|
||||
<strategyConfigurationList>
|
||||
<strategyConfiguration name="STEREO_ONE_CIS_PER_DEVICE" audioLocation="STEREO" connectedDevice="2" channelCount="1"/>
|
||||
<strategyConfiguration name="STEREO_TWO_CISES_PER_DEVICE" audioLocation="STEREO" connectedDevice="1" channelCount="2"/>
|
||||
<strategyConfiguration name="MONO_ONE_CIS_PER_DEVICE" audioLocation="MONO" connectedDevice="1" channelCount="1"/>
|
||||
<strategyConfiguration name="BROADCAST_STEREO" audioLocation="STEREO" connectedDevice="0" channelCount="2"/>
|
||||
</strategyConfigurationList>
|
||||
</leAudioOffloadSetting>
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue