From 1c95aad4eef77fb40cf9d30492ea4be2deeb05b5 Mon Sep 17 00:00:00 2001 From: Patty Huang Date: Mon, 13 Mar 2023 15:47:51 +0800 Subject: [PATCH] Porting LE Audio unciast on F10. 1. Default enable LE Audio unicast on android U. 2. Enable LE Audio offload flag 3. Add the offload capability file for unicast 4. Enable LE Audio switcher flag(for developer option) 5. Enable BQR event mask for LE Audio choppy event Bug: 273167787 Test: LE Audio unicast related services are all enabled by default Test: Media & Phone call can stream via LE Audio SW/HW path Change-Id: I3a09fff2191b18ed90c782ab2c8e76a032950cb4 --- bluetooth/le_audio_codec_capabilities.xml | 73 +++++++++++++++++++++++ device-felix.mk | 34 +++++++++++ 2 files changed, 107 insertions(+) create mode 100644 bluetooth/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..a836273 --- /dev/null +++ b/bluetooth/le_audio_codec_capabilities.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device-felix.mk b/device-felix.mk index 77daa12..c128422 100644 --- a/device-felix.mk +++ b/device-felix.mk @@ -318,3 +318,37 @@ ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) device/google/gs201/init.hardware.wlc.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wlc.rc endif +# Bluetooth LE Audio +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=false \ + 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 \ + +# Override BQR mask to enable LE Audio Choppy report +ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.bqr.event_mask=262238 +else +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.bqr.event_mask=94 +endif + +# Bluetooth LE Audio CIS handover to SCO +# Set the property only if the controller doesn't support CIS and SCO +# simultaneously. More details in b/242908683. +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.leaudio.notify.idle.during.call=true + +# LE Audio Offload Capabilities Setting +PRODUCT_COPY_FILES += \ + device/google/felix/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml + +# Bluetooth EWP test tool +PRODUCT_PACKAGES_DEBUG += \ + ewp_tool