From 1c95aad4eef77fb40cf9d30492ea4be2deeb05b5 Mon Sep 17 00:00:00 2001 From: Patty Huang Date: Mon, 13 Mar 2023 15:47:51 +0800 Subject: [PATCH 1/2] 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 From 4cb5760fab06828c02b3e244c624e0d53c1a0d16 Mon Sep 17 00:00:00 2001 From: Yung Ti Su Date: Thu, 27 Oct 2022 20:53:19 +0800 Subject: [PATCH 2/2] add support for BLE offload case in audio policy Bug: 255722598 Test: manual Change-Id: I4fae3f5575dc035171708feae25644c497aa4804 Signed-off-by: Yung Ti Su --- audio/felix/audio-tables.mk | 1 + .../config/audio_policy_configuration.xml | 22 +- ...licy_configuration_le_offload_disabled.xml | 249 ++++++++++++++++++ 3 files changed, 269 insertions(+), 3 deletions(-) create mode 100644 audio/felix/config/audio_policy_configuration_le_offload_disabled.xml diff --git a/audio/felix/audio-tables.mk b/audio/felix/audio-tables.mk index 8fdb81a..f485dfd 100644 --- a/audio/felix/audio-tables.mk +++ b/audio/felix/audio-tables.mk @@ -20,6 +20,7 @@ AUDIO_TABLE_FOLDER := felix PRODUCT_COPY_FILES += \ device/google/felix/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ device/google/felix/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + device/google/felix/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.xml \ device/google/felix/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ device/google/felix/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ device/google/felix/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ diff --git a/audio/felix/config/audio_policy_configuration.xml b/audio/felix/config/audio_policy_configuration.xml index 720d8db..1b44390 100644 --- a/audio/felix/config/audio_policy_configuration.xml +++ b/audio/felix/config/audio_policy_configuration.xml @@ -166,6 +166,18 @@ + + + + + + + + @@ -188,6 +200,10 @@ sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out,raw,mmap_no_irq_out"/> + + + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +