Snap for 11919022 from 1e3b1303f5
to mainline-tzdata6-release
Change-Id: Ie8766af4d7b27f1e61d428dcf8913cba67f9e7c3
This commit is contained in:
commit
2fe1716cda
17 changed files with 130 additions and 97 deletions
2
OWNERS
2
OWNERS
|
@ -1,4 +1,4 @@
|
|||
per-file powerhint.json = jychen@google.com,jenhaochen@google.com,wvw@google.com,joaodias@google.com
|
||||
|
||||
# per-file for Pixel device makefiles, see go/pixel-device-mk-owner-checklist for details.
|
||||
per-file *.mk,*/BoardConfig.mk=file:device/google/gs-common:main:/OWNERS
|
||||
per-file *.mk,*/BoardConfig.mk=file:device/google/gs-common:main:/MK_OWNERS
|
||||
|
|
|
@ -1344,7 +1344,7 @@
|
|||
<path name="bluetooth-sco-headset-microphones" />
|
||||
</path>
|
||||
|
||||
<path name="usb-headset-microphones">
|
||||
<path name="usb-microphones">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="3" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2" />
|
||||
|
@ -1354,6 +1354,15 @@
|
|||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="usb-headset-microphones">
|
||||
<path name="usb-microphones" />
|
||||
</path>
|
||||
|
||||
<path name="usb-device-microphones">
|
||||
<path name="usb-microphones" />
|
||||
</path>
|
||||
|
||||
|
||||
<!-- cs35l41 specific path to load firmware in cs35l41.c -->
|
||||
<path name="cs35l41-load-protection-firmware-start">
|
||||
<!-- Enable it after get the protection firmware -->
|
||||
|
|
|
@ -19,18 +19,10 @@ $(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk)
|
|||
|
||||
TARGET_RECOVERY_DEFAULT_ROTATION := ROTATION_RIGHT
|
||||
|
||||
ifdef RELEASE_GOOGLE_FELIX_KERNEL_VERSION
|
||||
TARGET_LINUX_KERNEL_VERSION := $(RELEASE_GOOGLE_FELIX_KERNEL_VERSION)
|
||||
endif
|
||||
|
||||
ifdef RELEASE_GOOGLE_FELIX_KERNEL_DIR
|
||||
TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_FELIX_VERSION)
|
||||
# Keeps flexibility for kasan and ufs builds
|
||||
TARGET_KERNEL_DIR ?= $(RELEASE_GOOGLE_FELIX_KERNEL_DIR)
|
||||
TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_GOOGLE_FELIX_KERNEL_DIR)/kernel-headers
|
||||
else
|
||||
TARGET_KERNEL_DIR ?= device/google/felix-kernel
|
||||
TARGET_BOARD_KERNEL_HEADERS ?= device/google/felix-kernel/kernel-headers
|
||||
endif
|
||||
TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_FELIX_DIR)
|
||||
TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_FELIX_DIR)/kernel-headers
|
||||
|
||||
$(call inherit-product-if-exists, vendor/google_devices/felix/prebuilts/device-vendor-felix.mk)
|
||||
$(call inherit-product-if-exists, vendor/google_devices/gs201/prebuilts/device-vendor.mk)
|
||||
|
@ -226,9 +218,10 @@ PRODUCT_SOONG_NAMESPACES += \
|
|||
|
||||
# Increment the SVN for any official public releases
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
ro.vendor.build.svn=47
|
||||
ro.vendor.build.svn=52
|
||||
|
||||
# Vibrator HAL
|
||||
$(call soong_config_set,haptics,kernel_ver,v$(subst .,_,$(TARGET_LINUX_KERNEL_VERSION)))
|
||||
PRODUCT_VENDOR_PROPERTIES +=\
|
||||
ro.vendor.vibrator.hal.long.frequency.shift=0 \
|
||||
ro.vendor.vibrator.hal.gpio.num=44 \
|
||||
|
@ -270,13 +263,6 @@ PRODUCT_PACKAGES += \
|
|||
|
||||
# Trusty liboemcrypto.so
|
||||
PRODUCT_SOONG_NAMESPACES += vendor/google_devices/felix/prebuilts
|
||||
ifneq (,$(filter AP1%,$(RELEASE_PLATFORM_VERSION)))
|
||||
PRODUCT_SOONG_NAMESPACES += vendor/google_devices/felix/prebuilts/trusty/24Q1
|
||||
else ifneq (,$(filter AP2% AP3%,$(RELEASE_PLATFORM_VERSION)))
|
||||
PRODUCT_SOONG_NAMESPACES += vendor/google_devices/felix/prebuilts/trusty/24Q2
|
||||
else
|
||||
PRODUCT_SOONG_NAMESPACES += vendor/google_devices/felix/prebuilts/trusty/trunk
|
||||
endif
|
||||
|
||||
# Set zram size
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<compatibility-matrix version="1.0" type="framework" level="7">
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.hardware.pixel.display</name>
|
||||
<version>10</version>
|
||||
<version>11-12</version>
|
||||
<interface>
|
||||
<name>IDisplay</name>
|
||||
<instance>secondary</instance>
|
||||
|
|
|
@ -21,18 +21,15 @@ USES_DEVICE_GOOGLE_FELIX := true
|
|||
BOARD_KERNEL_CMDLINE += swiotlb=noforce
|
||||
|
||||
RELEASE_GOOGLE_PRODUCT_RADIO_DIR := $(RELEASE_GOOGLE_FELIX_RADIO_DIR)
|
||||
ifneq (,$(filter AP1%,$(RELEASE_PLATFORM_VERSION)))
|
||||
RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/24Q1
|
||||
else ifneq (,$(filter AP2% AP3%,$(RELEASE_PLATFORM_VERSION)))
|
||||
RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/24Q2
|
||||
else
|
||||
RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/trunk
|
||||
endif
|
||||
RELEASE_GOOGLE_BOOTLOADER_FELIX_DIR ?= pdk# Keep this for pdk TODO: b/327119000
|
||||
RELEASE_GOOGLE_PRODUCT_BOOTLOADER_DIR := bootloader/$(RELEASE_GOOGLE_BOOTLOADER_FELIX_DIR)
|
||||
$(call soong_config_set,felix_bootloader,prebuilt_dir,$(RELEASE_GOOGLE_BOOTLOADER_FELIX_DIR))
|
||||
|
||||
# Enable load module in parallel
|
||||
BOARD_BOOTCONFIG += androidboot.load_modules_parallel=true
|
||||
|
||||
# The modules which need to be loaded in sequential
|
||||
BOARD_KERNEL_CMDLINE += fips140.load_sequential=1
|
||||
BOARD_KERNEL_CMDLINE += exynos_drm.load_sequential=1
|
||||
BOARD_KERNEL_CMDLINE += panel-samsung-ana6707-f10.load_sequential=1
|
||||
BOARD_KERNEL_CMDLINE += s2mpg12-regulator.load_sequential=1
|
||||
|
|
|
@ -221,6 +221,9 @@
|
|||
<!-- Indicates whether to enable hinge angle sensor when using unfold animation -->
|
||||
<bool name="config_unfoldTransitionHingeAngle">true</bool>
|
||||
|
||||
<!-- Indicates whether to enable haptics during unfold animation -->
|
||||
<bool name="config_unfoldTransitionHapticsEnabled">true</bool>
|
||||
|
||||
<!-- Timeout for receiving the keyguard drawn event from System UI. -->
|
||||
<integer name="config_keyguardDrawnTimeout">1700</integer>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="AuthCredentialPatternContainerStyle">
|
||||
<style name="AuthNonBioCredentialPatternContainerStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:maxHeight">@dimen/biometric_auth_pattern_view_max_size</item>
|
||||
<item name="android:maxWidth">@dimen/biometric_auth_pattern_view_max_size</item>
|
||||
|
|
|
@ -148,5 +148,8 @@
|
|||
4 : DEVICE_POSTURE_FLIPPED
|
||||
-->
|
||||
<integer name="config_face_auth_supported_posture">1</integer>
|
||||
|
||||
<!-- Whether to use a machine learning model for back gesture falsing. -->
|
||||
<bool name="config_useBackGestureML">false</bool>
|
||||
</resources>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
730000,670000
|
||||
365000,335000
|
||||
|
||||
1810000,1835000,670000
|
||||
720000,740000,670000
|
||||
0,710000,730000
|
||||
750000,1800000,730000
|
||||
1845000,50000000,730000
|
||||
1810000,1835000,335000
|
||||
720000,740000,335000
|
||||
0,710000,365000
|
||||
750000,1800000,365000
|
||||
1845000,50000000,365000
|
||||
|
|
|
|
@ -70,7 +70,7 @@
|
|||
<gll
|
||||
PpsEnable="true"
|
||||
LogPriMask="LOG_INFO"
|
||||
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI | LOG_MEASAPI"
|
||||
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI"
|
||||
FrqPlan="FRQ_PLAN_26MHZ_2PPM_49_152MHZ_300PPB"
|
||||
MultiCarrRFMode="GL_MULTI_CARR_RF_MODE_L1_L5"
|
||||
MultiCarrLnaMask="L1_EXT_ON|L5_EXT_ON"
|
||||
|
|
|
@ -2196,16 +2196,27 @@
|
|||
"PID_Du": 0.0,
|
||||
"UclampMin_On": true,
|
||||
"UclampMin_Init": 232,
|
||||
"UclampMin_LoadUp": 480,
|
||||
"UclampMin_LoadReset": 480,
|
||||
"UclampMin_High": 480,
|
||||
"UclampMin_Low": 2,
|
||||
"UclampMax_EfficientBase": 500,
|
||||
"UclampMax_EfficientOffset": 200,
|
||||
"SamplingWindow_P": 1,
|
||||
"SamplingWindow_I": 0,
|
||||
"SamplingWindow_D": 1,
|
||||
"ReportingRateLimitNs": 83333330,
|
||||
"EarlyBoost_On": false,
|
||||
"EarlyBoost_TimeFactor": 0.0,
|
||||
"TargetTimeFactor": 1.0,
|
||||
"StaleTimeFactor": 15.0
|
||||
"StaleTimeFactor": 15.0,
|
||||
"HeuristicBoost_On": true,
|
||||
"HBoostOnMissedCycles": 8,
|
||||
"HBoostOffMaxAvgRatio": 4.0,
|
||||
"HBoostOffMissedCycles": 5,
|
||||
"HBoostPidPuFactor": 0.5,
|
||||
"HBoostUclampMin": 722,
|
||||
"JankCheckTimeFactor": 1.2,
|
||||
"LowFrameRateThreshold": 25,
|
||||
"MaxRecordsNum": 300
|
||||
},
|
||||
{
|
||||
"Name": "REFRESH_90FPS",
|
||||
|
@ -2220,16 +2231,27 @@
|
|||
"PID_Du": 0.0,
|
||||
"UclampMin_On": true,
|
||||
"UclampMin_Init": 162,
|
||||
"UclampMin_LoadUp": 480,
|
||||
"UclampMin_LoadReset": 480,
|
||||
"UclampMin_High": 480,
|
||||
"UclampMin_Low": 2,
|
||||
"UclampMax_EfficientBase": 500,
|
||||
"UclampMax_EfficientOffset": 200,
|
||||
"SamplingWindow_P": 1,
|
||||
"SamplingWindow_I": 0,
|
||||
"SamplingWindow_D": 1,
|
||||
"ReportingRateLimitNs": 111111110,
|
||||
"EarlyBoost_On": false,
|
||||
"EarlyBoost_TimeFactor": 0.0,
|
||||
"TargetTimeFactor": 1.0,
|
||||
"StaleTimeFactor": 15.0
|
||||
"StaleTimeFactor": 15.0,
|
||||
"HeuristicBoost_On": true,
|
||||
"HBoostOnMissedCycles": 8,
|
||||
"HBoostOffMaxAvgRatio": 4.0,
|
||||
"HBoostOffMissedCycles": 5,
|
||||
"HBoostPidPuFactor": 0.5,
|
||||
"HBoostUclampMin": 722,
|
||||
"JankCheckTimeFactor": 1.2,
|
||||
"LowFrameRateThreshold": 25,
|
||||
"MaxRecordsNum": 300
|
||||
},
|
||||
{
|
||||
"Name": "REFRESH_60FPS",
|
||||
|
@ -2244,16 +2266,27 @@
|
|||
"PID_Du": 0.0,
|
||||
"UclampMin_On": true,
|
||||
"UclampMin_Init": 162,
|
||||
"UclampMin_LoadUp": 480,
|
||||
"UclampMin_LoadReset": 480,
|
||||
"UclampMin_High": 480,
|
||||
"UclampMin_Low": 2,
|
||||
"UclampMax_EfficientBase": 500,
|
||||
"UclampMax_EfficientOffset": 200,
|
||||
"SamplingWindow_P": 1,
|
||||
"SamplingWindow_I": 0,
|
||||
"SamplingWindow_D": 1,
|
||||
"ReportingRateLimitNs": 166666660,
|
||||
"EarlyBoost_On": false,
|
||||
"EarlyBoost_TimeFactor": 0.0,
|
||||
"TargetTimeFactor": 1.0,
|
||||
"StaleTimeFactor": 15.0
|
||||
"StaleTimeFactor": 15.0,
|
||||
"HeuristicBoost_On": true,
|
||||
"HBoostOnMissedCycles": 8,
|
||||
"HBoostOffMaxAvgRatio": 4.0,
|
||||
"HBoostOffMissedCycles": 5,
|
||||
"HBoostPidPuFactor": 0.5,
|
||||
"HBoostUclampMin": 722,
|
||||
"JankCheckTimeFactor": 1.2,
|
||||
"LowFrameRateThreshold": 25,
|
||||
"MaxRecordsNum": 300
|
||||
},
|
||||
{
|
||||
"Name": "UiHighBoostWithoutPid",
|
||||
|
@ -2273,9 +2306,9 @@
|
|||
"UclampMin_Init": 250,
|
||||
"UclampMin_High": 197,
|
||||
"UclampMin_Low": 197,
|
||||
"UclampMax_EfficientBase": 500,
|
||||
"UclampMax_EfficientOffset": 200,
|
||||
"ReportingRateLimitNs": 1,
|
||||
"EarlyBoost_On": false,
|
||||
"EarlyBoost_TimeFactor": 0.0,
|
||||
"TargetTimeFactor": 1.0,
|
||||
"StaleTimeFactor": 5.0
|
||||
},
|
||||
|
@ -2297,9 +2330,9 @@
|
|||
"UclampMin_Init": 250,
|
||||
"UclampMin_High": 53,
|
||||
"UclampMin_Low": 53,
|
||||
"UclampMax_EfficientBase": 500,
|
||||
"UclampMax_EfficientOffset": 200,
|
||||
"ReportingRateLimitNs": 1,
|
||||
"EarlyBoost_On": false,
|
||||
"EarlyBoost_TimeFactor": 0.0,
|
||||
"TargetTimeFactor": 1.0,
|
||||
"StaleTimeFactor": 5.0
|
||||
},
|
||||
|
@ -2321,9 +2354,9 @@
|
|||
"UclampMin_Init": 250,
|
||||
"UclampMin_High": 0,
|
||||
"UclampMin_Low": 0,
|
||||
"UclampMax_EfficientBase": 500,
|
||||
"UclampMax_EfficientOffset": 200,
|
||||
"ReportingRateLimitNs": 1,
|
||||
"EarlyBoost_On": false,
|
||||
"EarlyBoost_TimeFactor": 0.0,
|
||||
"TargetTimeFactor": 1.0,
|
||||
"StaleTimeFactor": 5.0
|
||||
}
|
||||
|
|
|
@ -175,4 +175,10 @@
|
|||
If equals to 0, it means there's no limit on the max number of channels to include per network.-->
|
||||
<integer translatable="false" name="config_wifiInitialPartialScanMaxNewChannelsPerNetwork">3</integer>
|
||||
|
||||
<!-- Boolean indicating whether to disable firmware roaming when the device goes into idle mode.
|
||||
true: firmware roaming will be disabled when the device goes into idle mode, and then
|
||||
re-activated when the device exits idle mode.
|
||||
false: firmware roaming will not be affected. -->
|
||||
<bool translatable="false" name ="config_wifiDisableFirmwareRoamingInIdleMode">true</bool>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -836,36 +836,6 @@
|
|||
"HotThreshold":["NAN", "NAN", "NAN", "NAN", 12000, "NAN", "NAN"],
|
||||
"HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0],
|
||||
"Multiplier":1
|
||||
},
|
||||
{
|
||||
"Name":"soft_ocp_cpu2",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":["NAN", "NAN", "NAN", "NAN", 12000, "NAN", "NAN"],
|
||||
"HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0],
|
||||
"Multiplier":1
|
||||
},
|
||||
{
|
||||
"Name":"soft_ocp_cpu1",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":["NAN", "NAN", "NAN", "NAN", 8000, "NAN", "NAN"],
|
||||
"HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0],
|
||||
"Multiplier":1
|
||||
},
|
||||
{
|
||||
"Name":"soft_ocp_tpu",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":["NAN", "NAN", "NAN", "NAN", 8500, "NAN", "NAN"],
|
||||
"HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0],
|
||||
"Multiplier":1,
|
||||
"Hidden":true
|
||||
},
|
||||
{
|
||||
"Name":"soft_ocp_gpu",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":["NAN", "NAN", "NAN", "NAN", 9000, "NAN", "NAN"],
|
||||
"HotHysteresis":[0.0, 0.0, 0.0, 0.0, 100, 0.0, 0.0],
|
||||
"Multiplier":1,
|
||||
"Hidden":true
|
||||
}
|
||||
],
|
||||
"CoolingDevices":[
|
||||
|
|
|
@ -60,6 +60,7 @@ cc_library {
|
|||
srcs: [
|
||||
"Vibrator.cpp",
|
||||
],
|
||||
shared_libs: ["//hardware/google/pixel:PixelVibratorFlagsL26"],
|
||||
export_include_dirs: ["."],
|
||||
vendor_available: true,
|
||||
visibility: [":__subpackages__"],
|
||||
|
|
|
@ -104,18 +104,25 @@ class HwApi : public Vibrator::HwApi, private HwApiBase {
|
|||
.code = FF_GAIN,
|
||||
.value = value,
|
||||
};
|
||||
if (value > 100) {
|
||||
ALOGE("Invalid gain");
|
||||
return false;
|
||||
}
|
||||
if (write(fd, (const void *)&gain, sizeof(gain)) != sizeof(gain)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool setFFEffect(int fd, struct ff_effect *effect, uint16_t timeoutMs) override {
|
||||
if (effect == nullptr) {
|
||||
ALOGE("Invalid ff_effect");
|
||||
return false;
|
||||
}
|
||||
if (ioctl(fd, EVIOCSFF, effect) < 0) {
|
||||
ALOGE("setFFEffect fail");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool setFFPlay(int fd, int8_t index, bool value) override {
|
||||
struct input_event play = {
|
||||
|
@ -186,14 +193,17 @@ class HwApi : public Vibrator::HwApi, private HwApiBase {
|
|||
}
|
||||
bool uploadOwtEffect(int fd, const uint8_t *owtData, const uint32_t numBytes, struct ff_effect *effect,
|
||||
uint32_t *outEffectIndex, int *status) override {
|
||||
(*effect).u.periodic.custom_len = numBytes / sizeof(uint16_t);
|
||||
delete[] ((*effect).u.periodic.custom_data);
|
||||
(*effect).u.periodic.custom_data = new int16_t[(*effect).u.periodic.custom_len]{0x0000};
|
||||
if ((*effect).u.periodic.custom_data == nullptr) {
|
||||
ALOGE("Failed to allocate memory for custom data\n");
|
||||
if (owtData == nullptr || effect == nullptr || outEffectIndex == nullptr) {
|
||||
ALOGE("Invalid argument owtData, ff_effect or outEffectIndex");
|
||||
*status = EX_NULL_POINTER;
|
||||
return false;
|
||||
}
|
||||
if (status == nullptr) {
|
||||
ALOGE("Invalid argument status");
|
||||
return false;
|
||||
}
|
||||
|
||||
(*effect).u.periodic.custom_len = numBytes / sizeof(uint16_t);
|
||||
memcpy((*effect).u.periodic.custom_data, owtData, numBytes);
|
||||
|
||||
if ((*effect).id != -1) {
|
||||
|
@ -204,7 +214,6 @@ class HwApi : public Vibrator::HwApi, private HwApiBase {
|
|||
(*effect).id = -1;
|
||||
if (ioctl(fd, EVIOCSFF, effect) < 0) {
|
||||
ALOGE("Failed to upload effect %d (%d): %s", *outEffectIndex, errno, strerror(errno));
|
||||
delete[] ((*effect).u.periodic.custom_data);
|
||||
*status = EX_ILLEGAL_STATE;
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ namespace aidl {
|
|||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
static constexpr uint8_t FF_CUSTOM_DATA_LEN = 2;
|
||||
static constexpr uint16_t FF_CUSTOM_DATA_LEN_MAX_COMP = 2044; // (COMPOSE_SIZE_MAX + 1) * 8 + 4
|
||||
static constexpr uint16_t FF_CUSTOM_DATA_LEN_MAX_PWLE = 2302;
|
||||
|
||||
|
@ -488,19 +487,23 @@ Vibrator::Vibrator(std::unique_ptr<HwApi> hwApiDefault, std::unique_ptr<HwCal> h
|
|||
mEffectDurations = {
|
||||
1000, 100, 12, 1000, 300, 130, 150, 500, 100, 5, 12, 1000, 1000, 1000,
|
||||
}; /* 11+3 waveforms. The duration must < UINT16_MAX */
|
||||
mEffectCustomData.reserve(WAVEFORM_MAX_INDEX);
|
||||
|
||||
uint8_t effectIndex;
|
||||
uint16_t numBytes = 0;
|
||||
for (effectIndex = 0; effectIndex < WAVEFORM_MAX_INDEX; effectIndex++) {
|
||||
if (effectIndex < WAVEFORM_MAX_PHYSICAL_INDEX) {
|
||||
/* Initialize physical waveforms. */
|
||||
mEffectCustomData.push_back({RAM_WVFRM_BANK, effectIndex});
|
||||
mFfEffects[effectIndex] = {
|
||||
.type = FF_PERIODIC,
|
||||
.id = -1,
|
||||
// Length == 0 to allow firmware control of the duration
|
||||
.replay.length = 0,
|
||||
.u.periodic.waveform = FF_CUSTOM,
|
||||
.u.periodic.custom_data = new int16_t[2]{RAM_WVFRM_BANK, effectIndex},
|
||||
.u.periodic.custom_len = FF_CUSTOM_DATA_LEN,
|
||||
.u.periodic.custom_data = mEffectCustomData[effectIndex].data(),
|
||||
.u.periodic.custom_len =
|
||||
static_cast<uint32_t>(mEffectCustomData[effectIndex].size()),
|
||||
};
|
||||
// Bypass the waveform update due to different input name
|
||||
if ((strstr(inputEventName, "cs40l26") != nullptr) ||
|
||||
|
@ -518,12 +521,16 @@ Vibrator::Vibrator(std::unique_ptr<HwApi> hwApiDefault, std::unique_ptr<HwCal> h
|
|||
}
|
||||
} else {
|
||||
/* Initiate placeholders for OWT effects. */
|
||||
numBytes = effectIndex == WAVEFORM_COMPOSE ? FF_CUSTOM_DATA_LEN_MAX_COMP
|
||||
: FF_CUSTOM_DATA_LEN_MAX_PWLE;
|
||||
std::vector<int16_t> tempVec(numBytes, 0);
|
||||
mEffectCustomData.push_back(std::move(tempVec));
|
||||
mFfEffects[effectIndex] = {
|
||||
.type = FF_PERIODIC,
|
||||
.id = -1,
|
||||
.replay.length = 0,
|
||||
.u.periodic.waveform = FF_CUSTOM,
|
||||
.u.periodic.custom_data = nullptr,
|
||||
.u.periodic.custom_data = mEffectCustomData[effectIndex].data(),
|
||||
.u.periodic.custom_len = 0,
|
||||
};
|
||||
}
|
||||
|
@ -532,18 +539,21 @@ Vibrator::Vibrator(std::unique_ptr<HwApi> hwApiDefault, std::unique_ptr<HwCal> h
|
|||
// ====================HAL internal effect table== Flip ==================================
|
||||
if (mIsDual) {
|
||||
mFfEffectsDual.resize(WAVEFORM_MAX_INDEX);
|
||||
mEffectCustomDataDual.reserve(WAVEFORM_MAX_INDEX);
|
||||
|
||||
for (effectIndex = 0; effectIndex < WAVEFORM_MAX_INDEX; effectIndex++) {
|
||||
if (effectIndex < WAVEFORM_MAX_PHYSICAL_INDEX) {
|
||||
/* Initialize physical waveforms. */
|
||||
mEffectCustomDataDual.push_back({RAM_WVFRM_BANK, effectIndex});
|
||||
mFfEffectsDual[effectIndex] = {
|
||||
.type = FF_PERIODIC,
|
||||
.id = -1,
|
||||
// Length == 0 to allow firmware control of the duration
|
||||
.replay.length = 0,
|
||||
.u.periodic.waveform = FF_CUSTOM,
|
||||
.u.periodic.custom_data = new int16_t[2]{RAM_WVFRM_BANK, effectIndex},
|
||||
.u.periodic.custom_len = FF_CUSTOM_DATA_LEN,
|
||||
.u.periodic.custom_data = mEffectCustomDataDual[effectIndex].data(),
|
||||
.u.periodic.custom_len =
|
||||
static_cast<uint32_t>(mEffectCustomDataDual[effectIndex].size()),
|
||||
};
|
||||
// Bypass the waveform update due to different input name
|
||||
if ((strstr(inputEventName, "cs40l26") != nullptr) ||
|
||||
|
@ -563,12 +573,16 @@ Vibrator::Vibrator(std::unique_ptr<HwApi> hwApiDefault, std::unique_ptr<HwCal> h
|
|||
}
|
||||
} else {
|
||||
/* Initiate placeholders for OWT effects. */
|
||||
numBytes = effectIndex == WAVEFORM_COMPOSE ? FF_CUSTOM_DATA_LEN_MAX_COMP
|
||||
: FF_CUSTOM_DATA_LEN_MAX_PWLE;
|
||||
std::vector<int16_t> tempVec(numBytes, 0);
|
||||
mEffectCustomDataDual.push_back(std::move(tempVec));
|
||||
mFfEffectsDual[effectIndex] = {
|
||||
.type = FF_PERIODIC,
|
||||
.id = -1,
|
||||
.replay.length = 0,
|
||||
.u.periodic.waveform = FF_CUSTOM,
|
||||
.u.periodic.custom_data = nullptr,
|
||||
.u.periodic.custom_data = mEffectCustomDataDual[effectIndex].data(),
|
||||
.u.periodic.custom_len = 0,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -218,6 +218,8 @@ class Vibrator : public BnVibrator {
|
|||
std::vector<ff_effect> mFfEffects;
|
||||
std::vector<ff_effect> mFfEffectsDual;
|
||||
std::vector<uint32_t> mEffectDurations;
|
||||
std::vector<std::vector<int16_t>> mEffectCustomData;
|
||||
std::vector<std::vector<int16_t>> mEffectCustomDataDual;
|
||||
std::future<void> mAsyncHandle;
|
||||
::android::base::unique_fd mInputFd;
|
||||
::android::base::unique_fd mInputFdDual;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue