From 2b2e1d64d3823ad928dbc42c24ce79f8d6e3f383 Mon Sep 17 00:00:00 2001 From: sashwinbalaji Date: Tue, 5 Dec 2023 10:03:54 +0800 Subject: [PATCH] thermal: Add VIRTUAL-SKIN-SPEAKER - Add new virtual sensor for speaker - Set usb_conn_therm trigger temp as 30.79 - Add tz maxfg_base - Update both proto and evt onwards config Bug: 303547367 Test: adb shell dumpsys android.hardware.thermal.IThermal/default Test: adb shell dumpsys thermalservice Change-Id: I17fa0f2e8c9756f58056c6ba2cdbebe7fdd555a1 --- thermal_info_config_comet.json | 28 +++++++++++++++++++++++++++- thermal_info_config_comet_proto.json | 28 +++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/thermal_info_config_comet.json b/thermal_info_config_comet.json index d140cdb..ba34498 100644 --- a/thermal_info_config_comet.json +++ b/thermal_info_config_comet.json @@ -30,6 +30,11 @@ "Name": "battery_cycle", "Type": "BCL_VOLTAGE" }, + { + "Name": "maxfg_base", + "Type": "UNKNOWN", + "Multiplier": 0.001 + }, { "Name": "smpl_gm", "Type": "BCL_VOLTAGE", @@ -122,7 +127,7 @@ { "Name": "usb_conn_therm", "Type": "UNKNOWN", - "HotThreshold": ["NAN", 46.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotThreshold": ["NAN", 30.79, "NAN", "NAN", "NAN", "NAN", "NAN"], "TempPath": "/dev/thermal/tz-by-name/usb_conn_therm/tz_temp", "Multiplier": 0.001, "PollingDelay": 300000, @@ -636,6 +641,23 @@ } ] }, + { + "Name": "VIRTUAL-SKIN-SPEAKER", + "Type": "UNKNOWN", + "Version": "0.1", + "VirtualSensor": true, + "TriggerSensor": "usb_conn_therm", + "Formula": "WEIGHTED_AVG", + "Combination": ["usb_conn_therm", "maxfg_base"], + "Coefficient": [0.89, 0.01], + "HotThreshold": ["NAN", 37.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis": [0.0, 1.9, 0.0, 0.0, 0.0, 0.0, 0.0], + "Offset": 8426, + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "SendCallback": true + }, { "Name": "USB-MINUS-CHARGER", "Type": "UNKNOWN", @@ -817,6 +839,10 @@ { "Name": "VIRTUAL-SKIN", "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 55] + }, + { + "Name": "VIRTUAL-SKIN-SPEAKER", + "Thresholds": [35, 37] } ], "Abnormality": { diff --git a/thermal_info_config_comet_proto.json b/thermal_info_config_comet_proto.json index cc9b664..0616244 100644 --- a/thermal_info_config_comet_proto.json +++ b/thermal_info_config_comet_proto.json @@ -30,6 +30,11 @@ "Name": "battery_cycle", "Type": "BCL_VOLTAGE" }, + { + "Name": "maxfg_base", + "Type": "UNKNOWN", + "Multiplier": 0.001 + }, { "Name": "smpl_gm", "Type": "BCL_VOLTAGE", @@ -122,7 +127,7 @@ { "Name": "usb_conn_therm", "Type": "UNKNOWN", - "HotThreshold": ["NAN", 46.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotThreshold": ["NAN", 30.79, "NAN", "NAN", "NAN", "NAN", "NAN"], "TempPath": "/dev/thermal/tz-by-name/usb_conn_therm/tz_temp", "Multiplier": 0.001, "PollingDelay": 300000, @@ -636,6 +641,23 @@ } ] }, + { + "Name": "VIRTUAL-SKIN-SPEAKER", + "Type": "UNKNOWN", + "Version": "0.1", + "VirtualSensor": true, + "TriggerSensor": "usb_conn_therm", + "Formula": "WEIGHTED_AVG", + "Combination": ["usb_conn_therm", "maxfg_base"], + "Coefficient": [0.89, 0.01], + "HotThreshold": ["NAN", 37.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis": [0.0, 1.9, 0.0, 0.0, 0.0, 0.0, 0.0], + "Offset": 8426, + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "SendCallback": true + }, { "Name": "USB-MINUS-CHARGER", "Type": "UNKNOWN", @@ -817,6 +839,10 @@ { "Name": "VIRTUAL-SKIN", "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 55] + }, + { + "Name": "VIRTUAL-SKIN-SPEAKER", + "Thresholds": [35, 37] } ], "Abnormality": {