From 335f126c2d7da5ed366be216af59bce7ff287694 Mon Sep 17 00:00:00 2001 From: Koli Lin Date: Sun, 19 Nov 2023 16:12:06 +0000 Subject: [PATCH] le-audio porting Bug: 309393549 Bug: 312127510 Test: manual test Change-Id: I53af1edd1deffe5d2cdebf03156ce4aa812ca894 --- bluetooth/le_audio_codec_capabilities.xml | 10 +++- device-caiman.mk | 59 +++++++++++++++-------- device-komodo.mk | 59 +++++++++++++++-------- device-tokay.mk | 59 +++++++++++++++-------- 4 files changed, 128 insertions(+), 59 deletions(-) diff --git a/bluetooth/le_audio_codec_capabilities.xml b/bluetooth/le_audio_codec_capabilities.xml index baadb811..35f884b6 100644 --- a/bluetooth/le_audio_codec_capabilities.xml +++ b/bluetooth/le_audio_codec_capabilities.xml @@ -52,6 +52,8 @@ + + @@ -68,9 +70,13 @@ + + + + @@ -79,6 +85,7 @@ + @@ -87,5 +94,4 @@ - - + \ No newline at end of file diff --git a/device-caiman.mk b/device-caiman.mk index e17f5e7f..dc4ce549 100644 --- a/device-caiman.mk +++ b/device-caiman.mk @@ -147,25 +147,6 @@ PRODUCT_PACKAGES += \ libspatialaudio \ librondo -# 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 \ - -# Bluetooth LE Auido offload capabilities setting -PRODUCT_COPY_FILES += \ - device/google/caimito/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml - # Keymaster HAL #LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service @@ -269,3 +250,43 @@ PRODUCT_VENDOR_PROPERTIES += \ # PKVM Memory Reclaim PRODUCT_VENDOR_PROPERTIES += \ hypervisor.memory_reclaim.supported=1 + +# Bluetooth LE Audio +# Unicast +PRODUCT_PRODUCT_PROPERTIES += \ + 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 + +# LE Audio switcher in developer options +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_switcher.supported=true \ + +# Enable hardware offloading +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=false + +# Bluetooth LE Audio CIS handover to SCO +# Set the property only for the controller couldn't support CIS/SCO simultaneously. More detailed in b/242908683. +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.leaudio.notify.idle.during.call=true + +# LE Audio Offload Capabilities setting +PRODUCT_COPY_FILES += \ + device/google/caimito/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml + +# Disable LE Audio dual mic SWB call support +# This may depend on the BT controller capability or the launch strategy +# For example, P22 BT chip is not able to support 32k dual mic +# P23a disabled the 32k dual mic as it is not in the phase 2 launch plan +PRODUCT_PRODUCT_PROPERTIES += \ + bluetooth.leaudio.dual_bidirection_swb.supported=true + +# LE Audio Unicast Allowlist +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.leaudio.allow_list=SM-R510 + diff --git a/device-komodo.mk b/device-komodo.mk index 59cf8663..4d4c2824 100644 --- a/device-komodo.mk +++ b/device-komodo.mk @@ -158,25 +158,6 @@ PRODUCT_PACKAGES += \ libspatialaudio \ librondo -# 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 \ - -# Bluetooth LE Auido offload capabilities setting -PRODUCT_COPY_FILES += \ - device/google/caimito/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml - # Keymaster HAL #LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service @@ -269,3 +250,43 @@ PRODUCT_VENDOR_PROPERTIES += \ # PKVM Memory Reclaim PRODUCT_VENDOR_PROPERTIES += \ hypervisor.memory_reclaim.supported=1 + +# Bluetooth LE Audio +# Unicast +PRODUCT_PRODUCT_PROPERTIES += \ + 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 + +# LE Audio switcher in developer options +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_switcher.supported=true \ + +# Enable hardware offloading +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=false + +# Bluetooth LE Audio CIS handover to SCO +# Set the property only for the controller couldn't support CIS/SCO simultaneously. More detailed in b/242908683. +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.leaudio.notify.idle.during.call=true + +# LE Audio Offload Capabilities setting +PRODUCT_COPY_FILES += \ + device/google/caimito/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml + +# Disable LE Audio dual mic SWB call support +# This may depend on the BT controller capability or the launch strategy +# For example, P22 BT chip is not able to support 32k dual mic +# P23a disabled the 32k dual mic as it is not in the phase 2 launch plan +PRODUCT_PRODUCT_PROPERTIES += \ + bluetooth.leaudio.dual_bidirection_swb.supported=true + +# LE Audio Unicast Allowlist +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.leaudio.allow_list=SM-R510 + diff --git a/device-tokay.mk b/device-tokay.mk index f3ffac74..06fbb227 100644 --- a/device-tokay.mk +++ b/device-tokay.mk @@ -152,25 +152,6 @@ PRODUCT_PACKAGES += \ libspatialaudio \ librondo -# 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 \ - -# Bluetooth LE Auido offload capabilities setting -PRODUCT_COPY_FILES += \ - device/google/caimito/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml - # Keymaster HAL #LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service @@ -262,3 +243,43 @@ PRODUCT_VENDOR_PROPERTIES += \ # PKVM Memory Reclaim PRODUCT_VENDOR_PROPERTIES += \ hypervisor.memory_reclaim.supported=1 + +# Bluetooth LE Audio +# Unicast +PRODUCT_PRODUCT_PROPERTIES += \ + 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 + +# LE Audio switcher in developer options +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_switcher.supported=true \ + +# Enable hardware offloading +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=false + +# Bluetooth LE Audio CIS handover to SCO +# Set the property only for the controller couldn't support CIS/SCO simultaneously. More detailed in b/242908683. +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.leaudio.notify.idle.during.call=true + +# LE Audio Offload Capabilities setting +PRODUCT_COPY_FILES += \ + device/google/caimito/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml + +# Disable LE Audio dual mic SWB call support +# This may depend on the BT controller capability or the launch strategy +# For example, P22 BT chip is not able to support 32k dual mic +# P23a disabled the 32k dual mic as it is not in the phase 2 launch plan +PRODUCT_PRODUCT_PROPERTIES += \ + bluetooth.leaudio.dual_bidirection_swb.supported=true + +# LE Audio Unicast Allowlist +PRODUCT_PRODUCT_PROPERTIES += \ + persist.bluetooth.leaudio.allow_list=SM-R510 +