diff --git a/device-comet.mk b/device-comet.mk index 578cd89..2d94122 100644 --- a/device-comet.mk +++ b/device-comet.mk @@ -140,6 +140,7 @@ PRODUCT_COPY_FILES += \ $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/thermal_info_config_comet.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/thermal_info_config_backup_comet.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_backup.json \ $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_estimation_model_comet.tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_estimation_model.tflite \ + $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/vt_speaker_estimation_model_comet.tflite:$(TARGET_COPY_OUT_VENDOR)/etc/vt_speaker_estimation_model.tflite \ PRODUCT_PACKAGES += \ init_thermal_config diff --git a/thermal/thermal_info_config_comet.json b/thermal/thermal_info_config_comet.json index 9659fc0..ea2f844 100644 --- a/thermal/thermal_info_config_comet.json +++ b/thermal/thermal_info_config_comet.json @@ -253,20 +253,6 @@ "Coefficient": [1.0, -1.0], "Multiplier": 1 }, - { - "Name": "STATS-UPDATOR", - "Type": "UNKNOWN", - "VirtualSensor": true, - "Hidden": true, - "TriggerSensor": ["soc_therm", "rffe_therm", "charger_therm", "modem_therm", "gnss_tcxo_therm"], - "Formula": "WEIGHTED_AVG", - "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF"], - "Coefficient": [0.0, 0.0, 0.0], - "Multiplier": 1, - "SendPowerHint": true, - "PollingDelay": 300000, - "PassiveDelay": 7000 - }, { "Name": "VIRTUAL-SKIN", "Type": "SKIN", @@ -875,17 +861,50 @@ ] }, { - "Name": "VIRTUAL-SKIN-SPEAKER", + "Name": "VIRTUAL-SKIN-SPEAKER-LEGACY", "Type": "UNKNOWN", "Version": "0.1", + "Hidden": true, "VirtualSensor": true, - "TriggerSensor": "usb_conn_therm", "Formula": "WEIGHTED_AVG", "Combination": ["usb_conn_therm", "maxfg_base"], "Coefficient": [0.89, 0.01], + "Offset": 8426, + "Multiplier": 0.001 + }, + { + "Name": "VIRTUAL-SKIN-SPEAKER-MODEL", + "Type": "UNKNOWN", + "Version": "1.0", + "Hidden": true, + "VirtualSensor": true, + "ModelPath": "vt_speaker_estimation_model.tflite", + "Formula": "USE_ML_MODEL", + "Combination": ["soc_therm", "rffe_therm", "charger_therm", "usb_conn_therm", "modem_therm", "inner_display_therm", "display_therm", "gnss_tcxo_therm", "maxfg_base", "maxfg_secondary", "inner_brightness"], + "Multiplier": 0.001, + "PreviousSampleCount": 3 + }, + { + "Name": "VIRTUAL-SKIN-SPEAKER-MODEL-LEGACY-DIFF", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Hidden": true, + "Formula": "WEIGHTED_AVG", + "Combination": ["VIRTUAL-SKIN-SPEAKER-MODEL", "VIRTUAL-SKIN-SPEAKER-LEGACY"], + "Coefficient": [1.0, -1.0], + "Multiplier": 1 + }, + { + "Name": "VIRTUAL-SKIN-SPEAKER", + "Type": "UNKNOWN", + "Version": "1.0", + "VirtualSensor": true, + "TriggerSensor": "usb_conn_therm", + "Formula": "MAXIMUM", + "Combination": ["VIRTUAL-SKIN-SPEAKER-MODEL"], + "Coefficient": [1.0], "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, @@ -1000,6 +1019,21 @@ "Type": "NPU", "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", "NaN", "NaN"], "Multiplier": 0.001 + }, + { + "Name": "STATS-UPDATOR", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Hidden": true, + "TriggerSensor": ["soc_therm", "rffe_therm", "charger_therm", "modem_therm", "gnss_tcxo_therm", "usb_conn_therm"], + "Formula": "WEIGHTED_AVG", + "Combination": ["VIRTUAL-SKIN-MODEL", "VIRTUAL-SKIN-LEGACY", "VIRTUAL-SKIN-MODEL-LEGACY-DIFF", + "VIRTUAL-SKIN-SPEAKER-MODEL", "VIRTUAL-SKIN-SPEAKER-LEGACY", "VIRTUAL-SKIN-SPEAKER-MODEL-LEGACY-DIFF"], + "Coefficient": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0], + "Multiplier": 1, + "SendPowerHint": true, + "PollingDelay": 300000, + "PassiveDelay": 7000 } ], "CoolingDevices": [ @@ -1124,8 +1158,8 @@ ] }, { - "Name": "VIRTUAL-SKIN-SPEAKER", - "Thresholds": [35, 37] + "Name": "VIRTUAL-SKIN-SPEAKER-MODEL", + "Thresholds": [0, 37, 42, 47, 57, 100] } ], "Abnormality": { @@ -1139,9 +1173,17 @@ "Monitor": ["VIRTUAL-SKIN-MODEL"], "TempRange": [0.0, 57.0] }, + { + "Monitor": ["VIRTUAL-SKIN-SPEAKER-MODEL"], + "TempRange": [0.0, 57.0] + }, { "Monitor": ["VIRTUAL-SKIN-MODEL-LEGACY-DIFF"], "TempRange": [-7000, 7000] + }, + { + "Monitor": ["VIRTUAL-SKIN-SPEAKER-MODEL-LEGACY-DIFF"], + "TempRange": [-15000, 15000] } ] }, diff --git a/thermal/vt_speaker_estimation_model_comet.tflite b/thermal/vt_speaker_estimation_model_comet.tflite new file mode 100644 index 0000000..b24da7b Binary files /dev/null and b/thermal/vt_speaker_estimation_model_comet.tflite differ