From 8eb016913d844279cd0791aa4e0d40fe8ad30485 Mon Sep 17 00:00:00 2001 From: Carter Hsu Date: Thu, 17 Mar 2022 12:08:24 +0800 Subject: [PATCH 1/4] audio: add recording debug files Bug: 221964481 Test: build pass Signed-off-by: Carter Hsu Change-Id: I63e7dff97cd48ec337de2f70d2746e28afc19a57 --- audio/cheetah/audio-tables.mk | 5 +++++ audio/cloudripper/audio-tables.mk | 5 +++++ audio/panther/audio-tables.mk | 5 +++++ audio/ravenclaw/audio-tables.mk | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/audio/cheetah/audio-tables.mk b/audio/cheetah/audio-tables.mk index c9cbbc7..45dea54 100644 --- a/audio/cheetah/audio-tables.mk +++ b/audio/cheetah/audio-tables.mk @@ -58,6 +58,11 @@ PRODUCT_COPY_FILES += \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSET.mods \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HEADSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HEADSET.mods +#Bluenote files +PRODUCT_COPY_FILES += \ + device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/template.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/template.xml \ + device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/tuning_constraints_combination.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/tuning_constraints_combination.xml + # Mixer Path Configuration for Audio Speaker Calibration Tool crus_sp_cal PRODUCT_COPY_FILES += \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/cs35l41/crus_sp_cal_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/crus_sp_cal_mixer_paths.xml diff --git a/audio/cloudripper/audio-tables.mk b/audio/cloudripper/audio-tables.mk index fb993b7..54d685d 100644 --- a/audio/cloudripper/audio-tables.mk +++ b/audio/cloudripper/audio-tables.mk @@ -57,6 +57,11 @@ PRODUCT_COPY_FILES += \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSET.mods \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HEADSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HEADSET.mods +#Bluenote files +PRODUCT_COPY_FILES += \ + device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/template.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/template.xml \ + device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/tuning_constraints_combination.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/tuning_constraints_combination.xml + # Mixer Path Configuration for Audio Speaker Calibration Tool crus_sp_cal PRODUCT_COPY_FILES += \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/cs35l41/crus_sp_cal_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/crus_sp_cal_mixer_paths.xml diff --git a/audio/panther/audio-tables.mk b/audio/panther/audio-tables.mk index 909a498..2597ba8 100644 --- a/audio/panther/audio-tables.mk +++ b/audio/panther/audio-tables.mk @@ -58,6 +58,11 @@ PRODUCT_COPY_FILES += \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSET.mods \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HEADSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HEADSET.mods +#Bluenote files +PRODUCT_COPY_FILES += \ + device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/template.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/template.xml \ + device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/tuning_constraints_combination.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/tuning_constraints_combination.xml + # Mixer Path Configuration for Audio Speaker Calibration Tool crus_sp_cal PRODUCT_COPY_FILES += \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/cs35l41/crus_sp_cal_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/crus_sp_cal_mixer_paths.xml diff --git a/audio/ravenclaw/audio-tables.mk b/audio/ravenclaw/audio-tables.mk index d70eddd..d5a00e7 100644 --- a/audio/ravenclaw/audio-tables.mk +++ b/audio/ravenclaw/audio-tables.mk @@ -57,6 +57,11 @@ PRODUCT_COPY_FILES += \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSET.mods \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HEADSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HEADSET.mods +#Bluenote files +PRODUCT_COPY_FILES += \ + device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/template.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/template.xml \ + device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/tuning_constraints_combination.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/tuning_constraints_combination.xml + # Mixer Path Configuration for Audio Speaker Calibration Tool crus_sp_cal PRODUCT_COPY_FILES += \ device/google/pantah/audio/$(AUDIO_TABLE_FOLDER)/cs35l41/crus_sp_cal_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/crus_sp_cal_mixer_paths.xml From 3275b689d7e7152d29c10087fa7408697a6b04df Mon Sep 17 00:00:00 2001 From: jonerlin Date: Thu, 10 Mar 2022 23:03:04 +0800 Subject: [PATCH 2/4] bt: support Sar backoff high resolution command in P22 projects * set SarBackOffHighResolution = true for support power index from 0 to 80 for setting backoff in 0.25 dB step Bug: 170369474 Test: sending sar command with power cap index between 20 ~ 80 and confirm the SAR backoff is workable. Change-Id: I56d75abcff55e93554bf656fff164b861fe0e3c2 --- bluetooth/bt_vendor_overlay.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bluetooth/bt_vendor_overlay.conf b/bluetooth/bt_vendor_overlay.conf index 9c44fe0..16963bf 100644 --- a/bluetooth/bt_vendor_overlay.conf +++ b/bluetooth/bt_vendor_overlay.conf @@ -2,3 +2,6 @@ # Uart port name UartPort = /dev/ttySAC18 + +# Sar backOff high resolution support +SarBackOffHighResolution = true From 3ff3a57ebb08d161547d6b52a878cd5057f9fa9b Mon Sep 17 00:00:00 2001 From: Yung Ti Su Date: Fri, 18 Mar 2022 18:58:50 +0800 Subject: [PATCH 3/4] Seperate audio_policy_configuration for a2dp and le If ro.bluetooth.a2dp_offload.supported == true AND persist.bluetooth.a2dp_offload.disabled == true use audio_policy_configuration_a2dp_offload_disabled.xml (a2dp X LE X) If ro.bluetooth.a2dp_offload.supported == true AND persist.bluetooth.a2dp_offload.disabled == false AND (ro.bluetooth.leaudio_offload.supported == false OR persist.bluetooth.leaudio_offload.disabled == true) use audio_policy_configuration_le_offload_disabled.xml (a2dp O LE X) If ro.bluetooth.a2dp_offload.supported == true AND persist.bluetooth.a2dp_offload.disabled == false AND ro.bluetooth.leaudio_offload.supported == true AND persist.bluetooth.leaudio_offload.disabled == false use default audio_policy_configuration.xml (a2dp O LE O) Note: The above settings are based on ro.bluetooth.a2dp_offload.supported == true condition If ro.bluetooth.a2dp_offload.supported == false, the content of the default audio_policy_configuration.xml file must be replaced by audio_policy_configuration_a2dp_offload_disabled.xml on the target Test: manual Signed-off-by: Yung Ti Su Change-Id: I4a9bd45c1341100217ab32fd81f7421af00e059d --- audio/cheetah/audio-tables.mk | 1 + .../config/audio_policy_configuration.xml | 14 + ...licy_configuration_le_offload_disabled.xml | 255 ++++++++++++++++++ audio/panther/audio-tables.mk | 1 + .../config/audio_policy_configuration.xml | 14 + ...licy_configuration_le_offload_disabled.xml | 255 ++++++++++++++++++ 6 files changed, 540 insertions(+) create mode 100644 audio/cheetah/config/audio_policy_configuration_le_offload_disabled.xml create mode 100644 audio/panther/config/audio_policy_configuration_le_offload_disabled.xml diff --git a/audio/cheetah/audio-tables.mk b/audio/cheetah/audio-tables.mk index 45dea54..4db066b 100644 --- a/audio/cheetah/audio-tables.mk +++ b/audio/cheetah/audio-tables.mk @@ -20,6 +20,7 @@ AUDIO_TABLE_FOLDER := cheetah PRODUCT_COPY_FILES += \ device/google/pantah/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/pantah/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + device/google/pantah/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/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 \ diff --git a/audio/cheetah/config/audio_policy_configuration.xml b/audio/cheetah/config/audio_policy_configuration.xml index b2abc72..4060874 100644 --- a/audio/cheetah/config/audio_policy_configuration.xml +++ b/audio/cheetah/config/audio_policy_configuration.xml @@ -172,6 +172,16 @@ + + + + + + @@ -196,6 +206,10 @@ sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/> + + + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/panther/audio-tables.mk b/audio/panther/audio-tables.mk index 2597ba8..0eecc3d 100644 --- a/audio/panther/audio-tables.mk +++ b/audio/panther/audio-tables.mk @@ -20,6 +20,7 @@ AUDIO_TABLE_FOLDER := panther PRODUCT_COPY_FILES += \ device/google/pantah/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/pantah/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + device/google/pantah/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/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 \ diff --git a/audio/panther/config/audio_policy_configuration.xml b/audio/panther/config/audio_policy_configuration.xml index b2abc72..4060874 100644 --- a/audio/panther/config/audio_policy_configuration.xml +++ b/audio/panther/config/audio_policy_configuration.xml @@ -172,6 +172,16 @@ + + + + + + @@ -196,6 +206,10 @@ sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/> + + + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 46e193ec79aba0ba6a2a80e12e2e69a55c48908e Mon Sep 17 00:00:00 2001 From: Yung Ti Su Date: Fri, 18 Mar 2022 19:13:34 +0800 Subject: [PATCH 4/4] Add LE audio hardware offload property Add these property for the development on userdebug and eng only on P22. Test: manual Signed-off-by: Yung Ti Su Change-Id: Ic80ffbbfdcafda4bba9ed6edf01002d3db7e0c0b --- device-cheetah.mk | 5 +++++ device-panther.mk | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/device-cheetah.mk b/device-cheetah.mk index 58df2bf..557a0b3 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -217,6 +217,11 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ SettingsOverlayGFE4J +# Bluetooth LE Audio Hardware offload +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=false + # userdebug specific ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_COPY_FILES += \ diff --git a/device-panther.mk b/device-panther.mk index b674ec5..ac1b94b 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -209,6 +209,11 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ SettingsOverlayG03Z5 +# Bluetooth LE Audio Hardware offload +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=false + # userdebug specific ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_COPY_FILES += \