From d3c9705ecd3cdde8254ddfbe3615d01bb72f29aa Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Tue, 10 May 2022 17:04:15 +0800 Subject: [PATCH 1/4] thermal: bringup charge_mdis PID loop Bug: 209635028 Bug: 226130317 Test: emul_temp with different power workload Change-Id: Ic26adbe21450c14569135dd4694083701070df58 --- thermal_info_config_cheetah.json | 81 ++++++++++++-------------------- thermal_info_config_panther.json | 79 ++++++++++++------------------- 2 files changed, 59 insertions(+), 101 deletions(-) diff --git a/thermal_info_config_cheetah.json b/thermal_info_config_cheetah.json index 3f2410d..1d2e84a 100644 --- a/thermal_info_config_cheetah.json +++ b/thermal_info_config_cheetah.json @@ -99,17 +99,6 @@ "Offset":-453, "Multiplier":0.001 }, - { - "Name":"VIRTUAL-QI-QUIET", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["qi_therm","quiet_therm"], - "Coefficient":[0.3, 0.7], - "Offset":-500, - "Multiplier":0.001 - }, { "Name":"VIRTUAL-QI-DISP", "Type":"UNKNOWN", @@ -214,42 +203,40 @@ "Type":"UNKNOWN", "VirtualSensor":true, "TriggerSensor":"quiet_therm", - "Formula":"MAXIMUM", - "Combination":["VIRTUAL-QI-QUIET", "VIRTUAL-QI-DISP"], - "Coefficient":[1.0, 1.0], + "Formula":"WEIGHTED_AVG", + "Combination":["qi_therm","quiet_therm"], + "Coefficient":[0.35, 0.65], + "Offset":-650, "HotThreshold":["NAN", 39.0, 41.0, 43.0, 45.0, 47.0, 55.0], "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], "Multiplier":0.001, - "Monitor":true, "PollingDelay":300000, "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 3600, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 300, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 6000, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 2, "NAN", "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "PARTIAL_SYSTEM_POWER", + "PowerWeight": [0.5, 0.5, 0.8, 1.0, 1.0, 1.0, 1.0] + } + ], "BindedCdevInfo": [ { - "CdevRequest": "fcc", - "LimitInfo": [0, 2, 3, 3, 4, 4, 4], - "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", - "PowerThreshold": [500, 500, 500, 500, 500, 0, 0], - "CdevFloorWithPowerLink": [0, 0, 2, 2, 3 ,4 ,4], - "ReleaseLogic": "RELEASE_TO_FLOOR", - "ThrottlingWithPowerLink":true - }, - { - "CdevRequest": "dc_icl", - "LimitInfo": [0, 1, 2, 3, 4, 4, 4], - "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", - "PowerThreshold": [500, 500, 500, 500, 500, 0, 0], - "CdevFloorWithPowerLink": [0, 1, 2, 3, 3, 4, 4], - "ReleaseLogic": "RELEASE_TO_FLOOR", - "ThrottlingWithPowerLink":true - }, - { - "CdevRequest": "wlc_fcc", - "LimitInfo": [0, 3, 3, 4, 5, 5, 5], - "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", - "PowerThreshold": [500, 500, 500, 500, 500, 0, 0], - "CdevFloorWithPowerLink": [0, 1, 2, 3, 4, 5, 5], - "ReleaseLogic": "RELEASE_TO_FLOOR", - "ThrottlingWithPowerLink":true + "CdevRequest": "chg_mdis", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 4, 7, 8, 9, 9, 9], + "LimitInfo": [0, 0, 0, 0, 0, 9, 9] } ] }, @@ -701,15 +688,7 @@ "State2Power":[4371, 3543, 3085, 2293, 1927, 1707, 1394, 1171, 967, 768, 592, 433] }, { - "Name":"fcc", - "Type":"BATTERY" - }, - { - "Name":"dc_icl", - "Type":"BATTERY" - }, - { - "Name":"wlc_fcc", + "Name":"chg_mdis", "Type":"BATTERY" }, { @@ -762,12 +741,12 @@ "PowerSampleCount":1 }, { - "Name":"POWER_FOR_CHARGING_THROTTLING", + "Name":"PARTIAL_SYSTEM_POWER", "VirtualRails":true, "Formula":"WEIGHTED_AVG", "Combination":["VSYS_PWR_MODEM", "S2M_VDD_CPUCL2", "S3M_VDD_CPUCL1", "S4M_VDD_CPUCL0", "S5M_VDD_INT", "S1M_VDD_MIF", "S2S_VDD_G3D"], "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], - "PowerSampleDelay":14000, + "PowerSampleDelay":7000, "PowerSampleCount":5 } ] diff --git a/thermal_info_config_panther.json b/thermal_info_config_panther.json index 670c283..8337013 100644 --- a/thermal_info_config_panther.json +++ b/thermal_info_config_panther.json @@ -99,17 +99,6 @@ "Offset":-500, "Multiplier":0.001 }, - { - "Name":"VIRTUAL-QI-QUIET", - "Type":"UNKNOWN", - "Hidden":true, - "VirtualSensor":true, - "Formula":"WEIGHTED_AVG", - "Combination":["qi_therm", "quiet_therm"], - "Coefficient":[0.3, 0.7], - "Offset":-1400, - "Multiplier":0.001 - }, { "Name":"VIRTUAL-QI-DISP", "Type":"UNKNOWN", @@ -214,42 +203,40 @@ "Type":"UNKNOWN", "VirtualSensor":true, "TriggerSensor":"quiet_therm", - "Formula":"MAXIMUM", - "Combination":["VIRTUAL-QI-QUIET", "VIRTUAL-QI-DISP"], - "Coefficient":[1.0, 1.0], + "Formula":"WEIGHTED_AVG", + "Combination":["qi_therm", "quiet_therm"], + "Coefficient":[0.282, 0.718], + "Offset":-448, "HotThreshold":["NAN", 39.0, 41.0, 43.0, 45.0, 47.0, 55.0], "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], "Multiplier":0.001, - "Monitor":true, "PollingDelay":300000, "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 3600, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 300, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 6000, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 2, "NAN", "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "POWER_FOR_CHARGING_THROTTLING", + "PowerWeight": [0.5, 0.5, 0.8, 1.0, 1.0, 1.0, 1.0] + } + ], "BindedCdevInfo": [ { - "CdevRequest": "fcc", - "LimitInfo": [0, 2, 3, 3, 4, 4, 4], - "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", - "PowerThreshold": [500, 500, 500, 500, 0, 0, 0], - "CdevFloorWithPowerLink": [0, 0, 2, 2, 4 ,4 ,4], - "ReleaseLogic": "RELEASE_TO_FLOOR", - "ThrottlingWithPowerLink":true - }, - { - "CdevRequest": "dc_icl", - "LimitInfo": [0, 1, 2, 3, 4, 4, 4], - "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", - "PowerThreshold": [500, 500, 500, 500, 0, 0, 0], - "CdevFloorWithPowerLink": [0, 1, 2, 3, 4, 4, 4], - "ReleaseLogic": "RELEASE_TO_FLOOR", - "ThrottlingWithPowerLink":true - }, - { - "CdevRequest": "wlc_fcc", - "LimitInfo": [0, 2, 2, 4, 5, 5, 5], - "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", - "PowerThreshold": [500, 500, 500, 500, 0, 0, 0], - "CdevFloorWithPowerLink": [0, 1, 1, 2, 5, 5, 5], - "ReleaseLogic": "RELEASE_TO_FLOOR", - "ThrottlingWithPowerLink":true + "CdevRequest": "chg_mdis", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 4, 7, 8, 9, 9, 9], + "LimitInfo": [0, 0, 0, 0, 0, 9, 9] } ] }, @@ -701,15 +688,7 @@ "State2Power":[4599, 3727, 3259, 2378, 2044, 1813, 1449, 1223, 1007, 804, 633, 452] }, { - "Name":"fcc", - "Type":"BATTERY" - }, - { - "Name":"dc_icl", - "Type":"BATTERY" - }, - { - "Name":"wlc_fcc", + "Name":"chg_mdis", "Type":"BATTERY" }, { @@ -767,7 +746,7 @@ "Formula":"WEIGHTED_AVG", "Combination":["VSYS_PWR_MODEM", "S2M_VDD_CPUCL2", "S3M_VDD_CPUCL1", "S4M_VDD_CPUCL0", "S5M_VDD_INT", "S1M_VDD_MIF", "S2S_VDD_G3D"], "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], - "PowerSampleDelay":14000, + "PowerSampleDelay":7000, "PowerSampleCount":5 } ] From 17a923dc3766047bafb17961443f74616baaccb7 Mon Sep 17 00:00:00 2001 From: George Chang Date: Wed, 30 Mar 2022 22:22:32 +0800 Subject: [PATCH 2/4] Switch NFC from HIDL to AIDL Bug: 216290344 Test: atest NfcNciInstrumentationTests Test: atest VtsAidlHalNfcTargetTest Merged-In: Ieb8be71d3ac4e8e187d8fcc2e3843bfd17112a73 Change-Id: Ieb8be71d3ac4e8e187d8fcc2e3843bfd17112a73 --- device-cheetah.mk | 3 +-- device-cloudripper.mk | 3 +-- device-panther.mk | 3 +-- device-ravenclaw.mk | 3 +-- manifest.xml | 9 --------- nfc/libnfc-hal-st-proto1.conf | 4 ++-- nfc/libnfc-hal-st.conf | 4 ++-- 7 files changed, 8 insertions(+), 21 deletions(-) diff --git a/device-cheetah.mk b/device-cheetah.mk index 27648a8..8585ea1 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -103,7 +103,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ NfcNci \ Tag \ - android.hardware.nfc@1.2-service.st + android.hardware.nfc-service.st # SecureElement PRODUCT_PACKAGES += \ @@ -117,7 +117,6 @@ PRODUCT_COPY_FILES += \ device/google/pantah/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf DEVICE_MANIFEST_FILE += \ - device/google/pantah/nfc/manifest_nfc.xml \ device/google/pantah/nfc/manifest_se.xml # Thermal Config diff --git a/device-cloudripper.mk b/device-cloudripper.mk index 0356a70..6f6fdcb 100644 --- a/device-cloudripper.mk +++ b/device-cloudripper.mk @@ -60,7 +60,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ NfcNci \ Tag \ - android.hardware.nfc@1.2-service.st + android.hardware.nfc-service.st # SecureElement PRODUCT_PACKAGES += \ @@ -74,7 +74,6 @@ PRODUCT_COPY_FILES += \ device/google/pantah/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf DEVICE_MANIFEST_FILE += \ - device/google/pantah/nfc/manifest_nfc.xml \ device/google/pantah/nfc/manifest_se.xml # Thermal Config diff --git a/device-panther.mk b/device-panther.mk index 652437f..404c3e6 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -85,7 +85,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ NfcNci \ Tag \ - android.hardware.nfc@1.2-service.st + android.hardware.nfc-service.st # SecureElement PRODUCT_PACKAGES += \ @@ -99,7 +99,6 @@ PRODUCT_COPY_FILES += \ device/google/pantah/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf DEVICE_MANIFEST_FILE += \ - device/google/pantah/nfc/manifest_nfc.xml \ device/google/pantah/nfc/manifest_se.xml # Thermal Config diff --git a/device-ravenclaw.mk b/device-ravenclaw.mk index e4d9223..a749564 100644 --- a/device-ravenclaw.mk +++ b/device-ravenclaw.mk @@ -65,7 +65,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ NfcNci \ Tag \ - android.hardware.nfc@1.2-service.st + android.hardware.nfc-service.st # SecureElement PRODUCT_PACKAGES += \ @@ -79,7 +79,6 @@ PRODUCT_COPY_FILES += \ device/google/pantah/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf DEVICE_MANIFEST_FILE += \ - device/google/pantah/nfc/manifest_nfc.xml \ device/google/pantah/nfc/manifest_se.xml # Thermal Config diff --git a/manifest.xml b/manifest.xml index 73b4e42..aafe372 100644 --- a/manifest.xml +++ b/manifest.xml @@ -113,15 +113,6 @@ hwbinder @1.3::IDevice/google-edgetpu - - android.hardware.nfc - hwbinder - 1.2 - - INfc - default - - android.hardware.health hwbinder diff --git a/nfc/libnfc-hal-st-proto1.conf b/nfc/libnfc-hal-st-proto1.conf index ed1f57b..feb933a 100644 --- a/nfc/libnfc-hal-st-proto1.conf +++ b/nfc/libnfc-hal-st-proto1.conf @@ -60,8 +60,8 @@ PRESENCE_CHECK_ALGORITHM=5 NCI_HAL_MODULE="nfc_nci.st21nfc" ############################################################################### -# White list to be set at startup. -DEVICE_HOST_WHITE_LIST={02:C0} +# Allow list to be set at startup. +DEVICE_HOST_ALLOW_LIST={02:C0} ############################################################################### # BAIL OUT value for P2P diff --git a/nfc/libnfc-hal-st.conf b/nfc/libnfc-hal-st.conf index 60e84ac..f553e3d 100644 --- a/nfc/libnfc-hal-st.conf +++ b/nfc/libnfc-hal-st.conf @@ -60,8 +60,8 @@ PRESENCE_CHECK_ALGORITHM=5 NCI_HAL_MODULE="nfc_nci.st21nfc" ############################################################################### -# White list to be set at startup. -DEVICE_HOST_WHITE_LIST={02:C0} +# Allow list to be set at startup. +DEVICE_HOST_ALLOW_LIST={02:C0} ############################################################################### # BAIL OUT value for P2P From af53662cd4772842ef27a3b718c4fb7f3b8aa768 Mon Sep 17 00:00:00 2001 From: jonerlin Date: Tue, 31 May 2022 20:04:07 +0800 Subject: [PATCH 3/4] Bluetooth: Enable BTRT logging for userdebug eng build Bug: 215487478 Test: Manually Change-Id: I701262727a5bf656f15577561a9361e58bd59e5c --- device-cheetah.mk | 4 ++-- device-panther.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/device-cheetah.mk b/device-cheetah.mk index 8585ea1..f503c33 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -276,10 +276,10 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.a2dp_aac.vbr_supported=true -# Override BQR mask to enable LE Audio Choppy report +# Override BQR mask to enable LE Audio Choppy report, BTRT logging ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_PRODUCT_PROPERTIES += \ - persist.bluetooth.bqr.event_mask=262238 + persist.bluetooth.bqr.event_mask=295006 else PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.bqr.event_mask=94 diff --git a/device-panther.mk b/device-panther.mk index 404c3e6..d0c4c85 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -263,10 +263,10 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.a2dp_aac.vbr_supported=true -# Override BQR mask to enable LE Audio Choppy report +# Override BQR mask to enable LE Audio Choppy report, BTRT logging ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_PRODUCT_PROPERTIES += \ - persist.bluetooth.bqr.event_mask=262238 + persist.bluetooth.bqr.event_mask=295006 else PRODUCT_PRODUCT_PROPERTIES += \ persist.bluetooth.bqr.event_mask=94 From 933409ce60e4f38337136d1e0194b338d45d4a64 Mon Sep 17 00:00:00 2001 From: Alice Kuo Date: Wed, 25 May 2022 16:38:21 +0800 Subject: [PATCH 4/4] Add support LE audio switcher in the developer option Bug: 233018305 Bug: 233005340 Test: switch LE audio feature, and check LE audio functionality status Change-Id: I5305f3b2b1fe19f8a1ddb42ee9101bfb64b9bce2 --- device-cheetah.mk | 5 +++-- device-panther.mk | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/device-cheetah.mk b/device-cheetah.mk index f503c33..be8d45e 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -248,10 +248,11 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ SettingsOverlayGFE4J -# Bluetooth LE Audio Hardware offload +# Bluetooth LE Audio PRODUCT_PRODUCT_PROPERTIES += \ ro.bluetooth.leaudio_offload.supported=true \ - persist.bluetooth.leaudio_offload.disabled=false + persist.bluetooth.leaudio_offload.disabled=false \ + ro.bluetooth.leaudio_switcher.supported=true # Bluetooth EWP test tool PRODUCT_PACKAGES_DEBUG += \ diff --git a/device-panther.mk b/device-panther.mk index d0c4c85..dc51e32 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -234,11 +234,11 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ SettingsOverlayG03Z5 -# Bluetooth LE Audio Hardware offload +# Bluetooth LE Audio PRODUCT_PRODUCT_PROPERTIES += \ ro.bluetooth.leaudio_offload.supported=true \ - persist.bluetooth.leaudio_offload.disabled=false - + persist.bluetooth.leaudio_offload.disabled=false \ + ro.bluetooth.leaudio_switcher.supported=true # Bluetooth EWP test tool PRODUCT_PACKAGES_DEBUG += \