From 8ee4619b23c77db7dfa3aeaa4a323dec4c2fd064 Mon Sep 17 00:00:00 2001 From: Alice Kuo Date: Fri, 17 Dec 2021 13:28:08 +0800 Subject: [PATCH 1/4] Add LE audio hardware offload property Add these property for the development on userdebug and eng only on P21. Bug: 197296692 Test: verify media with HW and SW path pass Change-Id: Id967269a555056e958c3f0b7b6d26c4b7ec81efc --- device-oriole.mk | 9 +++++++++ device-raven.mk | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/device-oriole.mk b/device-oriole.mk index 12dc717..b1d99a3 100644 --- a/device-oriole.mk +++ b/device-oriole.mk @@ -229,3 +229,12 @@ PRODUCT_VENDOR_PROPERTIES += \ # This device is shipped with 31 (Android S) PRODUCT_SHIPPING_API_LEVEL := 31 + +# userdebug specific +ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) +# Bluetooth LE Audio Hardware offload +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=true \ + persist.bluetooth.le_audio_test=true +endif diff --git a/device-raven.mk b/device-raven.mk index 3d1aaa2..eaaa29b 100644 --- a/device-raven.mk +++ b/device-raven.mk @@ -246,3 +246,12 @@ PRODUCT_VENDOR_PROPERTIES += \ # This device is shipped with 31 (Android S) PRODUCT_SHIPPING_API_LEVEL := 31 + +# userdebug specific +ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) +# Bluetooth LE Audio Hardware offload +PRODUCT_PRODUCT_PROPERTIES += \ + ro.bluetooth.leaudio_offload.supported=true \ + persist.bluetooth.leaudio_offload.disabled=true \ + persist.bluetooth.le_audio_test=true +endif From 9156a09217a80ba41c034d6006dc5c0d9a2d0ff5 Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Wed, 2 Mar 2022 18:44:45 +0800 Subject: [PATCH 2/4] [ DO NOT MERGE ] Enable user_vote_bypass for UDFPS and face unlock Bug: 221173040 Test: Do FP unlock and confirm the user_vote can be bypassed Change-Id: Ic8a727659c88a6a2abac2cc01865a07b23d16d29 --- powerhint-oriole.json | 131 +++++++++++++++++++++++++++++++++++++++++- powerhint-raven.json | 131 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 260 insertions(+), 2 deletions(-) diff --git a/powerhint-oriole.json b/powerhint-oriole.json index 7df4112..d4d65fa 100644 --- a/powerhint-oriole.json +++ b/powerhint-oriole.json @@ -318,7 +318,7 @@ "Name": "LittleControlTempSet", "Path": "/dev/thermal/tz-by-name/LITTLE/trip_point_2_temp", "Values": [ - "90000", + "95000", "80000" ], "DefaultIndex": 0, @@ -373,6 +373,33 @@ ], "DefaultIndex": 0, "ResetOnInit": false + }, + { + "Name": "CPU_LITTLE_TSKIN_BYPASS", + "Path": "/dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote_bypass", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0 + }, + { + "Name": "CPU_MID_TSKIN_BYPASS", + "Path": "/dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote_bypass", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0 + }, + { + "Name": "CPU_BIG_TSKIN_BYPASS", + "Path": "/dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote_bypass", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0 } ], "Actions": [ @@ -1215,6 +1242,24 @@ "Duration": 1000, "Value": "9999999" }, + { + "PowerHint": "FACE_UNLOCK_BOOST", + "Node": "CPU_LITTLE_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "FACE_UNLOCK_BOOST", + "Node": "CPU_MID_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "FACE_UNLOCK_BOOST", + "Node": "CPU_BIG_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, { "PowerHint": "FP_BOOST", "Node": "CPUBigClusterMaxFreq", @@ -1227,6 +1272,90 @@ "Duration": 1000, "Value": "9999999" }, + { + "PowerHint": "FP_BOOST", + "Node": "CPU_LITTLE_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "FP_BOOST", + "Node": "CPU_MID_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "FP_BOOST", + "Node": "CPU_BIG_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "CPU_LITTLE_TSKIN_BYPASS", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "CPU_MID_TSKIN_BYPASS", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "CPU_BIG_TSKIN_BYPASS", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "BigControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "MidControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "LittleControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "G3dControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "BigSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "MidSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "LittleSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "G3dSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, { "PowerHint": "ML_ACC", "Node": "MLUclampBoost", diff --git a/powerhint-raven.json b/powerhint-raven.json index 65ae4de..4c46342 100644 --- a/powerhint-raven.json +++ b/powerhint-raven.json @@ -319,7 +319,7 @@ "Name": "LittleControlTempSet", "Path": "/dev/thermal/tz-by-name/LITTLE/trip_point_2_temp", "Values": [ - "90000", + "95000", "80000" ], "DefaultIndex": 0, @@ -374,6 +374,33 @@ ], "DefaultIndex": 0, "ResetOnInit": false + }, + { + "Name": "CPU_LITTLE_TSKIN_BYPASS", + "Path": "/dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote_bypass", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0 + }, + { + "Name": "CPU_MID_TSKIN_BYPASS", + "Path": "/dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote_bypass", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0 + }, + { + "Name": "CPU_BIG_TSKIN_BYPASS", + "Path": "/dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote_bypass", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0 } ], "Actions": [ @@ -1232,6 +1259,24 @@ "Duration": 1000, "Value": "9999999" }, + { + "PowerHint": "FACE_UNLOCK_BOOST", + "Node": "CPU_LITTLE_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "FACE_UNLOCK_BOOST", + "Node": "CPU_MID_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "FACE_UNLOCK_BOOST", + "Node": "CPU_BIG_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, { "PowerHint": "FP_BOOST", "Node": "CPUBigClusterMaxFreq", @@ -1244,6 +1289,90 @@ "Duration": 1000, "Value": "9999999" }, + { + "PowerHint": "FP_BOOST", + "Node": "CPU_LITTLE_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "FP_BOOST", + "Node": "CPU_MID_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "FP_BOOST", + "Node": "CPU_BIG_TSKIN_BYPASS", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "CPU_LITTLE_TSKIN_BYPASS", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "CPU_MID_TSKIN_BYPASS", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "CPU_BIG_TSKIN_BYPASS", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "BigControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "MidControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "LittleControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "G3dControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "BigSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "MidSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "LittleSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN_EMERGENCY", + "Node": "G3dSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, { "PowerHint": "ML_ACC", "Node": "MLUclampBoost", From 4a8903fb2458809935450724550bd23f3dd991ed Mon Sep 17 00:00:00 2001 From: Yung Ti Su Date: Mon, 10 Jan 2022 14:06:31 +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: Ibea329bb5b7d24b18ed3e915c9e7306729b17dfd --- .../config/audio_policy_configuration.xml | 14 + ...licy_configuration_le_offload_disabled.xml | 255 ++++++++++++++++++ .../config/audio_policy_configuration.xml | 14 + ...licy_configuration_le_offload_disabled.xml | 255 ++++++++++++++++++ 4 files changed, 538 insertions(+) create mode 100644 audio/oriole/config/audio_policy_configuration_le_offload_disabled.xml create mode 100644 audio/raven/config/audio_policy_configuration_le_offload_disabled.xml diff --git a/audio/oriole/config/audio_policy_configuration.xml b/audio/oriole/config/audio_policy_configuration.xml index 030c767..ed81992 100644 --- a/audio/oriole/config/audio_policy_configuration.xml +++ b/audio/oriole/config/audio_policy_configuration.xml @@ -172,6 +172,16 @@ + + + + + + @@ -196,6 +206,10 @@ sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/> + + + + + + + + + + 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/raven/config/audio_policy_configuration.xml b/audio/raven/config/audio_policy_configuration.xml index 030c767..ed81992 100644 --- a/audio/raven/config/audio_policy_configuration.xml +++ b/audio/raven/config/audio_policy_configuration.xml @@ -172,6 +172,16 @@ + + + + + + @@ -196,6 +206,10 @@ sources="primary output,deep buffer,haptic,compressed_offload,voip_rx"/> + + + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 86c6fb37be00f447a46b31317312dc1596078654 Mon Sep 17 00:00:00 2001 From: Alice Kuo Date: Fri, 14 Jan 2022 23:39:02 +0800 Subject: [PATCH 4/4] Add the audio policy for le audio offload Bug: 197296692 Test: verify media with HW and SW path pass Change-Id: If32d85e67822777e040aa6542849a7889e538e18 --- audio/oriole/audio-tables.mk | 7 ++----- audio/raven/audio-tables.mk | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/audio/oriole/audio-tables.mk b/audio/oriole/audio-tables.mk index 2516080..f9c3759 100644 --- a/audio/oriole/audio-tables.mk +++ b/audio/oriole/audio-tables.mk @@ -23,12 +23,9 @@ PRODUCT_COPY_FILES += \ device/google/raviole/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/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ - device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml - -ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) -PRODUCT_COPY_FILES += \ + device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.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 -endif # AudioEffectHAL Configuration PRODUCT_COPY_FILES += \ diff --git a/audio/raven/audio-tables.mk b/audio/raven/audio-tables.mk index 05deac9..b8538ad 100644 --- a/audio/raven/audio-tables.mk +++ b/audio/raven/audio-tables.mk @@ -23,12 +23,9 @@ PRODUCT_COPY_FILES += \ device/google/raviole/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/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ - device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml - -ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) -PRODUCT_COPY_FILES += \ + device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.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 -endif # AudioEffectHAL Configuration PRODUCT_COPY_FILES += \