From 09c3fd343f9a9b758e894f9d6c440f1a70231cf5 Mon Sep 17 00:00:00 2001 From: Robert Lee Date: Mon, 16 Aug 2021 06:21:06 +0000 Subject: [PATCH 1/3] audio: update audio_policy_volumes.xml Update below stream's volume curves to refine system sound output from speaker too loud in the lowest volume. Refine audio-tables.mk location to make sure the xml is updated. Bug: 195387287 Test: QMC verified Test: Local built and verified vendor/etc/audio_policy_volumes.xml is correct one Signed-off-by: Robert Lee Change-Id: I13188d7470092448a2660f89d43cf13a56c22edc --- audio/oriole/audio-tables.mk | 3 +- audio/oriole/config/audio_policy_volumes.xml | 223 +++++++++++++++++++ audio/raven/audio-tables.mk | 3 +- audio/raven/config/audio_policy_volumes.xml | 223 +++++++++++++++++++ device-oriole.mk | 2 +- device-raven.mk | 2 +- 6 files changed, 452 insertions(+), 4 deletions(-) create mode 100644 audio/oriole/config/audio_policy_volumes.xml create mode 100644 audio/raven/config/audio_policy_volumes.xml diff --git a/audio/oriole/audio-tables.mk b/audio/oriole/audio-tables.mk index ca63df9..6c3fc3a 100644 --- a/audio/oriole/audio-tables.mk +++ b/audio/oriole/audio-tables.mk @@ -22,7 +22,8 @@ PRODUCT_COPY_FILES += \ device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 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/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 # AudioEffectHAL Configuration PRODUCT_COPY_FILES += \ diff --git a/audio/oriole/config/audio_policy_volumes.xml b/audio/oriole/config/audio_policy_volumes.xml new file mode 100644 index 0000000..db57662 --- /dev/null +++ b/audio/oriole/config/audio_policy_volumes.xml @@ -0,0 +1,223 @@ + + + + + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + + + + + 1,-3600 + 33,-2400 + 66,-1200 + 100,0 + + + + + + + + + + + + 1,-3600 + 33,-2400 + 66,-1200 + 100,0 + + + + + + + 1,-3600 + 33,-2400 + 66,-1200 + 100,0 + + + + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + 1,-4200 + 33,-3000 + 66,-1800 + 100,-600 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/raven/audio-tables.mk b/audio/raven/audio-tables.mk index 9e36fa4..cc64f06 100644 --- a/audio/raven/audio-tables.mk +++ b/audio/raven/audio-tables.mk @@ -22,7 +22,8 @@ PRODUCT_COPY_FILES += \ device/google/raviole/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 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/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 # AudioEffectHAL Configuration PRODUCT_COPY_FILES += \ diff --git a/audio/raven/config/audio_policy_volumes.xml b/audio/raven/config/audio_policy_volumes.xml new file mode 100644 index 0000000..db57662 --- /dev/null +++ b/audio/raven/config/audio_policy_volumes.xml @@ -0,0 +1,223 @@ + + + + + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + + + + + 1,-3600 + 33,-2400 + 66,-1200 + 100,0 + + + + + + + + + + + + 1,-3600 + 33,-2400 + 66,-1200 + 100,0 + + + + + + + 1,-3600 + 33,-2400 + 66,-1200 + 100,0 + + + + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + 1,-4200 + 33,-3000 + 66,-1800 + 100,-600 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/device-oriole.mk b/device-oriole.mk index 0faa113..622fd4d 100644 --- a/device-oriole.mk +++ b/device-oriole.mk @@ -26,9 +26,9 @@ $(call inherit-product-if-exists, vendor/google_devices/raviole/proprietary/Wall DEVICE_PACKAGE_OVERLAYS += device/google/raviole/oriole/overlay +include device/google/raviole/audio/oriole/audio-tables.mk include device/google/gs101/device-shipping-common.mk include device/google/gs101/fingerprint/udfps_common.mk -include device/google/raviole/audio/oriole/audio-tables.mk include hardware/google/pixel/vibrator/cs40l25/device.mk ifeq ($(filter factory_oriole, $(TARGET_PRODUCT)),) diff --git a/device-raven.mk b/device-raven.mk index 0d147c5..e16d9e2 100644 --- a/device-raven.mk +++ b/device-raven.mk @@ -26,6 +26,7 @@ $(call inherit-product-if-exists, vendor/google_devices/raviole/proprietary/Wall DEVICE_PACKAGE_OVERLAYS += device/google/raviole/raven/overlay +include device/google/raviole/audio/raven/audio-tables.mk include device/google/gs101/device-shipping-common.mk include device/google/gs101/fingerprint/udfps_common.mk @@ -39,7 +40,6 @@ ifeq ($(filter factory_raven, $(TARGET_PRODUCT)),) include device/google/gs101/uwb/uwb.mk endif -include device/google/raviole/audio/raven/audio-tables.mk include hardware/google/pixel/vibrator/cs40l25/device.mk PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.support_kernel_idle_timer=true From b7b48bb1e9139f2d28d179e3cdedab81fc4cee2a Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Mon, 16 Aug 2021 13:48:20 +0800 Subject: [PATCH 2/3] thermal: optimize CPU thermal throttling 1. Avoid integral and derivative computation when thermal > MODERATE 2. Adjust cdev weight to make LC throttling become more aggressive Bug: 195459720 Test: test burn8 Change-Id: I2d40e8cd95f6c67ff48574b2b8405c9545a67611 --- thermal_info_config_oriole.json | 16 ++++++++-------- thermal_info_config_raven.json | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/thermal_info_config_oriole.json b/thermal_info_config_oriole.json index 03b34f5..5c3e7c9 100644 --- a/thermal_info_config_oriole.json +++ b/thermal_info_config_oriole.json @@ -327,19 +327,19 @@ "PassiveDelay":7000, "PIDInfo": { "K_Po":["NAN", "NAN", 1500, 1500, "NAN", "NAN", "NAN"], - "K_Pu":["NAN", "NAN", 1500, 1500, "NAN", "NAN", "NAN"], - "K_I":["NAN", "NAN", 20, 20, "NAN", "NAN", "NAN"], - "K_D":["NAN", "NAN", 10, 10, "NAN", "NAN", "NAN"], - "I_Max":["NAN", "NAN", 4000, 1000, "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 1500, 750, "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 20, 0, "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 10, 0, "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 1000, 0, "NAN", "NAN", "NAN"], "S_Power":["NAN", "NAN", 3500, 1500, "NAN", "NAN", "NAN"], "MinAllocPower":["NAN", "NAN", 2500, 1500, "NAN", "NAN", "NAN"], "MaxAllocPower":["NAN", "NAN", 9500, 3000, "NAN", "NAN", "NAN"], - "I_Cutoff":["NAN", "NAN", 2, 2, "NAN", "NAN", "NAN"] + "I_Cutoff":["NAN", "NAN", 2, 0, "NAN", "NAN", "NAN"] }, "BindedCdevInfo": [ { "CdevRequest": "thermal-cpufreq-0", - "CdevWeightForPID": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], + "CdevWeightForPID": [0.085, 0.085, 0.085, 0.085, 0.085, 0.085, 0.085], "CdevCeiling": [3, 3, 6, 7, 8, 10, 10], "LimitInfo": [0, 0, 0, 0, 8, 10, 10], "BindedPowerRail": "S4M_VDD_CPUCL0", @@ -348,7 +348,7 @@ }, { "CdevRequest": "thermal-cpufreq-1", - "CdevWeightForPID": [0.075, 0.075, 0.075, 0.075, 0.075, 0.075, 0.075], + "CdevWeightForPID": [0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08], "CdevCeiling": [7, 7, 8, 9, 11, 13, 13], "LimitInfo": [0, 0, 0, 0, 11, 13, 13], "BindedPowerRail": "S3M_VDD_CPUCL1", @@ -357,7 +357,7 @@ }, { "CdevRequest": "thermal-cpufreq-2", - "CdevWeightForPID": [0.37, 0.37, 0.37, 0.37, 0.37, 0.37, 0.37], + "CdevWeightForPID": [0.38, 0.38, 0.38, 0.38, 0.38, 0.38, 0.38], "CdevCeiling": [11, 11, 14, 14, 14, 16, 16], "LimitInfo": [0, 0, 0, 0, 14, 16, 16], "BindedPowerRail": "S2M_VDD_CPUCL2", diff --git a/thermal_info_config_raven.json b/thermal_info_config_raven.json index 2025978..3050df4 100644 --- a/thermal_info_config_raven.json +++ b/thermal_info_config_raven.json @@ -327,19 +327,19 @@ "PassiveDelay":7000, "PIDInfo": { "K_Po":["NAN", "NAN", 1500, 1500, "NAN", "NAN", "NAN"], - "K_Pu":["NAN", "NAN", 1500, 1500, "NAN", "NAN", "NAN"], - "K_I":["NAN", "NAN", 20, 20, "NAN", "NAN", "NAN"], - "K_D":["NAN", "NAN", 10, 10, "NAN", "NAN", "NAN"], - "I_Max":["NAN", "NAN", 4000, 1000, "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 1500, 750, "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 20, 0, "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 10, 0, "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 1000, 0, "NAN", "NAN", "NAN"], "S_Power":["NAN", "NAN", 3500, 1500, "NAN", "NAN", "NAN"], "MinAllocPower":["NAN", "NAN", 2500, 1500, "NAN", "NAN", "NAN"], "MaxAllocPower":["NAN", "NAN", 9500, 3000, "NAN", "NAN", "NAN"], - "I_Cutoff":["NAN", "NAN", 2, 2, "NAN", "NAN", "NAN"] + "I_Cutoff":["NAN", "NAN", 2, 0, "NAN", "NAN", "NAN"] }, "BindedCdevInfo": [ { "CdevRequest": "thermal-cpufreq-0", - "CdevWeightForPID": [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], + "CdevWeightForPID": [0.085, 0.085, 0.085, 0.085, 0.085, 0.085, 0.085], "CdevCeiling": [3, 3, 6, 7, 8, 10, 10], "LimitInfo": [0, 0, 0, 0, 8, 10, 10], "BindedPowerRail": "S4M_VDD_CPUCL0", @@ -348,7 +348,7 @@ }, { "CdevRequest": "thermal-cpufreq-1", - "CdevWeightForPID": [0.075, 0.075, 0.075, 0.075, 0.075, 0.075, 0.075], + "CdevWeightForPID": [0.08, 0.08, 0.08, 0.08, 0.08, 0.08, 0.08], "CdevCeiling": [7, 7, 8, 9, 11, 13, 13], "LimitInfo": [0, 0, 0, 0, 11, 13, 13], "BindedPowerRail": "S3M_VDD_CPUCL1", @@ -357,7 +357,7 @@ }, { "CdevRequest": "thermal-cpufreq-2", - "CdevWeightForPID": [0.37, 0.37, 0.37, 0.37, 0.37, 0.37, 0.37], + "CdevWeightForPID": [0.38, 0.38, 0.38, 0.38, 0.38, 0.38, 0.38], "CdevCeiling": [11, 11, 14, 14, 14, 16, 16], "LimitInfo": [0, 0, 0, 0, 14, 16, 16], "BindedPowerRail": "S2M_VDD_CPUCL2", From b03fc73cf1840851c4990512cc273b248e039675 Mon Sep 17 00:00:00 2001 From: Beverly Date: Fri, 13 Aug 2021 15:35:21 -0400 Subject: [PATCH 3/3] Add config for brightness sensor using prox Binned brightness sensor on R4O6 don't use the prox sensor. Test: manual Bug: 194151347 Change-Id: I339a4a4612c7eb5f90196835ef9121b114cdece3 --- .../frameworks/base/packages/SystemUI/res/values/config.xml | 5 +++++ .../frameworks/base/packages/SystemUI/res/values/config.xml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/oriole/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/oriole/overlay/frameworks/base/packages/SystemUI/res/values/config.xml index 21b9084..6f9b86e 100644 --- a/oriole/overlay/frameworks/base/packages/SystemUI/res/values/config.xml +++ b/oriole/overlay/frameworks/base/packages/SystemUI/res/values/config.xml @@ -25,6 +25,11 @@ always-on display) --> com.google.sensor.binned_brightness + + false + true diff --git a/raven/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/raven/overlay/frameworks/base/packages/SystemUI/res/values/config.xml index a5bb8e3..1273f27 100644 --- a/raven/overlay/frameworks/base/packages/SystemUI/res/values/config.xml +++ b/raven/overlay/frameworks/base/packages/SystemUI/res/values/config.xml @@ -25,6 +25,11 @@ always-on display) --> com.google.sensor.binned_brightness + + false + true