From f28274c131d5edb494f3451f1d1517908493ba70 Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Mon, 9 May 2022 15:44:59 +0200 Subject: [PATCH 1/2] audio: configuration for spatial audio Update audio configuration to enable spatial audio: - build with spatial audio feature enabled and rondo library - list spatializer effect in audio effect configuration file - update audio policy configuration files to declare spatializer output - declare immersive end point in audio platform configuration Bug: 237677573 Test: spatial audio playback Change-Id: Ic9c32d813a19ba2789425e12ee9016d53ab30678 --- audio/cheetah/audio-tables.mk | 2 +- audio/cheetah/config/audio_effects.xml | 2 + .../config/audio_platform_configuration.xml | 2 + .../config/audio_policy_configuration.xml | 20 +++--- ...cy_configuration_a2dp_offload_disabled.xml | 10 ++- ...licy_configuration_le_offload_disabled.xml | 16 +++-- ...with_le_audio_policy_configuration_7_0.xml | 71 +++++++++++++++++++ audio/panther/audio-tables.mk | 2 +- audio/panther/config/audio_effects.xml | 2 + .../config/audio_platform_configuration.xml | 2 + .../config/audio_policy_configuration.xml | 20 +++--- ...cy_configuration_a2dp_offload_disabled.xml | 10 ++- ...licy_configuration_le_offload_disabled.xml | 16 +++-- ...with_le_audio_policy_configuration_7_0.xml | 71 +++++++++++++++++++ device-cheetah.mk | 7 +- device-panther.mk | 7 +- 16 files changed, 220 insertions(+), 40 deletions(-) create mode 100644 audio/cheetah/config/bluetooth_with_le_audio_policy_configuration_7_0.xml create mode 100644 audio/panther/config/bluetooth_with_le_audio_policy_configuration_7_0.xml diff --git a/audio/cheetah/audio-tables.mk b/audio/cheetah/audio-tables.mk index 8da7ff2..faf9c90 100644 --- a/audio/cheetah/audio-tables.mk +++ b/audio/cheetah/audio-tables.mk @@ -24,7 +24,7 @@ PRODUCT_COPY_FILES += \ device/google/pantah/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/pantah/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ - frameworks/av/services/audiopolicy/config/bluetooth_with_le_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \ + $(LOCAL_PATH)/audio/$(AUDIO_TABLE_FOLDER)/config/bluetooth_with_le_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml # AudioEffectHAL Configuration diff --git a/audio/cheetah/config/audio_effects.xml b/audio/cheetah/config/audio_effects.xml index 9c2ba29..11e66e5 100644 --- a/audio/cheetah/config/audio_effects.xml +++ b/audio/cheetah/config/audio_effects.xml @@ -10,6 +10,7 @@ + @@ -54,6 +55,7 @@ + diff --git a/audio/cheetah/config/audio_platform_configuration.xml b/audio/cheetah/config/audio_platform_configuration.xml index 0728198..20808d9 100644 --- a/audio/cheetah/config/audio_platform_configuration.xml +++ b/audio/cheetah/config/audio_platform_configuration.xml @@ -183,6 +183,8 @@ + + diff --git a/audio/cheetah/config/audio_policy_configuration.xml b/audio/cheetah/config/audio_policy_configuration.xml index 208d290..4a96bda 100644 --- a/audio/cheetah/config/audio_policy_configuration.xml +++ b/audio/cheetah/config/audio_policy_configuration.xml @@ -64,6 +64,10 @@ + + + + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + + + + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + + + + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/audio/panther/audio-tables.mk b/audio/panther/audio-tables.mk index 6e829b2..fbabffa 100644 --- a/audio/panther/audio-tables.mk +++ b/audio/panther/audio-tables.mk @@ -24,7 +24,7 @@ PRODUCT_COPY_FILES += \ device/google/pantah/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/pantah/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ - frameworks/av/services/audiopolicy/config/bluetooth_with_le_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \ + $(LOCAL_PATH)/audio/$(AUDIO_TABLE_FOLDER)/config/bluetooth_with_le_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml # AudioEffectHAL Configuration diff --git a/audio/panther/config/audio_effects.xml b/audio/panther/config/audio_effects.xml index 9c2ba29..11e66e5 100644 --- a/audio/panther/config/audio_effects.xml +++ b/audio/panther/config/audio_effects.xml @@ -10,6 +10,7 @@ + @@ -54,6 +55,7 @@ + diff --git a/audio/panther/config/audio_platform_configuration.xml b/audio/panther/config/audio_platform_configuration.xml index 0728198..20808d9 100644 --- a/audio/panther/config/audio_platform_configuration.xml +++ b/audio/panther/config/audio_platform_configuration.xml @@ -183,6 +183,8 @@ + + diff --git a/audio/panther/config/audio_policy_configuration.xml b/audio/panther/config/audio_policy_configuration.xml index 208d290..4a96bda 100644 --- a/audio/panther/config/audio_policy_configuration.xml +++ b/audio/panther/config/audio_policy_configuration.xml @@ -64,6 +64,10 @@ + + + + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + + + + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + + + + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload,immersive_out"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/device-cheetah.mk b/device-cheetah.mk index 4fb13a5..67b5944 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -146,8 +146,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ # Spatial Audio PRODUCT_PACKAGES += \ - libspatialaudio \ - librondo + libspatialaudio # Bluetooth hci_inject test tool PRODUCT_PACKAGES_DEBUG += \ @@ -167,6 +166,10 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES_DEBUG += \ sar_test +# declare use of spatial audio +PRODUCT_PROPERTY_OVERRIDES += \ + ro.audio.spatializer_enabled=true + # Keymaster HAL #LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service diff --git a/device-panther.mk b/device-panther.mk index 4caf16c..4dd5c60 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -130,8 +130,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ # Spatial Audio PRODUCT_PACKAGES += \ - libspatialaudio \ - librondo + libspatialaudio # Bluetooth hci_inject test tool PRODUCT_PACKAGES_DEBUG += \ @@ -151,6 +150,10 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES_DEBUG += \ sar_test +# declare use of spatial audio +PRODUCT_PROPERTY_OVERRIDES += \ + ro.audio.spatializer_enabled=true + # Keymaster HAL #LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service From 25f164f895e27214656c87b2e1fa33a85e8b7b19 Mon Sep 17 00:00:00 2001 From: jonerlin Date: Tue, 12 Jul 2022 11:27:40 +0800 Subject: [PATCH 2/2] Bluetooth: Disable BTRT logging for userdebug eng build * remove the BTRT logging to advoid Umimplemeted packet type issue happening Bug: 237906721 Test: Manually Change-Id: I6d2b1444800f7955dc26714d108152cb4abb2114 --- device-cheetah.mk | 4 ++-- device-panther.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/device-cheetah.mk b/device-cheetah.mk index 4fb13a5..7ee0529 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -295,10 +295,10 @@ PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.a2dp_aac.vbr_supported=true -# Override BQR mask to enable LE Audio Choppy report, BTRT logging +# Override BQR mask to enable LE Audio Choppy report, remove BTRT logging ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_PRODUCT_PROPERTIES += \ - persist.bluetooth.bqr.event_mask=295006 + persist.bluetooth.bqr.event_mask=262238 else PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.bqr.event_mask=94 diff --git a/device-panther.mk b/device-panther.mk index 4caf16c..6ad2fce 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -284,10 +284,10 @@ PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.a2dp_aac.vbr_supported=true -# Override BQR mask to enable LE Audio Choppy report, BTRT logging +# Override BQR mask to enable LE Audio Choppy report, remove BTRT logging ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_PRODUCT_PROPERTIES += \ - persist.bluetooth.bqr.event_mask=295006 + persist.bluetooth.bqr.event_mask=262238 else PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.bqr.event_mask=94