From ef3616fe663cac801f0730d0d48b418502e15c4d Mon Sep 17 00:00:00 2001 From: Ravi Jain Date: Thu, 29 Feb 2024 13:23:39 +0000 Subject: [PATCH 01/24] dumpstate: touch: Init using touch_predump More info at go/touch_predump Test: Test locally on test device and check predump_touch works. Bug: 287907308 Change-Id: Iadad909a658f4fa1d3bc163b8bfd950e5029c4a5 --- device-felix.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/device-felix.mk b/device-felix.mk index ad942d6..cccef1d 100644 --- a/device-felix.mk +++ b/device-felix.mk @@ -47,8 +47,8 @@ $(call soong_config_set,fp_hal_feature,pixel_product, product_a) include device/google/felix/vibrator/cs40l26/device.mk include device/google/gs-common/bcmbt/bluetooth.mk include device/google/gs-common/display/dump_second_display.mk -include device/google/gs-common/touch/gti/gti.mk -include device/google/gs-common/touch/stm/stm6.mk +include device/google/gs-common/touch/gti/predump_gti_dual.mk +include device/google/gs-common/touch/stm/predump_stm6.mk ifeq ($(filter factory_felix, $(TARGET_PRODUCT)),) include device/google/felix/uwb/uwb_calibration.mk endif From 29af95b9788e712ffd44d8835194e4850aebdb0b Mon Sep 17 00:00:00 2001 From: "Ali K. Zadeh" Date: Fri, 2 Aug 2024 20:10:44 +0000 Subject: [PATCH 02/24] [felix] Define CAMERA_MULTICAM_BOOST Port from ag/28607900 This CL defines CAMERA_MULTICAM_BOOST (with the same settings as the existing CAMERA_ZOOMING_BOOST). Having both definitions is necessary to be able to transition from zooming boost to multicam boost. Once the multicam boost flag is fully rolled out, we can remove the CAMERA_ZOOMING_BOOST. Bug: 347829135 Test: adb logcat Flag: EXEMPT resource file only change Change-Id: I3e25ea8e3fd84512e514aabab92b1d7c65ffab63 --- powerhint.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/powerhint.json b/powerhint.json index 530c865..3c4aa8f 100644 --- a/powerhint.json +++ b/powerhint.json @@ -1100,6 +1100,18 @@ "Duration": 100, "Value": "0" }, + { + "PowerHint": "CAMERA_MULTICAM_BOOST", + "Node": "CDPreferIdle", + "Duration": 100, + "Value": "1" + }, + { + "PowerHint": "CAMERA_MULTICAM_BOOST", + "Node": "PMU_POLL", + "Duration": 100, + "Value": "0" + }, { "PowerHint": "GCA_CAMERA_SHOT_BIGCPU_RANK1", "Node": "TAPreferHighCap", From 7105ca38e802591f32236fe1b53f62a3ffa7c43e Mon Sep 17 00:00:00 2001 From: Nathan Kulczak Date: Mon, 31 Jul 2023 20:28:58 +0000 Subject: [PATCH 03/24] vibrator: Format PWLE header in user driver Add PWLE header formatting to user side driver to support new kernel driver and SVC and DVL for OWT effects. Bug: 279055885 Bug: 361011775 Flag: EXEMPT bugfix Test: idlcli Change-Id: I3b447962cc46ab57cf145072bc30303786f581ad Signed-off-by: Nathan Kulczak --- vibrator/cs40l26/Vibrator.cpp | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index 03f3646..b4b1cbe 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -84,6 +85,30 @@ static constexpr uint8_t PWLE_CHIRP_BIT = 0x8; // Dynamic/static frequency and static constexpr uint8_t PWLE_BRAKE_BIT = 0x4; static constexpr uint8_t PWLE_AMP_REG_BIT = 0x2; +static constexpr uint8_t PWLE_WT_TYPE = 12; +static constexpr uint8_t PWLE_HEADER_WORD_COUNT = 3; +static constexpr uint8_t PWLE_HEADER_FTR_SHIFT = 8; +static constexpr uint8_t PWLE_SVC_METADATA_WORD_COUNT = 3; +static constexpr uint32_t PWLE_SVC_METADATA_TERMINATOR = 0xFFFFFF; +static constexpr uint8_t PWLE_SEGMENT_WORD_COUNT = 2; +static constexpr uint8_t PWLE_HEADER_WCOUNT_WORD_OFFSET = 2; +static constexpr uint8_t PWLE_WORD_SIZE = sizeof(uint32_t); + +static constexpr uint8_t PWLE_SVC_NO_BRAKING = -1; +static constexpr uint8_t PWLE_SVC_CAT_BRAKING = 0; +static constexpr uint8_t PWLE_SVC_OPEN_BRAKING = 1; +static constexpr uint8_t PWLE_SVC_CLOSED_BRAKING = 2; +static constexpr uint8_t PWLE_SVC_MIXED_BRAKING = 3; + +static constexpr uint32_t PWLE_SVC_MAX_BRAKING_TIME_MS = 1000; + +static constexpr uint8_t PWLE_FTR_BUZZ_BIT = 0x80; +static constexpr uint8_t PWLE_FTR_CLICK_BIT = 0x00; +static constexpr uint8_t PWLE_FTR_DYNAMIC_F0_BIT = 0x10; +static constexpr uint8_t PWLE_FTR_SVC_METADATA_BIT = 0x04; +static constexpr uint8_t PWLE_FTR_DVL_BIT = 0x02; +static constexpr uint8_t PWLE_FTR_LF0T_BIT = 0x01; + static constexpr float PWLE_LEVEL_MIN = 0.0; static constexpr float PWLE_LEVEL_MAX = 1.0; static constexpr float CS40L26_PWLE_LEVEL_MIN = -1.0; @@ -233,10 +258,18 @@ class DspMemChunk { write(8, 0); /* nsections placeholder */ write(8, 0); /* repeat */ } else if (waveformType == WAVEFORM_PWLE) { + write(16, (PWLE_FTR_BUZZ_BIT | PWLE_FTR_DVL_BIT) + << PWLE_HEADER_FTR_SHIFT); /* Feature flag */ + write(8, PWLE_WT_TYPE); /* type12 */ + write(24, PWLE_HEADER_WORD_COUNT); /* Header word count */ + write(24, 0); /* Body word count placeholder */ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) write(24, 0); /* Waveform length placeholder */ write(8, 0); /* Repeat */ write(12, 0); /* Wait time between repeats */ write(8, 0); /* nsections placeholder */ +#endif } else { ALOGE("%s: Invalid type: %u", __func__, waveformType); } @@ -324,6 +357,9 @@ class DspMemChunk { ALOGE("%s: Invalid argument: %u", __func__, totalDuration); return -EINVAL; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) + f += PWLE_HEADER_WORD_COUNT * PWLE_WORD_SIZE; +#endif totalDuration *= 8; /* Unit: 0.125 ms (since wlength played @ 8kHz). */ totalDuration |= WT_LEN_CALCD; /* Bit 23 is for WT_LEN_CALCD; Bit 22 is for WT_INDEFINITE. */ @@ -352,6 +388,9 @@ class DspMemChunk { ALOGE("%s: Invalid argument: %d", __func__, segmentIdx); return -EINVAL; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) + f += PWLE_HEADER_WORD_COUNT * PWLE_WORD_SIZE; +#endif *(f + 7) |= (0xF0 & segmentIdx) >> 4; /* Bit 4 to 7 */ *(f + 9) |= (0x0F & segmentIdx) << 4; /* Bit 3 to 0 */ } else { @@ -361,6 +400,34 @@ class DspMemChunk { return 0; } + + int updateWCount(int segmentCount) { + uint8_t *f = front(); + + if (segmentCount > COMPOSE_SIZE_MAX + 1 /*1st effect may have a delay*/) { + ALOGE("%s: Invalid argument: %d", __func__, segmentCount); + return -EINVAL; + } + if (f == nullptr) { + ALOGE("%s: head does not exist!", __func__); + return -ENOMEM; + } + if (waveformType != WAVEFORM_PWLE) { + ALOGE("%s: Invalid type: %d", __func__, waveformType); + return -EDOM; + } + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) + f += PWLE_HEADER_WORD_COUNT * PWLE_WORD_SIZE; +#endif + uint32_t dataSize = segmentCount * PWLE_SEGMENT_WORD_COUNT + PWLE_HEADER_WORD_COUNT; + *(f + 0) = (dataSize >> 24) & 0xFF; + *(f + 1) = (dataSize >> 16) & 0xFF; + *(f + 2) = (dataSize >> 8) & 0xFF; + *(f + 3) = dataSize & 0xFF; + + return 0; + } }; Vibrator::Vibrator(std::unique_ptr hwApiDefault, std::unique_ptr hwCalDefault, @@ -1360,6 +1427,13 @@ ndk::ScopedAStatus Vibrator::composePwle(const std::vector &compo return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } + /* Update word count */ + if (ch.updateWCount(segmentIdx) < 0) { + ALOGE("%s: Failed to update the waveform word count", __func__); + return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); + } + + /* Update waveform length */ if (ch.updateWLength(totalDuration) < 0) { ALOGE("%s: Failed to update the waveform length length", __func__); return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); From c45009ef1219e071b1f04c6e28d2e820bd883388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20Ko=C5=82odziejczyk?= Date: Tue, 16 Jul 2024 12:21:23 +0000 Subject: [PATCH 04/24] audio: enable software encoded Bluetooth broadcast Bug: 345372436 Test: manual Flag: EXEMPT, trivial change Change-Id: I8e84fca69260a3be6d797ccb0d25b3032dac2bee --- .../bluetooth_with_le_audio_policy_configuration_7_0.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/audio/felix/config/bluetooth_with_le_audio_policy_configuration_7_0.xml b/audio/felix/config/bluetooth_with_le_audio_policy_configuration_7_0.xml index 8b2af59..efd7277 100644 --- a/audio/felix/config/bluetooth_with_le_audio_policy_configuration_7_0.xml +++ b/audio/felix/config/bluetooth_with_le_audio_policy_configuration_7_0.xml @@ -11,6 +11,7 @@ channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + + + sources="le audio output"/> + \ No newline at end of file From ea53f43031e0ca9930f145feff56221f041afa5c Mon Sep 17 00:00:00 2001 From: Wayne Lin Date: Thu, 19 Sep 2024 23:05:42 +0800 Subject: [PATCH 05/24] gps: set default SUPL SSL method to SSLv23 Bug: 363886476 Test: verify SUPL NI test pass Change-Id: I56f0139c748a3a04df9f3998653121948846c8fe --- location/gps.6.1.xml.f10 | 2 +- location/gps.xml.f10 | 2 +- location/gps_user.6.1.xml.f10 | 2 +- location/gps_user.xml.f10 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/location/gps.6.1.xml.f10 b/location/gps.6.1.xml.f10 index 69cb18e..a753dd0 100644 --- a/location/gps.6.1.xml.f10 +++ b/location/gps.6.1.xml.f10 @@ -18,7 +18,7 @@ SuplLogFullName="/data/vendor/gps/suplflow.txt" tlsEnable="true" - SuplSslMethod="SSLv23_NO_TLSv1_2" + SuplSslMethod="SSLv23" SuplEnable="true" SuplUseApn="false" SuplUseApnNI="true" diff --git a/location/gps.xml.f10 b/location/gps.xml.f10 index 92d3316..3ce7975 100644 --- a/location/gps.xml.f10 +++ b/location/gps.xml.f10 @@ -18,7 +18,7 @@ SuplLogFullName="/data/vendor/gps/suplflow.txt" tlsEnable="true" - SuplSslMethod="SSLv23_NO_TLSv1_2" + SuplSslMethod="SSLv23" SuplEnable="true" SuplUseApn="false" SuplUseApnNI="true" diff --git a/location/gps_user.6.1.xml.f10 b/location/gps_user.6.1.xml.f10 index db68a27..7a43bf5 100644 --- a/location/gps_user.6.1.xml.f10 +++ b/location/gps_user.6.1.xml.f10 @@ -17,7 +17,7 @@ SuplLogFullName="/data/vendor/gps/suplflow.txt" tlsEnable="true" - SuplSslMethod="SSLv23_NO_TLSv1_2" + SuplSslMethod="SSLv23" SuplEnable="true" SuplUseApn="false" SuplUseApnNI="true" diff --git a/location/gps_user.xml.f10 b/location/gps_user.xml.f10 index 9ddd3aa..65f3ef0 100644 --- a/location/gps_user.xml.f10 +++ b/location/gps_user.xml.f10 @@ -17,7 +17,7 @@ SuplLogFullName="/data/vendor/gps/suplflow.txt" tlsEnable="true" - SuplSslMethod="SSLv23_NO_TLSv1_2" + SuplSslMethod="SSLv23" SuplEnable="true" SuplUseApn="false" SuplUseApnNI="true" From 810423348e42fc2cf95fb0695caa167dc075cd56 Mon Sep 17 00:00:00 2001 From: Ravi Jain Date: Fri, 27 Sep 2024 07:22:56 +0000 Subject: [PATCH 06/24] vibrator: Update location of PixelVibratorFlags Temporary move the definition from main repository to manage visibility and prevent aosp without vendor build fails Bug: 362659323 Test: Build pass Flag: EXEMPT refactor Change-Id: Ie3bb23838743df1f75261fd530652dcf55b6a643 --- vibrator/cs40l26/Android.bp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vibrator/cs40l26/Android.bp b/vibrator/cs40l26/Android.bp index bd5047a..e929343 100644 --- a/vibrator/cs40l26/Android.bp +++ b/vibrator/cs40l26/Android.bp @@ -60,7 +60,7 @@ cc_library { srcs: [ "Vibrator.cpp", ], - shared_libs: ["//hardware/google/pixel:PixelVibratorFlagsL26"], + shared_libs: ["//device/google/gs-common:PixelVibratorFlagsL26"], export_include_dirs: ["."], vendor_available: true, visibility: [":__subpackages__"], From 17e4c0262fb4878613b6c03313bf2df60f7af028 Mon Sep 17 00:00:00 2001 From: Jim Tang Date: Fri, 4 Oct 2024 15:50:09 +0800 Subject: [PATCH 07/24] Move modem_svc_sit from gs201 to felix Module `modem_svc_sit` is not valid unless: * USES_LASSEN_MODEM is true * BOARD_WITHOUT_RADIO is NOT true (or NOT set) Devices in gs201 family will set "USES_LASSEN_MODEM := true"; however, not evevy gs201 device disables BOARD_WITHOUT_RADIO. This commit defines PRODUCT_PACKAGES `modem_svc_sit` because it is converted from bp by moving the if-statement constrain from the module level to device level, device-felix.mk in this case. Flag: EXEMPT refactor Bug: 358485346 Test: m modem_svc_sit Change-Id: Ib57ffeb545ca52eea47f2415c7ce020ba73f2c24 --- device-felix.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device-felix.mk b/device-felix.mk index ce2df54..ee6689f 100644 --- a/device-felix.mk +++ b/device-felix.mk @@ -108,6 +108,9 @@ PRODUCT_PACKAGES += \ android.hardware.nfc-service.st \ NfcOverlayFelix +# modem_svc_sit daemon +PRODUCT_PACKAGES += modem_svc_sit + # SecureElement PRODUCT_PACKAGES += \ android.hardware.secure_element@1.2-service-gto \ From 32a1b786206476a61acf7086dc38967ed0c1724c Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Thu, 26 Sep 2024 12:18:13 -0700 Subject: [PATCH 08/24] felix: Pull init.insmod.*.cfg from vendor_dlkm We've started pushing init.insmod.*.cfg into the kernel prebuilts, and installing it to /vendor_dlkm/etc, but it may not be available on all prebuilt variants (e.g., kernel 5.10). Here, we: 1. conditionally install our common init.*cfg to /vendor_dlkm (only if $(TARGET_KERNEL_DIR) doesn't have a copy) 2. point init at /vendor_dlkm/etc When we've cycled completely off of kernel 5.10, we can drop #1. Bug: 369686096 Test: build, boot Flag: EXEMPT refactor Change-Id: If8f879366645cbe9bf330d136dd7190763b2d6bc --- conf/init.felix.rc | 2 +- device-felix.mk | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conf/init.felix.rc b/conf/init.felix.rc index 47475e3..46a8980 100644 --- a/conf/init.felix.rc +++ b/conf/init.felix.rc @@ -86,7 +86,7 @@ on early-boot start insmod_sh_felix chown system system /sys/class/power_supply/dualbatt/dbatt_stats -service insmod_sh_felix /vendor/bin/insmod.sh /vendor/etc/init.insmod.felix.cfg +service insmod_sh_felix /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.felix.cfg class main user root group root system diff --git a/device-felix.mk b/device-felix.mk index 69e4375..f443348 100644 --- a/device-felix.mk +++ b/device-felix.mk @@ -60,9 +60,13 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/felix/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.felix.rc -# insmod files +# insmod files. Kernel 5.10 prebuilts don't provide these yet, so provide our +# own copy if they're not in the prebuilts. +# TODO(b/369686096): drop this when 5.10 is gone. +ifeq ($(wildcard $(TARGET_KERNEL_DIR)/init.insmod.*.cfg),) PRODUCT_COPY_FILES += \ - device/google/felix/init.insmod.felix.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.felix.cfg + device/google/felix/init.insmod.felix.cfg:$(TARGET_COPY_OUT_VENDOR_DLKM)/etc/init.insmod.felix.cfg +endif # Camera PRODUCT_COPY_FILES += \ From 9c9f564b770fdd5b8833d2eb34fac9432822553e Mon Sep 17 00:00:00 2001 From: Eileen Lai Date: Wed, 9 Oct 2024 07:55:28 +0000 Subject: [PATCH 09/24] modem_svc: use shared_modem_platform to replace all modem_svc_sit Bug: 368257019 Flag: NONE local testing only Change-Id: Ic54f0cbc895de8ba038cb581d055287768c1e23a --- device-felix.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/device-felix.mk b/device-felix.mk index 1b5d82b..d0909c7 100644 --- a/device-felix.mk +++ b/device-felix.mk @@ -112,8 +112,11 @@ PRODUCT_PACKAGES += \ android.hardware.nfc-service.st \ NfcOverlayFelix -# modem_svc_sit daemon -PRODUCT_PACKAGES += modem_svc_sit +# Shared Modem Platform +SHARED_MODEM_PLATFORM_VENDOR := lassen + +# Shared Modem Platform +include device/google/gs-common/modem/shared_modem_platform/shared_modem_platform.mk # SecureElement PRODUCT_PACKAGES += \ From c5a772a3f2961a469578a6dc5cd179025ddb6435 Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Mon, 14 Oct 2024 20:37:50 +0800 Subject: [PATCH 10/24] vibrator: correct debug() calibration file path Bug: 356823441 Test: dumpsys Flag: EXEMPT bugfix Change-Id: I2d126e63ae7365b4bd199d00776f10b11c700702 --- vibrator/common/HardwareBase.cpp | 16 ++++++++++++---- vibrator/common/HardwareBase.h | 1 + vibrator/cs40l26/Vibrator.cpp | 6 +++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/vibrator/common/HardwareBase.cpp b/vibrator/common/HardwareBase.cpp index 329293a..583caaa 100644 --- a/vibrator/common/HardwareBase.cpp +++ b/vibrator/common/HardwareBase.cpp @@ -69,6 +69,7 @@ HwCalBase::HwCalBase() { std::ifstream calfile; std::ifstream calfile_dual; auto propertyPrefix = std::getenv("PROPERTY_PREFIX"); + auto calPath = std::getenv("CALIBRATION_FILEPATH"); if (propertyPrefix != NULL) { mPropertyPrefix = std::string(propertyPrefix); @@ -76,6 +77,14 @@ HwCalBase::HwCalBase() { ALOGE("Failed get property prefix!"); } + // Keep the cal file path for the current HwCalBase instance. + if (calPath != NULL) { + mCalPath = std::string(calPath); + } else { + ALOGE("Failed get the calibration file path!"); + } + + // Read the cal data for the current instance. utils::fileFromEnv("CALIBRATION_FILEPATH", &calfile); for (std::string line; std::getline(calfile, line);) { @@ -89,6 +98,7 @@ HwCalBase::HwCalBase() { } } + // Read the cal data for the other instance. utils::fileFromEnv("CALIBRATION_FILEPATH_DUAL", &calfile_dual); for (std::string line; std::getline(calfile_dual, line);) { @@ -106,7 +116,6 @@ HwCalBase::HwCalBase() { void HwCalBase::debug(int fd) { std::ifstream stream; - std::string path; std::string line; struct context { HwCalBase *obj; @@ -133,9 +142,8 @@ void HwCalBase::debug(int fd) { dprintf(fd, "Persist:\n"); - utils::fileFromEnv("CALIBRATION_FILEPATH", &stream, &path); - - dprintf(fd, " %s:\n", path.c_str()); + utils::openNoCreate(mCalPath, &stream); + dprintf(fd, " %s:\n", mCalPath.c_str()); while (std::getline(stream, line)) { dprintf(fd, " %s\n", line.c_str()); } diff --git a/vibrator/common/HardwareBase.h b/vibrator/common/HardwareBase.h index f09fada..0296390 100644 --- a/vibrator/common/HardwareBase.h +++ b/vibrator/common/HardwareBase.h @@ -208,6 +208,7 @@ class HwCalBase { private: std::string mPropertyPrefix; + std::string mCalPath; std::map mCalData; }; diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index 8543bf0..e091571 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -1081,7 +1081,7 @@ ndk::ScopedAStatus Vibrator::on(uint32_t timeoutMs, uint32_t effectIndex, const if (mIsDual) { mHwApiDual->getOwtFreeSpace(&freeBytes); if (ch-> size() > freeBytes) { - ALOGE("Invalid OWT length in flip: Effect %d: %d > %d!", effectIndex, + ALOGE("Invalid OWT length in flip: Effect %d: %zu > %d!", effectIndex, ch-> size(), freeBytes); return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } @@ -1619,12 +1619,16 @@ binder_status_t Vibrator::dump(int fd, const char **args, uint32_t numArgs) { verFile.close(); } + dprintf(fd, "\n"); + mHwApiDef->debug(fd); dprintf(fd, "\n"); mHwCalDef->debug(fd); + dprintf(fd, "\n"); + if (mIsDual) { mHwApiDual->debug(fd); dprintf(fd, "\n"); From 3f7ccdf45fe49fddbad817deade85ac19641171b Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Wed, 16 Oct 2024 00:33:13 +0800 Subject: [PATCH 11/24] Update OWNERS Bug: 362659323 Test: N/A Flag: EXEMPT OWNERS change Change-Id: I6e2148448f1105933d66cec57cb879054657eeda --- vibrator/OWNERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vibrator/OWNERS b/vibrator/OWNERS index dec74a8..fc59b13 100644 --- a/vibrator/OWNERS +++ b/vibrator/OWNERS @@ -1 +1,3 @@ -file:platform/hardware/google/pixel:/vibrator/OWNERS +chrispaulo@google.com +nathankulczak@google.com +taikuo@google.com From 0f940132a1268cbd03b45cd7e0c6af7c4654b851 Mon Sep 17 00:00:00 2001 From: Dmitri Plotnikov Date: Fri, 18 Oct 2024 16:12:02 -0700 Subject: [PATCH 12/24] Add power profile config to reflect the presence of two displays Bug: 363857767 Test: adb shell dumpsys batterystats Flag: EXEMPT_bugfix Change-Id: I14add1339ef418b89201bc56c1b9cec80f3afc79 --- .../frameworks/base/core/res/res/xml/power_profile.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/felix/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/felix/overlay/frameworks/base/core/res/res/xml/power_profile.xml index b633087..1c8a7e5 100644 --- a/felix/overlay/frameworks/base/core/res/res/xml/power_profile.xml +++ b/felix/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -151,13 +151,17 @@ - 32 + 32 + 32 - 98 + 98 + 98 + - 470 + 470 + 470 240.47 From 0b3cc7ea7b3eb80e24b184b2c3ec6a633f70de3d Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Mon, 21 Oct 2024 11:40:03 +0800 Subject: [PATCH 13/24] cs40l26: organize dump() AIDL section Bug: 356823441 Test: dumpsys android.hardware.vibrator.IVibrator/default Flag: EXEMPT refactor Change-Id: Ie14e60482c3e6763921dc22f804155cd6f3b9fcd --- vibrator/cs40l26/Vibrator.cpp | 49 ++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index e091571..89bd146 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -1482,40 +1482,31 @@ binder_status_t Vibrator::dump(int fd, const char **args, uint32_t numArgs) { dprintf(fd, " Redc: %.02f\n", mRedc); dprintf(fd, " Voltage Levels:\n"); - dprintf(fd, " Tick Effect Min: %" PRIu32 " Max: %" PRIu32 "\n", mTickEffectVol[0], + dprintf(fd, " Tick Effect Min: %" PRIu32 " Max: %" PRIu32 "\n", mTickEffectVol[0], mTickEffectVol[1]); - dprintf(fd, " Click Effect Min: %" PRIu32 " Max: %" PRIu32 "\n", mClickEffectVol[0], + dprintf(fd, " Click Effect Min: %" PRIu32 " Max: %" PRIu32 "\n", mClickEffectVol[0], mClickEffectVol[1]); - dprintf(fd, " Long Effect Min: %" PRIu32 " Max: %" PRIu32 "\n", mLongEffectVol[0], + dprintf(fd, " Long Effect Min: %" PRIu32 " Max: %" PRIu32 "\n", mLongEffectVol[0], mLongEffectVol[1]); - dprintf(fd, " FF effect:\n"); - dprintf(fd, " Physical waveform:\n"); - dprintf(fd, "==== Base ====\n\tId\tIndex\tt ->\tt'\tBrake\ttrigger button\n"); uint8_t effectId; + dprintf(fd, " Scales\n"); + dprintf(fd, "\tId\tMinScale\tMaxScale\n"); + for (effectId = 0; effectId < WAVEFORM_MAX_PHYSICAL_INDEX; effectId++) { + dprintf(fd, "\t%d\t%d\t\t%d\n", effectId, mPrimitiveMinScale[effectId], + mPrimitiveMaxScale[effectId]); + } + + dprintf(fd, " Base FF effect:\n"); + dprintf(fd, " Physical waveform:\n"); + dprintf(fd, "\tId\tIndex\tt ->\tt'\tBrake\ttrigger button\n"); for (effectId = 0; effectId < WAVEFORM_MAX_PHYSICAL_INDEX; effectId++) { dprintf(fd, "\t%d\t%d\t%d\t%d\t%d\t%X\n", mFfEffects[effectId].id, mFfEffects[effectId].u.periodic.custom_data[1], mEffectDurations[effectId], mFfEffects[effectId].replay.length, mEffectBrakingDurations[effectId], mFfEffects[effectId].trigger.button); } - if (mIsDual) { - dprintf(fd, "==== Flip ====\n\tId\tIndex\tt ->\tt'\tBrake\ttrigger button\n"); - for (effectId = 0; effectId < WAVEFORM_MAX_PHYSICAL_INDEX; effectId++) { - dprintf(fd, "\t%d\t%d\t%d\t%d\t%d\t%X\n", mFfEffectsDual[effectId].id, - mFfEffectsDual[effectId].u.periodic.custom_data[1], mEffectDurations[effectId], - mFfEffectsDual[effectId].replay.length, mEffectBrakingDurations[effectId], - mFfEffectsDual[effectId].trigger.button); - } - } - - dprintf(fd, "==== Scales ====\n\tId\tMinScale\tMaxScale\n"); - for (effectId = 0; effectId < WAVEFORM_MAX_PHYSICAL_INDEX; effectId++) { - dprintf(fd, "\t%d\t%d\t\t%d\n", effectId, mPrimitiveMinScale[effectId], - mPrimitiveMaxScale[effectId]); - } - - dprintf(fd, "\nBase: OWT waveform:\n"); + dprintf(fd, " OWT waveform:\n"); dprintf(fd, "\tId\tBytes\tData\tt\ttrigger button\n"); for (effectId = WAVEFORM_MAX_PHYSICAL_INDEX; effectId < WAVEFORM_MAX_INDEX; effectId++) { uint32_t numBytes = mFfEffects[effectId].u.periodic.custom_len * 2; @@ -1531,8 +1522,18 @@ binder_status_t Vibrator::dump(int fd, const char **args, uint32_t numArgs) { dprintf(fd, "\t%d\t%d\t{%s}\t%u\t%X\n", mFfEffects[effectId].id, numBytes, ss.str().c_str(), mFfEffectsDual[effectId].replay.length, mFfEffects[effectId].trigger.button); } + if (mIsDual) { - dprintf(fd, "Flip: OWT waveform:\n"); + dprintf(fd, " Flip FF effect:\n"); + dprintf(fd, " Physical waveform:\n"); + dprintf(fd, "\tId\tIndex\tt ->\tt'\tBrake\ttrigger button\n"); + for (effectId = 0; effectId < WAVEFORM_MAX_PHYSICAL_INDEX; effectId++) { + dprintf(fd, "\t%d\t%d\t%d\t%d\t%d\t%X\n", mFfEffectsDual[effectId].id, + mFfEffectsDual[effectId].u.periodic.custom_data[1], mEffectDurations[effectId], + mFfEffectsDual[effectId].replay.length, mEffectBrakingDurations[effectId], + mFfEffectsDual[effectId].trigger.button); + } + dprintf(fd, " OWT waveform:\n"); dprintf(fd, "\tId\tBytes\tData\tt\ttrigger button\n"); for (effectId = WAVEFORM_MAX_PHYSICAL_INDEX; effectId < WAVEFORM_MAX_INDEX; effectId++) { uint32_t numBytes = mFfEffectsDual[effectId].u.periodic.custom_len * 2; From 46065a44625e1d9535918a8f29ada33679219e4a Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Thu, 1 Feb 2024 15:22:37 +0800 Subject: [PATCH 14/24] vibrator/cs40l26: update default scales of click, tick and long vib Flow: 1. If the calibration file exist, use the value. 2. If no property, use the default setting {5,95}. Bug: 356823441 Bug: 322937989 Test: Check dumpsys records for the scaling results. case1: no calibration file and properties. case2: valid property range case3: float property (invalid) Flag: EXEMPT bugfix Change-Id: Ia3e89f34189e9725ab01d85d931925129745608c (cherry picked from commit 4063493a64fcd0f20b49a492106f58b0e3349c5c) --- vibrator/common/utils.h | 13 +++++++++++++ vibrator/cs40l26/Hardware.h | 15 ++++++--------- vibrator/cs40l26/tests/test-hwcal.cpp | 6 +++--- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/vibrator/common/utils.h b/vibrator/common/utils.h index 86dd37e..b5005a6 100644 --- a/vibrator/common/utils.h +++ b/vibrator/common/utils.h @@ -103,6 +103,19 @@ inline Enable_If_Unsigned getProperty(const std::string &key, const T def) return ::android::base::GetUintProperty(key, def); } +template +inline std::array getProperty(const std::string &key, const std::array &def) { + std::string value = ::android::base::GetProperty(key, ""); + if (!value.empty()) { + std::array result{0}; + std::stringstream stream{value}; + utils::unpack(stream, &result); + if (stream && stream.eof()) + return result; + } + return def; +} + template <> inline bool getProperty(const std::string &key, const bool def) { return ::android::base::GetBoolProperty(key, def); diff --git a/vibrator/cs40l26/Hardware.h b/vibrator/cs40l26/Hardware.h index e2c2d36..e4dd344 100644 --- a/vibrator/cs40l26/Hardware.h +++ b/vibrator/cs40l26/Hardware.h @@ -318,9 +318,9 @@ class HwCal : public Vibrator::HwCal, private HwCalBase { static constexpr uint32_t VERSION_DEFAULT = 2; static constexpr int32_t DEFAULT_FREQUENCY_SHIFT = 0; - static constexpr std::array V_TICK_DEFAULT = {1, 100}; - static constexpr std::array V_CLICK_DEFAULT = {1, 100}; - static constexpr std::array V_LONG_DEFAULT = {1, 100}; + static constexpr std::array V_TICK_DEFAULT = {5, 95}; + static constexpr std::array V_CLICK_DEFAULT = {5, 95}; + static constexpr std::array V_LONG_DEFAULT = {5, 95}; public: HwCal() {} @@ -370,22 +370,19 @@ class HwCal : public Vibrator::HwCal, private HwCalBase { if (getPersist(TICK_VOLTAGES_CONFIG, value)) { return true; } - *value = V_TICK_DEFAULT; - return true; + return getProperty(TICK_VOLTAGES_CONFIG, value, V_TICK_DEFAULT); } bool getClickVolLevels(std::array *value) override { if (getPersist(CLICK_VOLTAGES_CONFIG, value)) { return true; } - *value = V_CLICK_DEFAULT; - return true; + return getProperty(CLICK_VOLTAGES_CONFIG, value, V_CLICK_DEFAULT); } bool getLongVolLevels(std::array *value) override { if (getPersist(LONG_VOLTAGES_CONFIG, value)) { return true; } - *value = V_LONG_DEFAULT; - return true; + return getProperty(LONG_VOLTAGES_CONFIG, value, V_LONG_DEFAULT); } bool isChirpEnabled() override { return utils::getProperty("persist.vendor.vibrator.hal.chirp.enabled", false); diff --git a/vibrator/cs40l26/tests/test-hwcal.cpp b/vibrator/cs40l26/tests/test-hwcal.cpp index e482b6c..5223c85 100644 --- a/vibrator/cs40l26/tests/test-hwcal.cpp +++ b/vibrator/cs40l26/tests/test-hwcal.cpp @@ -30,9 +30,9 @@ using ::testing::Test; class HwCalTest : public Test { protected: - static constexpr std::array V_TICK_DEFAULT = {1, 100}; - static constexpr std::array V_CLICK_DEFAULT = {1, 100}; - static constexpr std::array V_LONG_DEFAULT = {1, 100}; + static constexpr std::array V_TICK_DEFAULT = {5, 95}; + static constexpr std::array V_CLICK_DEFAULT = {5, 95}; + static constexpr std::array V_LONG_DEFAULT = {5, 95}; public: void SetUp() override { setenv("CALIBRATION_FILEPATH", mCalFile.path, true); } From f669a1ea526da4a6d674019431bbeed67ced50d2 Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Mon, 21 Oct 2024 11:44:38 +0800 Subject: [PATCH 15/24] cs40l26: add DBC bin info and reduce duplicates Bug: 356823441 Test: dumpsys android.hardware.vibrator.IVibrator/default Flag: EXEMPT bugfix Change-Id: Id3d9fac99b204de581269818e69722932e4911fc (cherry picked from commit 6e4e8d2052e352a56eeab2e452addaf484d79d9f) --- vibrator/cs40l26/Vibrator.cpp | 83 ++++++++++++++--------------------- 1 file changed, 34 insertions(+), 49 deletions(-) diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index 89bd146..6c3c84b 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -1554,70 +1554,55 @@ binder_status_t Vibrator::dump(int fd, const char **args, uint32_t numArgs) { dprintf(fd, "\n"); dprintf(fd, "Versions:\n"); + const std::vector> moduleFolderNames = { + {"cs40l26_core", "Haptics"}, {"cl_dsp_core", "DSP"}}; + const std::string firmwareFolder = "/vendor/firmware/"; + const std::string waveformName = "cs40l26.bin"; + const std::array firmwareFileNames = {"cs40l26.wmfw", "cs40l26-calib.wmfw"}; + const std::array tuningFileNames = {"cs40l26-svc.bin", "cs40l26-calib.bin", + "cs40l26-dvl.bin", "cs40l26-dbc.bin"}; std::ifstream verFile; const auto verBinFileMode = std::ifstream::in | std::ifstream::binary; std::string ver; - verFile.open("/sys/module/cs40l26_core/version"); - if (verFile.is_open()) { - getline(verFile, ver); - dprintf(fd, " Haptics Driver: %s\n", ver.c_str()); - verFile.close(); + for (const auto &[folder, logTag] : moduleFolderNames) { + verFile.open("/sys/module/" + folder + "/version"); + if (verFile.is_open()) { + getline(verFile, ver); + dprintf(fd, " %s Driver: %s\n", logTag.c_str(), ver.c_str()); + verFile.close(); + } } - verFile.open("/sys/module/cl_dsp_core/version"); - if (verFile.is_open()) { - getline(verFile, ver); - dprintf(fd, " DSP Driver: %s\n", ver.c_str()); - verFile.close(); + for (auto &name : firmwareFileNames) { + verFile.open(firmwareFolder + name, verBinFileMode); + if (verFile.is_open()) { + verFile.seekg(113); + dprintf(fd, " %s: %d.%d.%d\n", name.c_str(), verFile.get(), verFile.get(), + verFile.get()); + verFile.close(); + } } - verFile.open("/vendor/firmware/cs40l26.wmfw", verBinFileMode); - if (verFile.is_open()) { - verFile.seekg(113); - dprintf(fd, " cs40l26.wmfw: %d.%d.%d\n", verFile.get(), verFile.get(), verFile.get()); - verFile.close(); - } - verFile.open("/vendor/firmware/cs40l26-calib.wmfw", verBinFileMode); - if (verFile.is_open()) { - verFile.seekg(113); - dprintf(fd, " cs40l26-calib.wmfw: %d.%d.%d\n", verFile.get(), verFile.get(), - verFile.get()); - verFile.close(); - } - verFile.open("/vendor/firmware/cs40l26.bin", verBinFileMode); + verFile.open(firmwareFolder + waveformName, verBinFileMode); if (verFile.is_open()) { while (getline(verFile, ver)) { auto pos = ver.find("Date: "); if (pos != std::string::npos) { ver = ver.substr(pos + 6, pos + 15); - dprintf(fd, " cs40l26.bin: %s\n", ver.c_str()); + dprintf(fd, " %s: %s\n", waveformName.c_str(), ver.c_str()); break; } } verFile.close(); } - verFile.open("/vendor/firmware/cs40l26-svc.bin", verBinFileMode); - if (verFile.is_open()) { - verFile.seekg(36); - getline(verFile, ver); - ver = ver.substr(ver.rfind('\\') + 1); - dprintf(fd, " cs40l26-svc.bin: %s\n", ver.c_str()); - verFile.close(); - } - verFile.open("/vendor/firmware/cs40l26-calib.bin", verBinFileMode); - if (verFile.is_open()) { - verFile.seekg(36); - getline(verFile, ver); - ver = ver.substr(ver.rfind('\\') + 1); - dprintf(fd, " cs40l26-calib.bin: %s\n", ver.c_str()); - verFile.close(); - } - verFile.open("/vendor/firmware/cs40l26-dvl.bin", verBinFileMode); - if (verFile.is_open()) { - verFile.seekg(36); - getline(verFile, ver); - ver = ver.substr(0, ver.find('\0') + 1); - ver = ver.substr(ver.rfind('\\') + 1); - dprintf(fd, " cs40l26-dvl.bin: %s\n", ver.c_str()); - verFile.close(); + for (auto &name : tuningFileNames) { + verFile.open(firmwareFolder + name, verBinFileMode); + if (verFile.is_open()) { + verFile.seekg(36); + getline(verFile, ver); + ver = ver.substr(0, ver.find(".bin") + 4); + ver = ver.substr(ver.rfind('\\') + 1); + dprintf(fd, " %s: %s\n", name.c_str(), ver.c_str()); + verFile.close(); + } } dprintf(fd, "\n"); From 2b7642486bf9f9e456b35622f1a95bba6b8bc1c5 Mon Sep 17 00:00:00 2001 From: Zouberou Sayibou Date: Wed, 23 Oct 2024 00:01:38 +0000 Subject: [PATCH 16/24] Felix HAL: Fixed VibratorTest unit tests errors. Fixed Felix HAL VibratorHalCs40l26TestSuitePrivate 3 failed tests: - VibratorTest#on - VibratorTest#perform/CLICK_LIGHT, - VibratorTest#perform/HEAVY_CLICK_STRONG. Moving the mActiveId_mutex to a global variable caused issues with the #perform/HEAVY_CLICK_STRONG test failing to call the HwApi and the #perform/CLICK_LIGHT test failing due to an outdated timeout value. Additionally, the intensifyToVolLevel function was returning an incorrect value, requiring a check to be added to the testing function. Bug: 373761684 Flag: TEST_ONLY Test: Ran VibratorHalCs40l26TestSuitePrivate. Change-Id: Ibcdbc874c5c96644f3f647cc240b5012907253d4 Signed-off-by: Zouberou Sayibou --- vibrator/cs40l26/Vibrator.cpp | 3 ++- vibrator/cs40l26/Vibrator.h | 1 - vibrator/cs40l26/tests/test-vibrator.cpp | 32 ++++++++++++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp index 8543bf0..8876cd6 100644 --- a/vibrator/cs40l26/Vibrator.cpp +++ b/vibrator/cs40l26/Vibrator.cpp @@ -195,6 +195,8 @@ enum vibe_state { VIBE_STATE_ASP, }; +std::mutex mActiveId_mutex; // protects mActiveId + class DspMemChunk { private: std::unique_ptr head; @@ -1930,7 +1932,6 @@ uint32_t Vibrator::intensityToVolLevel(float intensity, uint32_t effectIndex) { volLevel = calc(intensity, mClickEffectVol); break; } - // The waveform being played must fall within the allowable scale range if (effectIndex < WAVEFORM_MAX_INDEX) { if (volLevel > mPrimitiveMaxScale[effectIndex]) { diff --git a/vibrator/cs40l26/Vibrator.h b/vibrator/cs40l26/Vibrator.h index a61cea9..6fc3a3d 100644 --- a/vibrator/cs40l26/Vibrator.h +++ b/vibrator/cs40l26/Vibrator.h @@ -250,7 +250,6 @@ class Vibrator : public BnVibrator { bool mConfigHapticAlsaDeviceDone{false}; bool mGPIOStatus; bool mIsDual{false}; - std::mutex mActiveId_mutex; // protects mActiveId }; } // namespace vibrator diff --git a/vibrator/cs40l26/tests/test-vibrator.cpp b/vibrator/cs40l26/tests/test-vibrator.cpp index 6c8cebb..b9b5b3c 100644 --- a/vibrator/cs40l26/tests/test-vibrator.cpp +++ b/vibrator/cs40l26/tests/test-vibrator.cpp @@ -87,7 +87,7 @@ static const std::map EFFECT_INDEX{ static constexpr uint32_t MIN_ON_OFF_INTERVAL_US = 8500; static constexpr uint8_t VOLTAGE_SCALE_MAX = 100; static constexpr int8_t MAX_COLD_START_LATENCY_MS = 6; // I2C Transaction + DSP Return-From-Standby -static constexpr auto POLLING_TIMEOUT = 20; +static constexpr auto POLLING_TIMEOUT = 50; enum WaveformIndex : uint16_t { /* Physical waveform */ WAVEFORM_LONG_VIBRATION_EFFECT_INDEX = 0, @@ -506,6 +506,23 @@ TEST_P(EffectsTest, perform) { promise.set_value(); return ndk::ScopedAStatus::ok(); }; + std::vector primitiveMaxScale; + std::vector primitiveMinScale; + primitiveMaxScale.resize(WAVEFORM_MAX_INDEX, 100); + primitiveMaxScale[WAVEFORM_CLICK_INDEX] = 95; + primitiveMaxScale[WAVEFORM_THUD_INDEX] = 75; + primitiveMaxScale[WAVEFORM_SPIN_INDEX] = 90; + primitiveMaxScale[WAVEFORM_LIGHT_TICK_INDEX] = 75; + primitiveMaxScale[WAVEFORM_LOW_TICK_INDEX] = 75; + + primitiveMinScale.resize(WAVEFORM_MAX_INDEX, 0); + primitiveMinScale[WAVEFORM_CLICK_INDEX] = 1; + primitiveMinScale[WAVEFORM_THUD_INDEX] = 11; + primitiveMinScale[WAVEFORM_SPIN_INDEX] = 23; + primitiveMinScale[WAVEFORM_SLOW_RISE_INDEX] = 25; + primitiveMinScale[WAVEFORM_QUICK_FALL_INDEX] = 2; + primitiveMinScale[WAVEFORM_LIGHT_TICK_INDEX] = 3; + primitiveMinScale[WAVEFORM_LOW_TICK_INDEX] = 16; bool composeEffect; ExpectationSet eSetup; @@ -515,7 +532,18 @@ TEST_P(EffectsTest, perform) { EffectIndex index = EFFECT_INDEX.at(effect); duration = EFFECT_DURATIONS[index]; - eSetup += EXPECT_CALL(*mMockApi, setFFGain(_, levelToScale(scale->second))) + auto updatedScale = levelToScale(scale->second); + + if (index < WAVEFORM_MAX_INDEX) { + if (updatedScale > primitiveMaxScale[index]) { + updatedScale = primitiveMaxScale[index]; + } + if (updatedScale < primitiveMinScale[index]) { + updatedScale = primitiveMinScale[index]; + } + } + + eSetup += EXPECT_CALL(*mMockApi, setFFGain(_, updatedScale)) .WillOnce(DoDefault()); eActivate = EXPECT_CALL(*mMockApi, setFFPlay(_, index, true)) .After(eSetup) From ccd324c4b338199ad8d77a877648504a8e00dad4 Mon Sep 17 00:00:00 2001 From: Kyle Hsiao Date: Tue, 5 Nov 2024 03:03:40 +0000 Subject: [PATCH 17/24] Update ISODEP routing setting Bug: 323953256 Test: manual Flag: EXEMPT bugfix Change-Id: Ic809f837493ea92b47545dde7b5cf7c52831326f --- nfc/libnfc-hal-st.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfc/libnfc-hal-st.conf b/nfc/libnfc-hal-st.conf index 7300e21..ac8c20d 100644 --- a/nfc/libnfc-hal-st.conf +++ b/nfc/libnfc-hal-st.conf @@ -135,7 +135,7 @@ OFFHOST_ROUTE_ESE={86} # host 0x00 # eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE) # UICC 0x81 (UICC_1), 0x85 (UICC_2) -DEFAULT_ISODEP_ROUTE=0x81 +DEFAULT_ISODEP_ROUTE=0x00 ############################################################################### # Configure the HAL Clock control From 11690d6960fe978b3bf1aace9f4ff42657125588 Mon Sep 17 00:00:00 2001 From: millerliang Date: Fri, 8 Nov 2024 09:21:34 +0000 Subject: [PATCH 18/24] audio: fix cts AAudioTests failed on GSI image Set all the audio policy configuration files to the correct format for mmap-playback. Flag: EXEMPT bugfix Bug: 372047634 Test: Manual Test Change-Id: I091b7360fabb60990b60210bd7417179f5c319eb Signed-off-by: millerliang --- .../config/audio_policy_configuration_a2dp_offload_disabled.xml | 2 +- .../config/audio_policy_configuration_bluetooth_legacy_hal.xml | 2 +- .../config/audio_policy_configuration_le_offload_disabled.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/felix/config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/felix/config/audio_policy_configuration_a2dp_offload_disabled.xml index da6c7a7..5b97dd8 100644 --- a/audio/felix/config/audio_policy_configuration_a2dp_offload_disabled.xml +++ b/audio/felix/config/audio_policy_configuration_a2dp_offload_disabled.xml @@ -59,7 +59,7 @@ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> - diff --git a/audio/felix/config/audio_policy_configuration_bluetooth_legacy_hal.xml b/audio/felix/config/audio_policy_configuration_bluetooth_legacy_hal.xml index 416d4ab..fb54198 100644 --- a/audio/felix/config/audio_policy_configuration_bluetooth_legacy_hal.xml +++ b/audio/felix/config/audio_policy_configuration_bluetooth_legacy_hal.xml @@ -59,7 +59,7 @@ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> - - From 067d8c641d73da56687206099250801f89dce2c2 Mon Sep 17 00:00:00 2001 From: Isaac Chiou Date: Fri, 1 Nov 2024 07:15:37 +0000 Subject: [PATCH 19/24] Disable Wifi BugReport for subsystem restart Flag: EXEMPT gated by overlay Bug: 373594936 Test: Manuel test, trigger SSR and won't create bugreport automatically Change-Id: If4b749b933d305e35b8bff689c08ebd080243c2c --- rro_overlays/WifiOverlay/res/values/config.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml index 989a868..c75c66e 100644 --- a/rro_overlays/WifiOverlay/res/values/config.xml +++ b/rro_overlays/WifiOverlay/res/values/config.xml @@ -181,4 +181,6 @@ false: firmware roaming will not be affected. --> true + + false From 32313267f5d2e1f68367041239f1e1171a1e0c57 Mon Sep 17 00:00:00 2001 From: Barry Date: Mon, 25 Nov 2024 02:09:40 +0000 Subject: [PATCH 20/24] Update F10 Bluetooth LEA unicast allowlist: Samsung Galaxy Buds 3 pro Add Samsung Galaxy Buds 3 pro into unicast default allowlist. bug: 380369260 Test: PTE PQM-BT LE audio unicast test Flag: EXEMPT The Samsung Galaxy Buds 3 pro users are able to disable LE audio in Settings app Change-Id: Ib96037f904f9326cbf9a46c09496b27955e3df68 --- device-felix.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-felix.mk b/device-felix.mk index 69e4375..99af1cc 100644 --- a/device-felix.mk +++ b/device-felix.mk @@ -423,7 +423,7 @@ PRODUCT_COPY_FILES += \ # LE Audio Unicast Allowlist PRODUCT_PRODUCT_PROPERTIES += \ - persist.bluetooth.leaudio.allow_list=SM-R510,WF-1000XM5 + persist.bluetooth.leaudio.allow_list=SM-R510,WF-1000XM5,SM-R630 # Bluetooth EWP test tool PRODUCT_PACKAGES_DEBUG += \ From 0b7eb46d12a352dbb96b5765aa2032e43522b422 Mon Sep 17 00:00:00 2001 From: Chungkai Mei Date: Mon, 25 Nov 2024 09:53:09 +0000 Subject: [PATCH 21/24] Enable TAPreferHighCap for first frame we already saw some janks caused by longer runnable time. so Enable TAPreferIdle for first frame Bug: 372168866 Flag: NONE powerhint do not support flag Change-Id: I01f699abd1eaed5760789d6c0788cbe4791e2b13 Signed-off-by: Chungkai Mei --- powerhint.json | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/powerhint.json b/powerhint.json index 1a5bb71..2074a8e 100644 --- a/powerhint.json +++ b/powerhint.json @@ -879,24 +879,30 @@ "Duration": 5000, "Value": "0" }, - { - "PowerHint": "CPU_LOAD_RESET", - "Node": "GPUMinFreq", - "Duration": 50, - "Value": "302000" - }, { "PowerHint": "DISPLAY_INACTIVE", "Node": "MemFreq", "Duration": 0, "Value": "421000" }, + { + "PowerHint": "CPU_LOAD_RESET", + "Node": "GPUMinFreq", + "Duration": 50, + "Value": "302000" + }, { "PowerHint": "CPU_LOAD_RESET", "Node": "MemFreq", "Duration": 33, "Value": "1014000" }, + { + "PowerHint": "CPU_LOAD_RESET", + "Node": "TAPreferHighCap", + "Duration": 33, + "Value": "1" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "MemFreq", From c8208e32b6e42eb425637298fd7a46f166a8c737 Mon Sep 17 00:00:00 2001 From: Zouberou Sayibou Date: Sun, 1 Dec 2024 04:31:35 +0000 Subject: [PATCH 22/24] felix/haptics: Remove voltage restriction for haptics Remove the voltage restriction for haptics since DVL is enabled. This will allow FW control for exertion protection of the motor, and allow for stronger output for audio-haptics. Bug: 318476589 Flag: EXEMPT config json change Test: dumpsys vibrator_manager and accel measurement Change-Id: I2263206a423c7731f930c213e68c7fb9fd8d6a3a Signed-off-by: Zouberou Sayibou --- felix/overlay/frameworks/base/core/res/res/values/config.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/felix/overlay/frameworks/base/core/res/res/values/config.xml b/felix/overlay/frameworks/base/core/res/res/values/config.xml index bf2d14e..0cc580b 100644 --- a/felix/overlay/frameworks/base/core/res/res/values/config.xml +++ b/felix/overlay/frameworks/base/core/res/res/values/config.xml @@ -192,8 +192,6 @@ http://www.gstatic.com/android/sms/G9FPL.xml - - 0.39 From a4f300967608d9059e11ad22433175b82fbbe850 Mon Sep 17 00:00:00 2001 From: Zouberou Sayibou Date: Tue, 3 Dec 2024 02:47:11 +0000 Subject: [PATCH 23/24] Revert "felix/haptics: Remove voltage restriction for haptics" Revert submission 30661505-tdm_amplitude_limitation_removal_dvl Reason for revert: short time to properly test before 25q1 cut-off. Reverted changes: /q/submissionid:30661505-tdm_amplitude_limitation_removal_dvl Bug: 318476589 Change-Id: I0e4043be9b4d96b75234fbd160bad6a5b4eab7e1 --- felix/overlay/frameworks/base/core/res/res/values/config.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/felix/overlay/frameworks/base/core/res/res/values/config.xml b/felix/overlay/frameworks/base/core/res/res/values/config.xml index 0cc580b..bf2d14e 100644 --- a/felix/overlay/frameworks/base/core/res/res/values/config.xml +++ b/felix/overlay/frameworks/base/core/res/res/values/config.xml @@ -192,6 +192,8 @@ http://www.gstatic.com/android/sms/G9FPL.xml + + 0.39 From f62bd8d2e28997bbed1922d64c00bf90e04e870c Mon Sep 17 00:00:00 2001 From: Eileen Lai Date: Sun, 8 Dec 2024 07:38:56 +0000 Subject: [PATCH 24/24] modem_svc: use modem_svc_sit version sepolicy For solving sepolicy conflicts for different AP version, modem_svc_sit will support devices from gs101 to zuma_pro. Bug: 372400955 Change-Id: I6f434094d9886f0aabd4df03e0d170578c15b457 Flag: NONE local testing only --- device-felix.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-felix.mk b/device-felix.mk index 8508546..8d6c3b4 100644 --- a/device-felix.mk +++ b/device-felix.mk @@ -116,7 +116,7 @@ PRODUCT_PACKAGES += \ SHARED_MODEM_PLATFORM_VENDOR := lassen # Shared Modem Platform -include device/google/gs-common/modem/shared_modem_platform/shared_modem_platform.mk +include device/google/gs-common/modem/modem_svc_sit/shared_modem_platform.mk # SecureElement PRODUCT_PACKAGES += \