From 8d2eb868932d1128f1ce33e6bd1ed74e44d3f56f Mon Sep 17 00:00:00 2001 From: Yung Ti Su Date: Wed, 9 Feb 2022 17:46:24 +0800 Subject: audio: Switch 96K to 48K TDM speaker playback Bug: 215443626 Test: manual Signed-off-by: Yung Ti Su Change-Id: Ie96eebbdce08f4092989466508a5001918a363c9 --- audio/lynx/config/mixer_paths.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/audio/lynx/config/mixer_paths.xml b/audio/lynx/config/mixer_paths.xml index d5b41ac..38fabe4 100644 --- a/audio/lynx/config/mixer_paths.xml +++ b/audio/lynx/config/mixer_paths.xml @@ -33,10 +33,10 @@ - + - + @@ -47,8 +47,8 @@ - - + + @@ -73,8 +73,8 @@ - - + + @@ -83,8 +83,8 @@ - - + + -- cgit v1.2.3 From 1f8682bf6941dc111ff69d59d87210d8487074e8 Mon Sep 17 00:00:00 2001 From: George Chang Date: Thu, 5 May 2022 01:41:30 +0800 Subject: Switch NFC from HIDL to AIDL Bug: 216290344 Test: atest NfcNciInstrumentationTests Test: atest VtsAidlHalNfcTargetTest Change-Id: Id3f65723c6240bbae6f6cc92e7ee57e07e1f0974 --- device-lynx.mk | 3 +-- nfc/libnfc-hal-st.conf | 4 ++-- nfc/manifest_nfc.xml | 11 ----------- 3 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 nfc/manifest_nfc.xml diff --git a/device-lynx.mk b/device-lynx.mk index 5e99c00..57c264a 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -59,7 +59,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_PACKAGES += \ NfcNci \ Tag \ - android.hardware.nfc@1.2-service.st + android.hardware.nfc-service.st # SecureElement PRODUCT_PACKAGES += \ @@ -73,7 +73,6 @@ PRODUCT_COPY_FILES += \ device/google/lynx/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf DEVICE_MANIFEST_FILE += \ - device/google/lynx/nfc/manifest_nfc.xml \ device/google/lynx/nfc/manifest_se.xml # Thermal Config diff --git a/nfc/libnfc-hal-st.conf b/nfc/libnfc-hal-st.conf index 60e84ac..1a134f4 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 diff --git a/nfc/manifest_nfc.xml b/nfc/manifest_nfc.xml deleted file mode 100644 index 86caacb..0000000 --- a/nfc/manifest_nfc.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - android.hardware.nfc - hwbinder - 1.2 - - INfc - default - - - -- cgit v1.2.3 From 26240608352a2091c52e6346f84d3d1653a01497 Mon Sep 17 00:00:00 2001 From: George Chang Date: Thu, 26 May 2022 17:21:21 +0800 Subject: Remove Nfc hidl settings Nfc uses aidl now Bug: 216290344 Test: manual Change-Id: I5d1b4c47264adba2c8f517285fe603f1b4fa1188 --- manifest.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/manifest.xml b/manifest.xml index 4d4f0f8..6688f36 100644 --- a/manifest.xml +++ b/manifest.xml @@ -122,15 +122,6 @@ hwbinder @1.3::IDevice/google-edgetpu - - android.hardware.nfc - hwbinder - 1.2 - - INfc - default - - android.hardware.health hwbinder -- cgit v1.2.3 From b01989f3d740bf27fb5fed5f6f182b0cc04c8143 Mon Sep 17 00:00:00 2001 From: Jason Chang Date: Tue, 7 Jun 2022 02:26:21 +0000 Subject: Bring up the hole punch for GCA on L10 Cherry-pick the overlay resource to L10. Bug: 230552025 Test: local build passed. Change-Id: Idc0983536646928bc6d88a9f8f0d4db14b288b29 --- .../frameworks/base/core/res/res/values/config.xml | 22 ++++++ .../frameworks/base/core/res/res/values/dimens.xml | 38 ++++++++++ .../res/drawable/rounded_corner_bottom.xml | 25 +++++++ .../SystemUI/res/drawable/rounded_corner_top.xml | 25 +++++++ .../packages/SystemUI/res/values-h800dp/dimens.xml | 21 ++++++ .../packages/SystemUI/res/values-land/dimen.xml | 25 +++++++ .../base/packages/SystemUI/res/values/config.xml | 85 ++++++++++++++++++++++ .../base/packages/SystemUI/res/values/dimens.xml | 50 +++++++++++++ 8 files changed, 291 insertions(+) create mode 100644 lynx/overlay/frameworks/base/core/res/res/values/dimens.xml create mode 100644 lynx/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_bottom.xml create mode 100644 lynx/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_top.xml create mode 100644 lynx/overlay/frameworks/base/packages/SystemUI/res/values-h800dp/dimens.xml create mode 100644 lynx/overlay/frameworks/base/packages/SystemUI/res/values-land/dimen.xml create mode 100644 lynx/overlay/frameworks/base/packages/SystemUI/res/values/config.xml create mode 100644 lynx/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml diff --git a/lynx/overlay/frameworks/base/core/res/res/values/config.xml b/lynx/overlay/frameworks/base/core/res/res/values/config.xml index 58197aa..bf7b406 100644 --- a/lynx/overlay/frameworks/base/core/res/res/values/config.xml +++ b/lynx/overlay/frameworks/base/core/res/res/values/config.xml @@ -44,6 +44,28 @@ Must be in the range specified by minimum and maximum. --> 0.17429718 + + true + + + + M 507,66 + a 33,33 0 1 0 66,0 33,33 0 1 0 -66,0 + Z + @left + + + + M 480,0 + h 145 + v 118 + h -145 + Z + @left + + + + + + 47px + 47px + 48px + + + 47px + + + 28dp + 118px + 28dp + + + 5px + diff --git a/lynx/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_bottom.xml b/lynx/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_bottom.xml new file mode 100644 index 0000000..fd37234 --- /dev/null +++ b/lynx/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_bottom.xml @@ -0,0 +1,25 @@ + + + + + + + diff --git a/lynx/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_top.xml b/lynx/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_top.xml new file mode 100644 index 0000000..6735ec7 --- /dev/null +++ b/lynx/overlay/frameworks/base/packages/SystemUI/res/drawable/rounded_corner_top.xml @@ -0,0 +1,25 @@ + + + + + + + diff --git a/lynx/overlay/frameworks/base/packages/SystemUI/res/values-h800dp/dimens.xml b/lynx/overlay/frameworks/base/packages/SystemUI/res/values-h800dp/dimens.xml new file mode 100644 index 0000000..b906765 --- /dev/null +++ b/lynx/overlay/frameworks/base/packages/SystemUI/res/values-h800dp/dimens.xml @@ -0,0 +1,21 @@ + + + + + -156dp + diff --git a/lynx/overlay/frameworks/base/packages/SystemUI/res/values-land/dimen.xml b/lynx/overlay/frameworks/base/packages/SystemUI/res/values-land/dimen.xml new file mode 100644 index 0000000..d52300a --- /dev/null +++ b/lynx/overlay/frameworks/base/packages/SystemUI/res/values-land/dimen.xml @@ -0,0 +1,25 @@ + + + + + 8dp + 8dp + + + 0dp + diff --git a/lynx/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/lynx/overlay/frameworks/base/packages/SystemUI/res/values/config.xml new file mode 100644 index 0000000..09835b4 --- /dev/null +++ b/lynx/overlay/frameworks/base/packages/SystemUI/res/values/config.xml @@ -0,0 +1,85 @@ + + + + + + + com.google.sensor.binned_brightness + + + true + + + true + + + + -1 + 3 + 3 + 16 + 16 + + + + + -1 + 133 + 0 + 0 + 0 + + + + + + + + + + M 71,0 C 33,0 22,-1 10,10 -1,22 0,33 0,71 + + + + M 494,66 + a 46,46 0 1 0 92,0 + a 46,46 0 1 0 -92,0 + Z + + + + 1 + + + com.google.android.as + + true + + diff --git a/lynx/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml b/lynx/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml new file mode 100644 index 0000000..c916756 --- /dev/null +++ b/lynx/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml @@ -0,0 +1,50 @@ + + + + + 0dp + + + 1px + + + @*android:dimen/status_bar_height + + + 11px + + + 6dp + + 0px + + 47px + 47px + 46px + + + 650px + + + 950px + 1110px + + + -- cgit v1.2.3 From ced58fb5983ec0b974348e6484f4e13069802dc2 Mon Sep 17 00:00:00 2001 From: Stephane Lee Date: Thu, 12 May 2022 17:14:41 -0700 Subject: Remove device-specific support for GoogleBattery HAL This is covered by parent projects Bug: 232461104 Test: Ensure Adaptive Charging/Battery health flags works as expected Change-Id: If97f5a5f3f082e2066f1d512f449fcbb295b50f2 --- manifest.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/manifest.xml b/manifest.xml index 6688f36..63b8a14 100644 --- a/manifest.xml +++ b/manifest.xml @@ -158,15 +158,6 @@ default - - vendor.google.google_battery - hwbinder - 1.2 - - IGoogleBattery - default - - vendor.google.whitechapel.audio.audioext hwbinder -- cgit v1.2.3 From 5b48802a60b905567216e8deb6af415e6e1bdd38 Mon Sep 17 00:00:00 2001 From: Cheney Ni Date: Sun, 12 Jun 2022 18:19:02 +0000 Subject: Bluetooth: Refine Bluetooth HAL manifest Remove duplicated manifests which are included at bluetooth/manifest_bluetooth.xml. Bug: 203055537 Test: lshal to see Bluetooth HAL services Change-Id: Ib39f208245c9ef476285898606289d29717ed8ca --- manifest.xml | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/manifest.xml b/manifest.xml index 63b8a14..5909ae3 100644 --- a/manifest.xml +++ b/manifest.xml @@ -84,24 +84,6 @@ default - - android.hardware.bluetooth - hwbinder - 1.1 - - IBluetoothHci - default - - - - android.hardware.bluetooth.audio - hwbinder - 2.1 - - IBluetoothAudioProvidersFactory - default - - android.hardware.boot hwbinder @@ -131,33 +113,6 @@ default - - hardware.google.bluetooth.bt_channel_avoidance - hwbinder - 1.0 - - IBTChannelAvoidance - default - - - - hardware.google.bluetooth.sar - hwbinder - 1.1 - - IBluetoothSar - default - - - - hardware.google.bluetooth.ccc - hwbinder - 1.1 - - IBluetoothCcc - default - - vendor.google.whitechapel.audio.audioext hwbinder -- cgit v1.2.3 From cd63701eb0ee43fbd3d08b247f8fa784dcdeea71 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Thu, 14 Jul 2022 11:36:56 +0000 Subject: audio: Enable Le Audio SW LC3 coding Since the Le Audio HW offloader enable/disable control flag controls Unicast and Broadcast at the same time, we need them both to work either with HW or SW audio coding paths. This patch enables software encoding audio path on unicast. This is the only way to make unicast and broadcast to interact, since the HW offloader for Braodcast is not yet ready. Bug: 238997591 Fixes: 238997591 Tag: #feature Test: atest BluetoothInstrumentationTests Change-Id: I04fc1306eb15ea2ae102f65b59c1b1cca2070dd1 --- audio/lynx/audio-tables.mk | 1 + ...io_policy_configuration_le_offload_disabled.xml | 260 +++++++++++++++++++++ 2 files changed, 261 insertions(+) create mode 100644 audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml diff --git a/audio/lynx/audio-tables.mk b/audio/lynx/audio-tables.mk index f38db39..812dbce 100644 --- a/audio/lynx/audio-tables.mk +++ b/audio/lynx/audio-tables.mk @@ -24,6 +24,7 @@ PRODUCT_COPY_FILES += \ device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.xml \ frameworks/av/services/audiopolicy/config/bluetooth_with_le_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml # AudioEffectHAL Configuration diff --git a/audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml b/audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml new file mode 100644 index 0000000..224d0a2 --- /dev/null +++ b/audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml @@ -0,0 +1,260 @@ + + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From aa73c15e688c48605a3854a1d6e80ed9f612b85c Mon Sep 17 00:00:00 2001 From: jimmyshiu Date: Thu, 21 Jul 2022 01:27:47 +0000 Subject: Remove universal touch boost Bug: 236781877 Test: PtsUiBench Change-Id: Icae3f31286dafcd7ca0df8fad07916d5a76f7929 --- powerhint.json | 63 ---------------------------------------------------------- 1 file changed, 63 deletions(-) diff --git a/powerhint.json b/powerhint.json index 0a61b7c..546d0e4 100644 --- a/powerhint.json +++ b/powerhint.json @@ -156,7 +156,6 @@ "Path": "/proc/vendor_sched/ta_uclamp_min", "Values": [ "612", - "185", "1", "63" ], @@ -1285,58 +1284,6 @@ "Duration": 0, "Value": "1" }, - { - "PowerHint": "ADPF_DISABLE_TA_BOOST", - "Type": "MaskHint", - "Value": "BOOST_DISPLAY" - }, - { - "PowerHint": "ADPF_DISABLE_TA_BOOST", - "Type": "EndHint", - "Value": "BOOST_90HZ" - }, - { - "PowerHint": "ADPF_DISABLE_TA_BOOST", - "Type": "EndHint", - "Value": "BOOST_60HZ" - }, - { - "PowerHint": "BOOST_DISPLAY", - "Type": "DoHint", - "Value": "BOOST_90HZ" - }, - { - "PowerHint": "BOOST_DISPLAY", - "Type": "DoHint", - "Value": "BOOST_60HZ" - }, - { - "PowerHint": "INTERACTION", - "Type": "DoHint", - "Value": "BOOST_DISPLAY" - }, - { - "PowerHint": "BOOST_90HZ", - "Node": "TAUClampBoost", - "Duration": 200, - "Value": "185" - }, - { - "PowerHint": "BOOST_60HZ", - "Node": "TAUClampBoost", - "Duration": 200, - "Value": "185" - }, - { - "PowerHint": "REFRESH_90FPS", - "Type": "MaskHint", - "Value": "BOOST_60HZ" - }, - { - "PowerHint": "REFRESH_60FPS", - "Type": "MaskHint", - "Value": "BOOST_90HZ" - }, { "PowerHint": "DISPLAY_IDLE", "Node": "FGPreferIdle", @@ -1354,16 +1301,6 @@ "Type": "EndHint", "Value": "INTERACTION" }, - { - "PowerHint": "DISPLAY_IDLE", - "Type": "EndHint", - "Value": "BOOST_90HZ" - }, - { - "PowerHint": "DISPLAY_IDLE", - "Type": "EndHint", - "Value": "BOOST_60HZ" - }, { "PowerHint": "DISPLAY_IDLE", "Type": "EndHint", -- cgit v1.2.3 From d3831ec2bae9883847c9e46d95b4add0c2303c93 Mon Sep 17 00:00:00 2001 From: chungkai Date: Tue, 12 Jul 2022 09:45:16 +0000 Subject: Enable load kernel modules in parallel enable load kernel modules in parallel but load some specific modules in sequential Test: rebooted more than 1000 times without failure and device_boot_health_check_extra also passed Bug: 229794277 Signed-off-by: chungkai Change-Id: Ic4961389d58b5195d252dff15cbb92bb391caacc --- lynx/BoardConfig.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lynx/BoardConfig.mk b/lynx/BoardConfig.mk index 616a01a..f14d498 100644 --- a/lynx/BoardConfig.mk +++ b/lynx/BoardConfig.mk @@ -19,6 +19,13 @@ TARGET_SCREEN_DENSITY := 420 BOARD_USES_GENERIC_AUDIO := true USES_DEVICE_GOOGLE_LYNX := true +# Enable load module in parallel +BOARD_BOOTCONFIG += androidboot.load_modules_parallel=true + +# The modules which need to be loaded in sequential +BOARD_KERNEL_CMDLINE += vh_sched.load_sequential=1 +BOARD_KERNEL_CMDLINE += exynos_drm.load_sequential=1 + include device/google/gs201/BoardConfig-common.mk -include vendor/google_devices/gs201/prebuilts/BoardConfigVendor.mk -include vendor/google_devices/lynx/proprietary/BoardConfigVendor.mk -- cgit v1.2.3 From 24e591bdd9692837d30a27f9a88d934a64925fba Mon Sep 17 00:00:00 2001 From: chungkai Date: Tue, 12 Jul 2022 09:44:05 +0000 Subject: powerhal: fix path for i2c peripheral device paths are changed when we enable parallel module loading and reorder the initializtaion of devices. Test: without error on L10 when booting Bug: 229794277 Signed-off-by: chungkai Change-Id: I2ce4e0556f9c7ea0e2ed5d3965ad567069524842 --- powerstats/service.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/powerstats/service.cpp b/powerstats/service.cpp index ef07d0e..3ee4bc7 100644 --- a/powerstats/service.cpp +++ b/powerstats/service.cpp @@ -26,6 +26,7 @@ #include #include #include +#include using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider; using aidl::android::hardware::power::stats::EnergyConsumerType; @@ -54,6 +55,8 @@ void addDisplay(std::shared_ptr p) { } int main() { + struct stat buffer; + LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting."; // single thread @@ -63,7 +66,21 @@ int main() { addGs201CommonDataProvidersQc(p); addDisplay(p); - addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-4/i2c-st21nfc/power_stats"); + if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-2/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-2/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-3/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-3/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-4/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-4/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-5/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-5/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-6/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-6/i2c-st21nfc/power_stats"); + } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-7/i2c-st21nfc/power_stats", &buffer)) { + addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-7/i2c-st21nfc/power_stats"); + } else { + addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-8/i2c-st21nfc/power_stats"); + } const std::string instance = std::string() + PowerStats::descriptor + "/default"; binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str()); -- cgit v1.2.3 From 08da7a3af6dfb7771053ac402d02f6d45983da46 Mon Sep 17 00:00:00 2001 From: achigoliu Date: Thu, 4 Aug 2022 22:40:44 +0800 Subject: Bundle handheld_core_hardware.xml Bug: 237110906 Test: Manual, verify build artifacts Signed-off-by: achigoliu Change-Id: I92137b615c7bce28026f858c201d8bd530754b5b --- device-lynx.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index 50f95e4..edbdb76 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -199,3 +199,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Limit camera 1080P 60FPS binning mode to not rear main camera PRODUCT_VENDOR_PROPERTIES += \ persist.vendor.camera.1080P_60fps_binning_except_rear_main=true + +# Device features +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml -- cgit v1.2.3 From e8a4f8b29b0e750a0fe0ae4ffef7f52cb5bb6873 Mon Sep 17 00:00:00 2001 From: horngchuang Date: Tue, 23 Aug 2022 08:52:54 +0000 Subject: Add system property for camera OIS with system imu Bug: 240851527 Test: in-rom GCA Change-Id: I80d33ab2ef9e7e2fc3acf33580f8e333988b62f2 --- device-lynx.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index c43da4b..ce5e8af 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -205,6 +205,10 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_VENDOR_PROPERTIES += \ persist.vendor.camera.1080P_60fps_binning_except_rear_main=true +# OIS with system imu +PRODUCT_VENDOR_PROPERTIES += \ + persist.vendor.camera.ois_with_system_imu=true + # Device features PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml -- cgit v1.2.3 From 0873961b4b0c4cd47716fab5251c05f523799fd7 Mon Sep 17 00:00:00 2001 From: Vincent Wang Date: Fri, 26 Aug 2022 16:35:59 +0800 Subject: Move fingerprint and face haptic form server to sysui(3/3) BUG: 237621645 Test: Check the vibrator work normally when using biometric unlock Change-Id: I3f97a94e4df9d089ffb62cb9ad44bff41927b17e --- .../frameworks/base/core/res/res/values/bools.xml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 lynx/overlay/frameworks/base/core/res/res/values/bools.xml diff --git a/lynx/overlay/frameworks/base/core/res/res/values/bools.xml b/lynx/overlay/frameworks/base/core/res/res/values/bools.xml deleted file mode 100644 index 9e75363..0000000 --- a/lynx/overlay/frameworks/base/core/res/res/values/bools.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - false - -- cgit v1.2.3 From 5c7f6e301259871f4408ca6d8d3d1ee29c31a6f8 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Mon, 29 Aug 2022 10:33:50 +0800 Subject: isolate qcom bt settings Bug: 242661555 Test: vts-tradefed run vts -m vts_treble_vintf_vendor_test Change-Id: Ibb6c1dde68c7e6fc2c97a16d61357911cb3b3530 --- bluetooth/device_framework_matrix_product.xml | 18 ++++++++++++++++++ bluetooth/qti_default.mk | 1 + 2 files changed, 19 insertions(+) create mode 100644 bluetooth/device_framework_matrix_product.xml diff --git a/bluetooth/device_framework_matrix_product.xml b/bluetooth/device_framework_matrix_product.xml new file mode 100644 index 0000000..0c013a6 --- /dev/null +++ b/bluetooth/device_framework_matrix_product.xml @@ -0,0 +1,18 @@ + + + hardware.google.bluetooth.bt_channel_avoidance + 1.0 + + IBTChannelAvoidance + default + + + + hardware.google.bluetooth.sar + 1.1 + + IBluetoothSar + default + + + diff --git a/bluetooth/qti_default.mk b/bluetooth/qti_default.mk index 6132dec..f3bbebb 100644 --- a/bluetooth/qti_default.mk +++ b/bluetooth/qti_default.mk @@ -39,6 +39,7 @@ PRODUCT_PRODUCT_PROPERTIES += \ # Bluetooth HAL and Pixel extension DEVICE_MANIFEST_FILE += \ device/google/lynx/bluetooth/manifest_bluetooth.xml +DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/lynx/bluetooth/device_framework_matrix_product.xml BOARD_SEPOLICY_DIRS += device/google/lynx-sepolicy/bluetooth -- cgit v1.2.3 From f3cb49fe20a1c2677133648006c3f3000fc9ebc4 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Tue, 6 Sep 2022 12:44:45 +0800 Subject: use gs-common insert module script Bug: 243763292 Test: boot to home Change-Id: I34f7a54974a48df29bb341ea65ea57639f2cf9f6 --- conf/init.lynx.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index 6892718..a53c020 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -15,7 +15,7 @@ on early-boot wait_for_prop vendor.common.modules.ready 1 start insmod_sh_lynx -service insmod_sh_lynx /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.lynx.cfg +service insmod_sh_lynx /vendor/bin/insmod.sh /vendor/etc/init.insmod.lynx.cfg class main user root group root system -- cgit v1.2.3 From 2bd2ec5c6fab4073e0cc2eb90042b06f78cd37d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kosi=C5=84ski?= Date: Tue, 13 Sep 2022 01:59:02 +0000 Subject: Set Lyric camera_hardware variable. Bug: 240478511 Test: presubmit Change-Id: I79a6c65e73a5813e3e10749564a1e8dae50c45a0 --- device-lynx.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index 53db418..eaa8619 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -29,6 +29,8 @@ include device/google/lynx/audio/lynx/audio-tables.mk include device/google/gs201/device-shipping-common.mk include hardware/google/pixel/vibrator/cs40l26/device.mk +# go/lyric-soong-variables +$(call soong_config_set,lyric,camera_hardware,lynx) $(call soong_config_set,lyric,tuning_product,lynx) $(call soong_config_set,google3a_config,target_device,lynx) -- cgit v1.2.3 From 3419c3ab710d36dd63e4a74a6e428b20f1fbae5c Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Thu, 8 Sep 2022 13:06:15 +0800 Subject: get bt permission xml to gs-common Bug: 242661555 Test: connect to bluetooth Change-Id: Ia97108643deae4faa3b8340c57fc5853e249e67c --- bluetooth/qti_default.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bluetooth/qti_default.mk b/bluetooth/qti_default.mk index f3bbebb..9165ac0 100644 --- a/bluetooth/qti_default.mk +++ b/bluetooth/qti_default.mk @@ -68,7 +68,9 @@ else ifeq ($(TARGET_USE_QTI_BT_SAR),true) endif PRODUCT_PACKAGES += \ android.hardware.bluetooth@1.0-service-qti \ - hardware.google.bluetooth.bt_channel_avoidance@1.0-impl + hardware.google.bluetooth.bt_channel_avoidance@1.0-impl \ + android.hardware.bluetooth.prebuilt.xml \ + android.hardware.bluetooth_le.prebuilt.xml # Bluetooth SAR Tx power caps PRODUCT_COPY_FILES += \ -- cgit v1.2.3 From 1f70b90493e3069726307eb0188cb6f3fdbfcb7a Mon Sep 17 00:00:00 2001 From: Chase Wu Date: Tue, 13 Sep 2022 21:20:32 +0800 Subject: vibrator: enable f0 and disable redc compensation Bug: 241353178 Test: check the value after device boot up Test: update PtsHapticsTestCases and run it Signed-off-by: Chase Wu Change-Id: Iab9f64d19bd1be6a162aef008c6f77bb48dd64ae --- device-lynx.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index d5fd4c5..f61c17f 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -146,7 +146,9 @@ endif # Vibrator HAL PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.vibrator.hal.supported_primitives=243 + ro.vendor.vibrator.hal.supported_primitives=243 \ + ro.vendor.vibrator.hal.f0.comp.enabled=1 \ + ro.vendor.vibrator.hal.redc.comp.enabled=0 # Trusty liboemcrypto.so PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts -- cgit v1.2.3 From c4e16906bd6d61bc3172e2b7f742c09d3a996719 Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Mon, 17 Oct 2022 11:59:24 +0800 Subject: powerstats: update specific data provider configurations Bug: 253951732 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: Ie81082c4c2df6620f361a9ad6d2bc725749e0e00 Signed-off-by: Darren Hsu --- powerstats/Android.bp | 2 ++ powerstats/service.cpp | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/powerstats/Android.bp b/powerstats/Android.bp index 2a38f9f..55a934c 100644 --- a/powerstats/Android.bp +++ b/powerstats/Android.bp @@ -16,6 +16,7 @@ soong_namespace { imports: [ "hardware/google/pixel", "device/google/gs201/powerstats", + "device/google/gs-common/powerstats", ] } @@ -38,5 +39,6 @@ cc_binary { shared_libs: [ "android.hardware.power.stats-impl.gs201", + "android.hardware.power.stats-impl.gs-common", ], } diff --git a/powerstats/service.cpp b/powerstats/service.cpp index 3ee4bc7..971fd8f 100644 --- a/powerstats/service.cpp +++ b/powerstats/service.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -28,6 +29,7 @@ #include #include +using aidl::android::hardware::power::stats::DevfreqStateResidencyDataProvider; using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider; using aidl::android::hardware::power::stats::EnergyConsumerType; using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer; @@ -54,6 +56,39 @@ void addDisplay(std::shared_ptr p) { {"On: 1080x2400@90", 3}})); } +void addGPUGs202(std::shared_ptr p) { + std::map stateCoeffs; + + // Add GPU state residency + p->addStateResidencyDataProvider(std::make_unique( + "GPU", + "/sys/devices/platform/28000000.mali")); + + // Add GPU energy consumer + stateCoeffs = { + {"202000", 890}, + {"251000", 1102}, + {"302000", 1308}, + {"351000", 1522}, + {"400000", 1772}, + {"434000", 1931}, + {"471000", 2105}, + {"510000", 2292}, + {"572000", 2528}, + {"633000", 2811}, + {"701000", 3127}, + {"762000", 3452}, + {"848000", 4044}}; + + p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndAttrConsumer( + p, + EnergyConsumerType::OTHER, + "GPU", + {"S2S_VDD_G3D", "S8S_VDD_G3D_L2"}, + {{UID_TIME_IN_STATE, "/sys/devices/platform/28000000.mali/uid_time_in_state"}}, + stateCoeffs)); +} + int main() { struct stat buffer; @@ -64,8 +99,17 @@ int main() { std::shared_ptr p = ndk::SharedRefBase::make(); - addGs201CommonDataProvidersQc(p); + setEnergyMeter(p); + addAoC(p); + addCPUclusters(p); addDisplay(p); + addSoC(p); + addGNSS(p); + addMobileRadio(p); + addPCIe(p); + addWlan(p); + addTPU(p); + addUfs(p); if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-2/i2c-st21nfc/power_stats", &buffer)) { addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-2/i2c-st21nfc/power_stats"); } else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-3/i2c-st21nfc/power_stats", &buffer)) { @@ -81,6 +125,10 @@ int main() { } else { addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-8/i2c-st21nfc/power_stats"); } + addPowerDomains(p); + addDevfreq(p); + addGPUGs202(p); + addDvfsStats(p); const std::string instance = std::string() + PowerStats::descriptor + "/default"; binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str()); -- cgit v1.2.3 From 4a5052c1df31f27f412040b72ad75ca0992c828f Mon Sep 17 00:00:00 2001 From: Anthony Stange Date: Wed, 19 Oct 2022 13:56:50 +0000 Subject: Add OnChipAccMask to gps.xml Bug: 249751526 Test: b/249751526#comment3 Change-Id: I755bd1c5a639004f678ae2831812ba285fcb597e --- location/gps.xml.l10 | 1 + location/gps_user.xml.l10 | 1 + 2 files changed, 2 insertions(+) diff --git a/location/gps.xml.l10 b/location/gps.xml.l10 index c243cd3..439dda1 100644 --- a/location/gps.xml.l10 +++ b/location/gps.xml.l10 @@ -83,6 +83,7 @@ EnableOnChipStopNotification="2" PowerMode="3" MinGpsWeekNumber="2216" + OnChipAccMask="50" /> Date: Wed, 19 Oct 2022 11:25:01 +0800 Subject: Remove obsolete source of sensor of L10. These files are not used anymore, removed them. Bug: 245007498 Test: build pass and check the build on L10. Change-Id: I3068eb8b80ff64279a4ad12460c6812b240da2ea Signed-off-by: emilchung --- sensors/Android.mk | 30 ---- sensors/sensors_dummy.c | 409 ------------------------------------------------ 2 files changed, 439 deletions(-) delete mode 100644 sensors/Android.mk delete mode 100644 sensors/sensors_dummy.c diff --git a/sensors/Android.mk b/sensors/Android.mk deleted file mode 100644 index 46d6f0c..0000000 --- a/sensors/Android.mk +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2009 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH := $(call my-dir) - -# HAL module implemenation stored in -# hw/..so -include $(CLEAR_VARS) - -LOCAL_MODULE_RELATIVE_PATH := hw -LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware -LOCAL_SRC_FILES := sensors_dummy.c -LOCAL_MODULE := sensors.lynx -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE -LOCAL_PROPRIETARY_MODULE := true - -include $(BUILD_SHARED_LIBRARY) diff --git a/sensors/sensors_dummy.c b/sensors/sensors_dummy.c deleted file mode 100644 index b1edd56..0000000 --- a/sensors/sensors_dummy.c +++ /dev/null @@ -1,409 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* this implements a sensors hardware library for the Android emulator. - * the following code should be built as a shared library that will be - * placed into /system/lib/hw/sensors.goldfish.so - * - * it will be loaded by the code in hardware/libhardware/hardware.c - * which is itself called from com_android_server_SensorService.cpp - */ - -#define SENSORS_SERVICE_NAME "sensors" - -#define LOG_TAG "Dummy_Sensors" - -#include -#include -#include -#include -#include -#include -#include -#include - -#if 0 -#define D(...) ALOGD(__VA_ARGS__) -#else -#define D(...) ((void)0) -#endif - -#define E(...) ALOGE(__VA_ARGS__) - -/** SENSOR IDS AND NAMES - **/ - -#define MAX_NUM_SENSORS 8 - -#define SUPPORTED_SENSORS ((1<"; -} - -static int -_sensorIdFromName( const char* name ) -{ - int nn; - - if (name == NULL) - return -1; - - for (nn = 0; nn < MAX_NUM_SENSORS; nn++) - if (!strcmp(name, _sensorIds[nn].name)) - return _sensorIds[nn].id; - - return -1; -} - -/* return the current time in nanoseconds */ -static int64_t now_ns(void) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - return (int64_t)ts.tv_sec * 1000000000 + ts.tv_nsec; -} - -/** SENSORS POLL DEVICE - ** - ** This one is used to read sensor data from the hardware. - ** We implement this by simply reading the data from the - ** emulator through the QEMUD channel. - **/ - -typedef struct SensorDevice { - struct sensors_poll_device_1 device; - sensors_event_t sensors[MAX_NUM_SENSORS]; - uint32_t pendingSensors; - int64_t timeStart; - int64_t timeOffset; - uint32_t active_sensors; - int fd; - pthread_mutex_t lock; -} SensorDevice; - -/* Grab the file descriptor to the emulator's sensors service pipe. - * This function returns a file descriptor on success, or -errno on - * failure, and assumes the SensorDevice instance's lock is held. - * - * This is needed because set_delay(), poll() and activate() can be called - * from different threads, and poll() is blocking. - * - * 1) On a first thread, de-activate() all sensors first, then call poll(), - * which results in the thread blocking. - * - * 2) On a second thread, slightly later, call set_delay() then activate() - * to enable the acceleration sensor. - * - * The system expects this to unblock the first thread which will receive - * new sensor events after the activate() call in 2). - * - * This cannot work if both threads don't use the same connection. - * - * TODO(digit): This protocol is brittle, implement another control channel - * for set_delay()/activate()/batch() when supporting HAL 1.3 - */ -static int sensor_device_get_fd_locked(SensorDevice* dev) { - /* Create connection to service on first call */ - if (dev->fd < 0) { - int ret = -errno; - E("%s: Could not open connection to service: %s", __FUNCTION__, - strerror(-ret)); - return ret; - } - return dev->fd; -} - -/* Pick up one pending sensor event. On success, this returns the sensor - * id, and sets |*event| accordingly. On failure, i.e. if there are no - * pending events, return -EINVAL. - * - * Note: The device's lock must be acquired. - */ -static int sensor_device_pick_pending_event_locked(SensorDevice* d, - sensors_event_t* event) -{ - uint32_t mask = SUPPORTED_SENSORS & d->pendingSensors; - - if (mask) { - uint32_t i = 31 - __builtin_clz(mask); - - pthread_mutex_lock(&d->lock); - d->pendingSensors &= ~(1U << i); - *event = d->sensors[i]; - event->sensor = i; - event->version = sizeof(*event); - pthread_mutex_unlock(&d->lock); - D("%s: %d [%f, %f, %f]", __FUNCTION__, - i, - event->data[0], - event->data[1], - event->data[2]); - return i; - } - E("No sensor to return!!! pendingSensors=0x%08x", d->pendingSensors); - // we may end-up in a busy loop, slow things down, just in case. - usleep(1000); - return -EINVAL; -} - -static int sensor_device_close(struct hw_device_t* dev0) -{ - SensorDevice* dev = (void*)dev0; - // Assume that there are no other threads blocked on poll() - if (dev->fd >= 0) { - close(dev->fd); - dev->fd = -1; - } - pthread_mutex_destroy(&dev->lock); - free(dev); - return 0; -} - -/* Return an array of sensor data. This function blocks until there is sensor - * related events to report. On success, it will write the events into the - * |data| array, which contains |count| items. The function returns the number - * of events written into the array, which shall never be greater than |count|. - * On error, return -errno code. - * - * Note that according to the sensor HAL [1], it shall never return 0! - * - * [1] http://source.android.com/devices/sensors/hal-interface.html - */ -static int sensor_device_poll(struct sensors_poll_device_t *dev0, - sensors_event_t* data, int count) -{ - return -EIO; -} - -static int sensor_device_activate(struct sensors_poll_device_t *dev0, - int handle, - int enabled) -{ - SensorDevice* dev = (void*)dev0; - - D("%s: handle=%s (%d) enabled=%d", __FUNCTION__, - _sensorIdToName(handle), handle, enabled); - - /* Sanity check */ - if (!ID_CHECK(handle)) { - E("%s: bad handle ID", __FUNCTION__); - return -EINVAL; - } - - /* Exit early if sensor is already enabled/disabled. */ - uint32_t mask = (1U << handle); - uint32_t sensors = enabled ? mask : 0; - - pthread_mutex_lock(&dev->lock); - - uint32_t active = dev->active_sensors; - uint32_t new_sensors = (active & ~mask) | (sensors & mask); - uint32_t changed = active ^ new_sensors; - - if (changed) - dev->active_sensors = new_sensors; - - pthread_mutex_unlock(&dev->lock); - return 0; -} - -static int sensor_device_default_flush( - struct sensors_poll_device_1* dev0, - int handle) { - - SensorDevice* dev = (void*)dev0; - - D("%s: handle=%s (%d)", __FUNCTION__, - _sensorIdToName(handle), handle); - - /* Sanity check */ - if (!ID_CHECK(handle)) { - E("%s: bad handle ID", __FUNCTION__); - return -EINVAL; - } - - pthread_mutex_lock(&dev->lock); - dev->sensors[handle].version = META_DATA_VERSION; - dev->sensors[handle].type = SENSOR_TYPE_META_DATA; - dev->sensors[handle].sensor = 0; - dev->sensors[handle].timestamp = 0; - dev->sensors[handle].meta_data.what = META_DATA_FLUSH_COMPLETE; - dev->pendingSensors |= (1U << handle); - pthread_mutex_unlock(&dev->lock); - - return 0; -} - -static int sensor_device_set_delay(struct sensors_poll_device_t *dev0, - int handle __unused, - int64_t ns) -{ - return 0; -} - -static int sensor_device_default_batch( - struct sensors_poll_device_1* dev, - int sensor_handle, - int flags, - int64_t sampling_period_ns, - int64_t max_report_latency_ns) { - return sensor_device_set_delay(dev, sensor_handle, sampling_period_ns); -} - -/** MODULE REGISTRATION SUPPORT - ** - ** This is required so that hardware/libhardware/hardware.c - ** will dlopen() this library appropriately. - **/ - -/* - * the following is the list of all supported sensors. - * this table is used to build sSensorList declared below - * according to which hardware sensors are reported as - * available from the emulator (see get_sensors_list below) - * - * note: numerical values for maxRange/resolution/power for - * all sensors but light, pressure and humidity were - * taken from the reference AK8976A implementation - */ -static const struct sensor_t sSensorListInit[] = { - { .name = "Accelerometer", - .vendor = "The Android Open Source Project", - .version = 1, - .handle = ID_ACCELERATION, - .type = SENSOR_TYPE_ACCELEROMETER, - .maxRange = 2.8f, - .resolution = 1.0f/4032.0f, - .power = 3.0f, - .minDelay = 10000, - .maxDelay = 60 * 1000 * 1000, - .fifoReservedEventCount = 0, - .fifoMaxEventCount = 0, - .stringType = 0, - .requiredPermission = 0, - .flags = SENSOR_FLAG_CONTINUOUS_MODE, - .reserved = {} - }, -}; - -static struct sensor_t sSensorList[1]; - -static int sensors__get_sensors_list(struct sensors_module_t* module __unused, - struct sensor_t const** list) -{ - *list = sSensorList; - - return 0; -} - -static int -open_sensors(const struct hw_module_t* module, - const char* name, - struct hw_device_t* *device) -{ - int status = -EINVAL; - - D("%s: name=%s", __FUNCTION__, name); - - if (!strcmp(name, SENSORS_HARDWARE_POLL)) { - SensorDevice *dev = malloc(sizeof(*dev)); - - memset(dev, 0, sizeof(*dev)); - - dev->device.common.tag = HARDWARE_DEVICE_TAG; - dev->device.common.version = SENSORS_DEVICE_API_VERSION_1_3; - dev->device.common.module = (struct hw_module_t*) module; - dev->device.common.close = sensor_device_close; - dev->device.poll = sensor_device_poll; - dev->device.activate = sensor_device_activate; - dev->device.setDelay = sensor_device_set_delay; - - // Version 1.3-specific functions - dev->device.batch = sensor_device_default_batch; - dev->device.flush = sensor_device_default_flush; - - dev->fd = -1; - pthread_mutex_init(&dev->lock, NULL); - - *device = &dev->device.common; - status = 0; - } - return status; -} - - -static struct hw_module_methods_t sensors_module_methods = { - .open = open_sensors -}; - -struct sensors_module_t HAL_MODULE_INFO_SYM = { - .common = { - .tag = HARDWARE_MODULE_TAG, - .version_major = 1, - .version_minor = 0, - .id = SENSORS_HARDWARE_MODULE_ID, - .name = "Dummy SENSORS Module", - .author = "The Android Open Source Project", - .methods = &sensors_module_methods, - }, - .get_sensors_list = sensors__get_sensors_list -}; -- cgit v1.2.3 From 0ac874c080c1890eca4a9f46fb5fe6b6f3a39058 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Mon, 21 Nov 2022 12:57:20 +0800 Subject: use gti dump from gs-common Bug: 256521567 Test: adb bugreport Change-Id: Idcd792d9377df17acfa3bd21bb2554dc5ac9e631 --- device-lynx.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device-lynx.mk b/device-lynx.mk index ea8b931..db9415f 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -29,6 +29,7 @@ DEVICE_PACKAGE_OVERLAYS += device/google/lynx/lynx/overlay include device/google/lynx/audio/lynx/audio-tables.mk include device/google/gs201/device-shipping-common.mk include device/google/lynx/vibrator/cs40l26/device.mk +include device/google/gs-common/touch/gti/gti.mk # go/lyric-soong-variables $(call soong_config_set,lyric,camera_hardware,lynx) -- cgit v1.2.3 From 518a1291d6f1c6a805a2050c3c33d4e8e227e7f8 Mon Sep 17 00:00:00 2001 From: timothywang Date: Mon, 14 Nov 2022 19:46:27 +0800 Subject: Remove the useless property persist.vendor.camera.1080P_60fps_binning_except_rear_main is not used anymore. Test: GCA Bug: 257859918 Change-Id: I0fbb2fb2ed9950bb684596166393774fe5319f81 --- device-lynx.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/device-lynx.mk b/device-lynx.mk index db9415f..7a65cd1 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -230,10 +230,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_VENDOR_PROPERTIES += \ persist.vendor.camera.1080P_60fps_binning=true -# Limit camera 1080P 60FPS binning mode to not rear main camera -PRODUCT_VENDOR_PROPERTIES += \ - persist.vendor.camera.1080P_60fps_binning_except_rear_main=true - # Increase thread priority for nodes stop PRODUCT_VENDOR_PROPERTIES += \ persist.vendor.camera.increase_thread_priority_nodes_stop=true -- cgit v1.2.3 From a412356b66265ade49f6d8dcb1ae9cf35c19d1cd Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Thu, 6 Oct 2022 14:43:28 +0800 Subject: Add display shape config Bug: 236935288 Test: make Change-Id: I780b871e8cbecf4ea0b8e82caf7cbef713601f06 --- lynx/overlay/frameworks/base/core/res/res/values/config.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lynx/overlay/frameworks/base/core/res/res/values/config.xml b/lynx/overlay/frameworks/base/core/res/res/values/config.xml index 6aac780..0a0d1e5 100644 --- a/lynx/overlay/frameworks/base/core/res/res/values/config.xml +++ b/lynx/overlay/frameworks/base/core/res/res/values/config.xml @@ -285,4 +285,17 @@ gwkk3 http://www.gstatic.com/android/sms/GWKK3.xml + + + M 50 0 C 42.768298 0.20918843 40.38325 0.67140492 36.839844 1.4492188 C 32.88207 2.499408 31.55228 2.9412067 27.529297 4.6933594 C 22.757243 6.7717586 20.051023 9.0487475 17.677734 10.873047 C 14.896398 13.14348 12.520098 15.642526 10.375 18.316406 C 7.8943843 21.48606 6.0935469 24.386022 4.3515625 28.15625 C 1.8145748 33.95665 1.4214109 36.446413 0.90625 38.939453 C 0.29310087 41.906691 0.090606668 43.961689 0 50 L 0 2350 C 0.083036414 2356.0047 0.27049146 2357.7278 0.70507812 2360.4961 C 1.0552946 2362.727 1.7787856 2366.4728 4.1152344 2372.0391 C 5.8274884 2375.87 7.608122 2378.6647 10.011719 2381.8281 C 12.156817 2384.5019 14.6796 2387.128 17.460938 2389.3984 C 19.82277 2391.2952 22.788288 2393.4515 27.306641 2395.5898 C 30.772461 2397.23 33.05157 2397.9241 37.181641 2398.8828 C 41.654968 2399.8035 43.840728 2399.9069 50 2400 L 1030 2400 C 1036.1593 2399.9069 1038.345 2399.8035 1042.8184 2398.8828 C 1046.9485 2397.9241 1049.2276 2397.23 1052.6934 2395.5898 C 1057.2118 2393.4515 1060.1773 2391.2952 1062.5391 2389.3984 C 1065.3205 2387.128 1067.8432 2384.5019 1069.9883 2381.8281 C 1072.3919 2378.6647 1074.1725 2375.87 1075.8848 2372.0391 C 1078.2212 2366.4728 1078.9466 2362.727 1079.2969 2360.4961 C 1079.7314 2357.7278 1079.917 2356.0047 1080 2350 L 1080 50 C 1079.909 43.961692 1079.7068 41.906687 1079.0938 38.939453 C 1078.5787 36.446409 1078.1854 33.956648 1075.6484 28.15625 C 1073.9064 24.386028 1072.1057 21.48606 1069.625 18.316406 C 1067.4799 15.642522 1065.1037 13.143473 1062.3223 10.873047 C 1059.949 9.0487399 1057.2428 6.7717652 1052.4707 4.6933594 C 1048.4477 2.9412128 1047.118 2.4994066 1043.1602 1.4492188 C 1039.6168 0.67140026 1037.2317 0.20918958 1030 0 L 50 0 z -- cgit v1.2.3 From 59e44821753327b1a38c719362eddaffd94e9813 Mon Sep 17 00:00:00 2001 From: lbill Date: Tue, 6 Dec 2022 08:03:26 +0000 Subject: Enable fingerprint testing virtual HAL on L10 We plan to set all projects able to run biometrics-jank e2e tests Test: forest test with atp config \ v2/biometrics/health/microbench/biometrics/biometrics-jank-suite Bug: 228638448 Bug: 236074209 Change-Id: I37e73725cd1516f85dbada434ae792fe1473a03c --- device-lynx.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index 5b4e060..1fed635 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -264,3 +264,8 @@ endif # SKU specific RROs PRODUCT_PACKAGES += \ SettingsOverlayG82U8 + +# Biometrics virtual HAL for e2e testing +PRODUCT_PACKAGES_DEBUG += \ + android.hardware.biometrics.fingerprint-service.example + -- cgit v1.2.3 From 921c5018c980b1ae8141781a8e3ee547a4f5eb06 Mon Sep 17 00:00:00 2001 From: Cyril Lee Date: Tue, 13 Dec 2022 00:47:58 +0000 Subject: Enable quick start for pixel devices Bug: 246218540 Test: build pass with `m -j` command Change-Id: Ia8f5ae0f33dbaef6638485988937b7ec46230c79 --- device-lynx.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index 1fed635..6df3fe1 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -269,3 +269,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES_DEBUG += \ android.hardware.biometrics.fingerprint-service.example +# Setup Wizard device-specific settings +PRODUCT_PRODUCT_PROPERTIES += \ + setupwizard.feature.enable_quick_start_flow_for_debug=true \ + -- cgit v1.2.3 From d611ba7a182214cc45c03e6d10667f5bb3f3e5ad Mon Sep 17 00:00:00 2001 From: Ken Yang Date: Sat, 10 Dec 2022 14:20:31 +0000 Subject: WLC: Include the wireless_charger from gs-common Bug: 237600973 Change-Id: I7ef24f59068682aa3e696898fc149b516d478988 Signed-off-by: Ken Yang --- device-lynx.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device-lynx.mk b/device-lynx.mk index 6df3fe1..f9b86e6 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -30,6 +30,7 @@ include device/google/lynx/audio/lynx/audio-tables.mk include device/google/gs201/device-shipping-common.mk include device/google/lynx/vibrator/cs40l26/device.mk include device/google/gs-common/touch/gti/gti.mk +include device/google/gs-common/wireless_charger/wireless_charger.mk # go/lyric-soong-variables $(call soong_config_set,lyric,camera_hardware,lynx) -- cgit v1.2.3 From e39540814017a227dd3125e067592cdda1fc2009 Mon Sep 17 00:00:00 2001 From: Matt Buckley Date: Tue, 6 Dec 2022 21:58:37 +0000 Subject: Disable HWUI adpf by default and enable in device.mk * Make HWUI disabled by default for vendors * Explicitly enable in supported devices * Consolidate flags for HWUI and SF Bug: b/261628396 Test: manual Change-Id: I46f87bdc8f5a5c20748ad434866be2b15f8d406e --- device-lynx.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/device-lynx.mk b/device-lynx.mk index f9b86e6..cdac86b 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -243,10 +243,6 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml -# Enable adpf cpu hint session for SurfaceFlinger -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ - debug.sf.enable_adpf_cpu_hint=true - # The default value of this variable is false and should only be set to true when # the device allows users to enable the seamless transfer feature. PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From b2e0d61b9ffc973fc1f4e13862a96fd3aa5b3922 Mon Sep 17 00:00:00 2001 From: Luke Chang Date: Tue, 20 Dec 2022 17:00:01 +0000 Subject: powerhint: add CPU_LOAD_RESET rule Set minimum mif freq for 1st frame to avoid memlat can't reflect in time. Test: Build and check 1st frame boost Bug: 259275437 Bug: 263383561 Change-Id: I48c563ff6a565598e90243b16a27068be69c85eb Signed-off-by: Luke Chang --- powerhint.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/powerhint.json b/powerhint.json index ada2cae..bfbf3d3 100644 --- a/powerhint.json +++ b/powerhint.json @@ -722,6 +722,12 @@ "Duration": 2000, "Value": "9999999" }, + { + "PowerHint": "CPU_LOAD_RESET", + "Node": "MemFreq", + "Duration": 33, + "Value": "1014000" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "MemFreq", -- cgit v1.2.3 From 19b764a3334762b8d1f9dc22bf6717f227faf9e4 Mon Sep 17 00:00:00 2001 From: Kai Shi Date: Wed, 4 Jan 2023 10:32:57 -0800 Subject: Enable DTIM multiplier config Enable DTIM multiplier configuration in Pixels. Bug: 259554744 Test: manual Change-Id: I0c3e4966f3b5008dcb7ceecf4e240c3dea3db0f5 --- rro_overlays/WifiOverlay/res/values/config.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml index 4fa03d2..36b5076 100644 --- a/rro_overlays/WifiOverlay/res/values/config.xml +++ b/rro_overlays/WifiOverlay/res/values/config.xml @@ -132,4 +132,8 @@ true + + + true -- cgit v1.2.3 From 885e8c2479499660a9571a518d7b5757b599c20e Mon Sep 17 00:00:00 2001 From: MingChe Date: Tue, 10 Jan 2023 13:13:09 +0000 Subject: Reveal model/make name in camera EXIF Bug: 241611453 Test: Check EXIF data from JPEG image, CTS Change-Id: I5e0116e7b7457c0fd9d2e9cbd0b2104b80fbbf76 --- device-lynx.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index cdac86b..86f6167 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -239,6 +239,10 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_VENDOR_PROPERTIES += \ persist.vendor.camera.ois_with_system_imu=true +# Enable camera exif model/make reporting +PRODUCT_VENDOR_PROPERTIES += \ + persist.vendor.camera.exif_reveal_make_model=true + # Device features PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml -- cgit v1.2.3 From b0cf5c0b084ff1c793ab987c29cb8189e0743b26 Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Wed, 4 Jan 2023 19:52:12 +0000 Subject: Enable GPS/Wifi coex for L10 Enable GPS/Wifi coex for L10 using the default values from P10 Bug: 263211979 Test: none Change-Id: I6604b1ca36029b1a76222e11ef9adec06cecbb33 --- rro_overlays/WifiOverlay/res/values/config.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml index 36b5076..1019ddb 100644 --- a/rro_overlays/WifiOverlay/res/values/config.xml +++ b/rro_overlays/WifiOverlay/res/values/config.xml @@ -126,6 +126,11 @@ true + + true + + 10000 true -- cgit v1.2.3 From c7536571d020b732673f2c2c5de48846b1b9ef7f Mon Sep 17 00:00:00 2001 From: Ken Yang Date: Fri, 6 Jan 2023 19:27:55 +0000 Subject: WLC: Remove wireless_charger service Bug: 264624634 Bug: 263830018 Change-Id: Ifafd0359c41a70b2ceb2aa3857112fb6f62d5a2f Signed-off-by: Ken Yang --- device-lynx.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 86f6167..4434c83 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -30,7 +30,6 @@ include device/google/lynx/audio/lynx/audio-tables.mk include device/google/gs201/device-shipping-common.mk include device/google/lynx/vibrator/cs40l26/device.mk include device/google/gs-common/touch/gti/gti.mk -include device/google/gs-common/wireless_charger/wireless_charger.mk # go/lyric-soong-variables $(call soong_config_set,lyric,camera_hardware,lynx) -- cgit v1.2.3 From 412868e428fe9fec51e0c1c40734c9ff4447ef15 Mon Sep 17 00:00:00 2001 From: Chungkai Mei Date: Thu, 5 Jan 2023 12:44:46 +0000 Subject: Load vh_sched kernel module in parallel Bug: 237232510 Change-Id: I70bfe77abf5d26cb6763dbe1cdc9139f4495e2e1 Signed-off-by: Chungkai Mei --- lynx/BoardConfig.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/lynx/BoardConfig.mk b/lynx/BoardConfig.mk index f14d498..b955068 100644 --- a/lynx/BoardConfig.mk +++ b/lynx/BoardConfig.mk @@ -23,7 +23,6 @@ USES_DEVICE_GOOGLE_LYNX := true BOARD_BOOTCONFIG += androidboot.load_modules_parallel=true # The modules which need to be loaded in sequential -BOARD_KERNEL_CMDLINE += vh_sched.load_sequential=1 BOARD_KERNEL_CMDLINE += exynos_drm.load_sequential=1 include device/google/gs201/BoardConfig-common.mk -- cgit v1.2.3 From 49e68d8056d9a989e2bdf6a1e710019f69c9e25d Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Thu, 12 Jan 2023 08:54:26 +0000 Subject: Change CAMERA_CAPTURE_CPU_THROTTLE setting Sync the value to CAMERA_STREAMING_STANDARD. Bug: 260372860 Test: build pass Change-Id: I5dc425e995cf8856867c7bcfb21cfa202329b105 --- powerhint.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/powerhint.json b/powerhint.json index bfbf3d3..7aef6df 100644 --- a/powerhint.json +++ b/powerhint.json @@ -834,13 +834,13 @@ "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", "Node": "CPUBigClusterMaxFreq", "Duration": 1000, - "Value": "1426000" + "Value": "1826000" }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", "Node": "CPUMidClusterMaxFreq", "Duration": 1000, - "Value": "1197000" + "Value": "1491000" }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", -- cgit v1.2.3 From 509fbf31c06c4d23fe422bd12fd984908123289e Mon Sep 17 00:00:00 2001 From: George Date: Wed, 1 Feb 2023 18:03:21 +0800 Subject: [NFC] Set tag_intent_app_pref_supported Bug: 244272155 Test: atest android.permission.cts.NfcPermissionTest Test: atest NfcFeatureFlagTest Change-Id: I54560e00621b920ffdfc071219ca007ff090674f --- lynx/overlay/packages/apps/Nfc/res/values/config.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/lynx/overlay/packages/apps/Nfc/res/values/config.xml b/lynx/overlay/packages/apps/Nfc/res/values/config.xml index 34bf74e..8c96d35 100644 --- a/lynx/overlay/packages/apps/Nfc/res/values/config.xml +++ b/lynx/overlay/packages/apps/Nfc/res/values/config.xml @@ -21,4 +21,5 @@ GHL1X G82U8 + true -- cgit v1.2.3 From 3c9c7fcebaa220ddbed60d1e928c40bd4538f0b1 Mon Sep 17 00:00:00 2001 From: Kris Chen Date: Wed, 1 Feb 2023 16:31:53 +0800 Subject: Set `/dev/goodix_fp` permission on early-boot Bug: 264497933 Test: Passed PtsFingerprintTest#udfpsHalStateCheck. Change-Id: I1e48a3532e12e9c90c519ac4feb9b9ef361786f8 --- conf/init.lynx.rc | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index 29cc51a..d56c21b 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -40,7 +40,6 @@ on property:vendor.mfgapi.touchpanel.permission=1 # Fingerprint on post-fs-data - chown system system /dev/goodix_fp exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g7.app # SecureElement eSE2 cts mode -- cgit v1.2.3 From 298a0c26e87080aa0e13cc26deee91eda0eec981 Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Wed, 18 Jan 2023 17:02:49 +0800 Subject: conf: setup vibrator permission and init cs40l26 HAL Move from hardware/google/pixel/vibrator/cs40l26/ Bug: 264625320 Test: HAL init properly. Change-Id: I35cc8a837e05c3871d1a9f460a236109598b612f --- conf/init.lynx.rc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index d56c21b..2bdf3ab 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -116,3 +116,24 @@ on property:vibrator.adaptive_haptics.enabled=0 on property:vibrator.adaptive_haptics.enabled=1 setprop persist.vendor.vibrator.hal.context.enable true + +# Haptics +on property:vendor.all.modules.ready=1 + mkdir /mnt/vendor/persist/haptics 0770 system system + chmod 770 /mnt/vendor/persist/haptics + chmod 440 /mnt/vendor/persist/haptics/cs40l26.cal + chown system system /mnt/vendor/persist/haptics + chown system system /mnt/vendor/persist/haptics/cs40l26.cal + + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/f0_stored + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/q_stored + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/redc_stored + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/vibe_state + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/num_waves + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_offset + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/owt_free_space + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_comp_enable + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/redc_comp_enable + chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/delay_before_stop_playback_us + + enable vendor.vibrator.cs40l26 -- cgit v1.2.3 From 8bace53a5eb764d9059d03515d6f5f42ad425cee Mon Sep 17 00:00:00 2001 From: Patty Huang Date: Sun, 20 Nov 2022 21:53:48 +0800 Subject: Add broadcast offload capability Tag: #feature Bug: 242472419 Test: make build Change-Id: I1771f62fed9273e39dcfa4132e0286d20dba69aa --- bluetooth/le_audio_codec_capabilities.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bluetooth/le_audio_codec_capabilities.xml b/bluetooth/le_audio_codec_capabilities.xml index cfb915b..575e89d 100644 --- a/bluetooth/le_audio_codec_capabilities.xml +++ b/bluetooth/le_audio_codec_capabilities.xml @@ -51,6 +51,9 @@ + + + @@ -68,6 +71,8 @@ + + @@ -80,5 +85,6 @@ + -- cgit v1.2.3 From be5134e09d573f5785b9a3accbf15d3e18bbecb1 Mon Sep 17 00:00:00 2001 From: Yanting Yang Date: Wed, 18 Jan 2023 16:46:08 +0800 Subject: Add regulation e-labels for Lynx Bug: 240937964 Test: visual Change-Id: I8170879b529a1f17e98397cbc189aa5d507b347e (cherry picked from commit 093f54e976ba0f0da2b6ec2ef926efc2e1a90bdf) --- device-lynx.mk | 5 ++++- .../SettingsOverlayG0DZQ/Android.bp | 8 ++++++++ .../SettingsOverlayG0DZQ/AndroidManifest.xml | 9 +++++++++ .../res/drawable/regulatory_info.png | Bin 0 -> 379805 bytes .../res/drawable/regulatory_info.png | Bin 235399 -> 972604 bytes .../SettingsOverlayGHL1X/Android.bp | 8 ++++++++ .../SettingsOverlayGHL1X/AndroidManifest.xml | 9 +++++++++ .../res/drawable/regulatory_info.png | Bin 0 -> 1475886 bytes .../SettingsOverlayGWKK3/Android.bp | 8 ++++++++ .../SettingsOverlayGWKK3/AndroidManifest.xml | 9 +++++++++ .../res/drawable/regulatory_info.png | Bin 0 -> 225468 bytes 11 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 lynx/overlay_packages/SettingsOverlayG0DZQ/Android.bp create mode 100644 lynx/overlay_packages/SettingsOverlayG0DZQ/AndroidManifest.xml create mode 100644 lynx/overlay_packages/SettingsOverlayG0DZQ/res/drawable/regulatory_info.png create mode 100644 lynx/overlay_packages/SettingsOverlayGHL1X/Android.bp create mode 100644 lynx/overlay_packages/SettingsOverlayGHL1X/AndroidManifest.xml create mode 100644 lynx/overlay_packages/SettingsOverlayGHL1X/res/drawable/regulatory_info.png create mode 100644 lynx/overlay_packages/SettingsOverlayGWKK3/Android.bp create mode 100644 lynx/overlay_packages/SettingsOverlayGWKK3/AndroidManifest.xml create mode 100644 lynx/overlay_packages/SettingsOverlayGWKK3/res/drawable/regulatory_info.png diff --git a/device-lynx.mk b/device-lynx.mk index 4434c83..24f8e8c 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -263,7 +263,10 @@ endif # SKU specific RROs PRODUCT_PACKAGES += \ - SettingsOverlayG82U8 + SettingsOverlayG82U8 \ + SettingsOverlayG0DZQ \ + SettingsOverlayGHL1X \ + SettingsOverlayGWKK3 # Biometrics virtual HAL for e2e testing PRODUCT_PACKAGES_DEBUG += \ diff --git a/lynx/overlay_packages/SettingsOverlayG0DZQ/Android.bp b/lynx/overlay_packages/SettingsOverlayG0DZQ/Android.bp new file mode 100644 index 0000000..58e74b3 --- /dev/null +++ b/lynx/overlay_packages/SettingsOverlayG0DZQ/Android.bp @@ -0,0 +1,8 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +runtime_resource_overlay { + name: "SettingsOverlayG0DZQ", + product_specific: true, +} diff --git a/lynx/overlay_packages/SettingsOverlayG0DZQ/AndroidManifest.xml b/lynx/overlay_packages/SettingsOverlayG0DZQ/AndroidManifest.xml new file mode 100644 index 0000000..80eb718 --- /dev/null +++ b/lynx/overlay_packages/SettingsOverlayG0DZQ/AndroidManifest.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/lynx/overlay_packages/SettingsOverlayG0DZQ/res/drawable/regulatory_info.png b/lynx/overlay_packages/SettingsOverlayG0DZQ/res/drawable/regulatory_info.png new file mode 100644 index 0000000..3cbbbd6 Binary files /dev/null and b/lynx/overlay_packages/SettingsOverlayG0DZQ/res/drawable/regulatory_info.png differ diff --git a/lynx/overlay_packages/SettingsOverlayG82U8/res/drawable/regulatory_info.png b/lynx/overlay_packages/SettingsOverlayG82U8/res/drawable/regulatory_info.png index cb9d273..8ec2af0 100644 Binary files a/lynx/overlay_packages/SettingsOverlayG82U8/res/drawable/regulatory_info.png and b/lynx/overlay_packages/SettingsOverlayG82U8/res/drawable/regulatory_info.png differ diff --git a/lynx/overlay_packages/SettingsOverlayGHL1X/Android.bp b/lynx/overlay_packages/SettingsOverlayGHL1X/Android.bp new file mode 100644 index 0000000..9194826 --- /dev/null +++ b/lynx/overlay_packages/SettingsOverlayGHL1X/Android.bp @@ -0,0 +1,8 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +runtime_resource_overlay { + name: "SettingsOverlayGHL1X", + product_specific: true, +} diff --git a/lynx/overlay_packages/SettingsOverlayGHL1X/AndroidManifest.xml b/lynx/overlay_packages/SettingsOverlayGHL1X/AndroidManifest.xml new file mode 100644 index 0000000..e186a15 --- /dev/null +++ b/lynx/overlay_packages/SettingsOverlayGHL1X/AndroidManifest.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/lynx/overlay_packages/SettingsOverlayGHL1X/res/drawable/regulatory_info.png b/lynx/overlay_packages/SettingsOverlayGHL1X/res/drawable/regulatory_info.png new file mode 100644 index 0000000..40434a6 Binary files /dev/null and b/lynx/overlay_packages/SettingsOverlayGHL1X/res/drawable/regulatory_info.png differ diff --git a/lynx/overlay_packages/SettingsOverlayGWKK3/Android.bp b/lynx/overlay_packages/SettingsOverlayGWKK3/Android.bp new file mode 100644 index 0000000..b0c5b79 --- /dev/null +++ b/lynx/overlay_packages/SettingsOverlayGWKK3/Android.bp @@ -0,0 +1,8 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +runtime_resource_overlay { + name: "SettingsOverlayGWKK3", + product_specific: true, +} diff --git a/lynx/overlay_packages/SettingsOverlayGWKK3/AndroidManifest.xml b/lynx/overlay_packages/SettingsOverlayGWKK3/AndroidManifest.xml new file mode 100644 index 0000000..5a475a5 --- /dev/null +++ b/lynx/overlay_packages/SettingsOverlayGWKK3/AndroidManifest.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/lynx/overlay_packages/SettingsOverlayGWKK3/res/drawable/regulatory_info.png b/lynx/overlay_packages/SettingsOverlayGWKK3/res/drawable/regulatory_info.png new file mode 100644 index 0000000..c7d16d6 Binary files /dev/null and b/lynx/overlay_packages/SettingsOverlayGWKK3/res/drawable/regulatory_info.png differ -- cgit v1.2.3 From 3d6c47ad639c0334ecdf71ac03651725732dd975 Mon Sep 17 00:00:00 2001 From: Chris Paulo Date: Tue, 6 Dec 2022 01:00:26 +0000 Subject: device/lynx: Change to use common vibrator HAL Use common vibrator hal in hardware/google/pixel instead of device/google/lynx. This will use the common vibrator hal from now on to support the adaptive haptics feature Bug: 198239103 Test: Verified on device Change-Id: I5d044a6ac6f87931e3b024948ed028c92c58f294 Signed-off-by: Chris Paulo --- conf/init.lynx.rc | 7 ------- device-lynx.mk | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index 2bdf3ab..97bf4d7 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -110,13 +110,6 @@ on override-sf-uclamp on property:ro.boot.hardware.sku=G82U8 setprop audio.camerasound.force true -# Route vibrator.adaptive_haptics.enabled to persist -on property:vibrator.adaptive_haptics.enabled=0 - setprop persist.vendor.vibrator.hal.context.enable false - -on property:vibrator.adaptive_haptics.enabled=1 - setprop persist.vendor.vibrator.hal.context.enable true - # Haptics on property:vendor.all.modules.ready=1 mkdir /mnt/vendor/persist/haptics 0770 system system diff --git a/device-lynx.mk b/device-lynx.mk index 24f8e8c..6db2aa4 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -28,7 +28,7 @@ DEVICE_PACKAGE_OVERLAYS += device/google/lynx/lynx/overlay include device/google/lynx/audio/lynx/audio-tables.mk include device/google/gs201/device-shipping-common.mk -include device/google/lynx/vibrator/cs40l26/device.mk +include hardware/google/pixel/vibrator/cs40l26/device.mk include device/google/gs-common/touch/gti/gti.mk # go/lyric-soong-variables -- cgit v1.2.3 From b981373d8399f00d4d24f2055a9f569f21360494 Mon Sep 17 00:00:00 2001 From: Chris Paulo Date: Tue, 6 Dec 2022 01:02:16 +0000 Subject: device/lynx: Remove device specific vibrator hal Remove the device specific vibrator hal since common hal in hardware/google/pixel is now being used Bug: 198239103 Test: Verified on device Change-Id: I852e981c55a6d40fa17ad0fe31a109ab2cfe8603 Signed-off-by: Chris Paulo --- vibrator/Android.bp | 52 - vibrator/OWNERS | 4 - vibrator/common/Android.bp | 37 - vibrator/common/HardwareBase.cpp | 136 -- vibrator/common/HardwareBase.h | 221 --- vibrator/common/utils.h | 173 --- vibrator/cs40l26/Android.bp | 107 -- vibrator/cs40l26/CapoDetector.cpp | 216 --- vibrator/cs40l26/Hardware.h | 362 ----- vibrator/cs40l26/TEST_MAPPING | 10 - vibrator/cs40l26/Vibrator.cpp | 1441 -------------------- vibrator/cs40l26/Vibrator.h | 235 ---- ...rdware.vibrator-service.cs40l26-private-lynx.rc | 47 - ...dware.vibrator-service.cs40l26-private-lynx.xml | 7 - vibrator/cs40l26/device.mk | 6 - vibrator/cs40l26/inc/CapoDetector.h | 107 -- vibrator/cs40l26/proto/capo.proto | 148 -- vibrator/cs40l26/service.cpp | 55 - vibrator/cs40l26/tests/Android.bp | 35 - vibrator/cs40l26/tests/mocks.h | 85 -- vibrator/cs40l26/tests/test-hwapi.cpp | 288 ---- vibrator/cs40l26/tests/test-hwcal.cpp | 386 ------ vibrator/cs40l26/tests/test-vibrator.cpp | 692 ---------- vibrator/cs40l26/tests/types.h | 33 - vibrator/cs40l26/tests/utils.h | 46 - 25 files changed, 4929 deletions(-) delete mode 100644 vibrator/Android.bp delete mode 100644 vibrator/OWNERS delete mode 100644 vibrator/common/Android.bp delete mode 100644 vibrator/common/HardwareBase.cpp delete mode 100644 vibrator/common/HardwareBase.h delete mode 100644 vibrator/common/utils.h delete mode 100644 vibrator/cs40l26/Android.bp delete mode 100644 vibrator/cs40l26/CapoDetector.cpp delete mode 100644 vibrator/cs40l26/Hardware.h delete mode 100644 vibrator/cs40l26/TEST_MAPPING delete mode 100644 vibrator/cs40l26/Vibrator.cpp delete mode 100644 vibrator/cs40l26/Vibrator.h delete mode 100644 vibrator/cs40l26/android.hardware.vibrator-service.cs40l26-private-lynx.rc delete mode 100644 vibrator/cs40l26/android.hardware.vibrator-service.cs40l26-private-lynx.xml delete mode 100644 vibrator/cs40l26/device.mk delete mode 100644 vibrator/cs40l26/inc/CapoDetector.h delete mode 100644 vibrator/cs40l26/proto/capo.proto delete mode 100644 vibrator/cs40l26/service.cpp delete mode 100644 vibrator/cs40l26/tests/Android.bp delete mode 100644 vibrator/cs40l26/tests/mocks.h delete mode 100644 vibrator/cs40l26/tests/test-hwapi.cpp delete mode 100644 vibrator/cs40l26/tests/test-hwcal.cpp delete mode 100644 vibrator/cs40l26/tests/test-vibrator.cpp delete mode 100644 vibrator/cs40l26/tests/types.h delete mode 100644 vibrator/cs40l26/tests/utils.h diff --git a/vibrator/Android.bp b/vibrator/Android.bp deleted file mode 100644 index c6da071..0000000 --- a/vibrator/Android.bp +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (C) 2019 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package { - default_applicable_licenses: ["Android-Apache-2.0"], -} - -cc_defaults { - name: "PixelVibratorDefaultsPrivateLynx", - relative_install_path: "hw", - static_libs: [ - "PixelVibratorCommonPrivateLynx", - ], - shared_libs: [ - "libbase", - "libbinder_ndk", - "libcutils", - "libhardware", - "liblog", - "libutils", - ], -} - -cc_defaults { - name: "PixelVibratorBinaryDefaultsPrivateLynx", - defaults: ["PixelVibratorDefaultsPrivateLynx"], - shared_libs: [ - "android.hardware.vibrator-V2-ndk", - ], -} - -cc_defaults { - name: "PixelVibratorTestDefaultsPrivateLynx", - defaults: ["PixelVibratorDefaultsPrivateLynx"], - static_libs: [ - "android.hardware.vibrator-V2-ndk", - ], - test_suites: ["device-tests"], - require_root: true, -} diff --git a/vibrator/OWNERS b/vibrator/OWNERS deleted file mode 100644 index 899224c..0000000 --- a/vibrator/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -chasewu@google.com -michaelwr@google.com -taikuo@google.com -chrispaulo@google.com diff --git a/vibrator/common/Android.bp b/vibrator/common/Android.bp deleted file mode 100644 index b2a6d48..0000000 --- a/vibrator/common/Android.bp +++ /dev/null @@ -1,37 +0,0 @@ -// -// Copyright (C) 2019 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package { - default_applicable_licenses: ["Android-Apache-2.0"], -} - -cc_library { - name: "PixelVibratorCommonPrivateLynx", - srcs: [ - "HardwareBase.cpp", - ], - shared_libs: [ - "libbase", - "libcutils", - "liblog", - "libutils", - ], - cflags: [ - "-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)", - "-DLOG_TAG=\"android.hardware.vibrator@1.x-common\"", - ], - export_include_dirs: ["."], - vendor_available: true, -} diff --git a/vibrator/common/HardwareBase.cpp b/vibrator/common/HardwareBase.cpp deleted file mode 100644 index 8e07e99..0000000 --- a/vibrator/common/HardwareBase.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) 2019 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "HardwareBase.h" - -#include -#include - -#include -#include - -#include "utils.h" - -namespace aidl { -namespace android { -namespace hardware { -namespace vibrator { - -HwApiBase::HwApiBase() { - mPathPrefix = std::getenv("HWAPI_PATH_PREFIX") ?: ""; - if (mPathPrefix.empty()) { - ALOGE("Failed get HWAPI path prefix!"); - } -} - -void HwApiBase::saveName(const std::string &name, const std::ios *stream) { - mNames[stream] = name; -} - -bool HwApiBase::has(const std::ios &stream) { - return !!stream; -} - -void HwApiBase::debug(int fd) { - dprintf(fd, "Kernel:\n"); - - for (auto &entry : utils::pathsFromEnv("HWAPI_DEBUG_PATHS", mPathPrefix)) { - auto &path = entry.first; - auto &stream = entry.second; - std::string line; - - dprintf(fd, " %s:\n", path.c_str()); - while (std::getline(stream, line)) { - dprintf(fd, " %s\n", line.c_str()); - } - } - - mRecordsMutex.lock(); - dprintf(fd, " Records:\n"); - for (auto &r : mRecords) { - if (r == nullptr) { - continue; - } - dprintf(fd, " %s\n", r->toString(mNames).c_str()); - } - mRecordsMutex.unlock(); -} - -HwCalBase::HwCalBase() { - std::ifstream calfile; - auto propertyPrefix = std::getenv("PROPERTY_PREFIX"); - - if (propertyPrefix != NULL) { - mPropertyPrefix = std::string(propertyPrefix); - } else { - ALOGE("Failed get property prefix!"); - } - - utils::fileFromEnv("CALIBRATION_FILEPATH", &calfile); - - for (std::string line; std::getline(calfile, line);) { - if (line.empty() || line[0] == '#') { - continue; - } - std::istringstream is_line(line); - std::string key, value; - if (std::getline(is_line, key, ':') && std::getline(is_line, value)) { - mCalData[utils::trim(key)] = utils::trim(value); - } - } -} - -void HwCalBase::debug(int fd) { - std::ifstream stream; - std::string path; - std::string line; - struct context { - HwCalBase *obj; - int fd; - } context{this, fd}; - - dprintf(fd, "Properties:\n"); - - property_list( - [](const char *key, const char *value, void *cookie) { - struct context *context = static_cast(cookie); - HwCalBase *obj = context->obj; - int fd = context->fd; - const std::string expect{obj->mPropertyPrefix}; - const std::string actual{key, std::min(strlen(key), expect.size())}; - if (actual == expect) { - dprintf(fd, " %s:\n", key); - dprintf(fd, " %s\n", value); - } - }, - &context); - - dprintf(fd, "\n"); - - dprintf(fd, "Persist:\n"); - - utils::fileFromEnv("CALIBRATION_FILEPATH", &stream, &path); - - dprintf(fd, " %s:\n", path.c_str()); - while (std::getline(stream, line)) { - dprintf(fd, " %s\n", line.c_str()); - } -} - -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/common/HardwareBase.h b/vibrator/common/HardwareBase.h deleted file mode 100644 index 5b07040..0000000 --- a/vibrator/common/HardwareBase.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (C) 2019 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "utils.h" - -namespace aidl { -namespace android { -namespace hardware { -namespace vibrator { - -using ::android::base::unique_fd; - -class HwApiBase { - private: - using NamesMap = std::map; - - class RecordInterface { - public: - virtual std::string toString(const NamesMap &names) = 0; - virtual ~RecordInterface() {} - }; - template - class Record : public RecordInterface { - public: - Record(const char *func, const T &value, const std::ios *stream) - : mFunc(func), mValue(value), mStream(stream) {} - std::string toString(const NamesMap &names) override; - - private: - const char *mFunc; - const T mValue; - const std::ios *mStream; - }; - using Records = std::list>; - - static constexpr uint32_t RECORDS_SIZE = 32; - - public: - HwApiBase(); - void debug(int fd); - - protected: - void saveName(const std::string &name, const std::ios *stream); - template - void open(const std::string &name, T *stream); - bool has(const std::ios &stream); - template - bool get(T *value, std::istream *stream); - template - bool set(const T &value, std::ostream *stream); - template - bool poll(const T &value, std::istream *stream, const int32_t timeout = -1); - template - void record(const char *func, const T &value, const std::ios *stream); - - private: - std::string mPathPrefix; - NamesMap mNames; - Records mRecords{RECORDS_SIZE}; - std::mutex mRecordsMutex; - std::mutex mIoMutex; -}; - -#define HWAPI_RECORD(args...) HwApiBase::record(__FUNCTION__, ##args) - -template -void HwApiBase::open(const std::string &name, T *stream) { - saveName(name, stream); - utils::openNoCreate(mPathPrefix + name, stream); -} - -template -bool HwApiBase::get(T *value, std::istream *stream) { - ATRACE_NAME("HwApi::get"); - std::scoped_lock ioLock{mIoMutex}; - bool ret; - stream->seekg(0); - *stream >> *value; - if (!(ret = !!*stream)) { - ALOGE("Failed to read %s (%d): %s", mNames[stream].c_str(), errno, strerror(errno)); - } - stream->clear(); - HWAPI_RECORD(*value, stream); - return ret; -} - -template -bool HwApiBase::set(const T &value, std::ostream *stream) { - ATRACE_NAME("HwApi::set"); - using utils::operator<<; - std::scoped_lock ioLock{mIoMutex}; - bool ret; - *stream << value << std::endl; - if (!(ret = !!*stream)) { - ALOGE("Failed to write %s (%d): %s", mNames[stream].c_str(), errno, strerror(errno)); - stream->clear(); - } - HWAPI_RECORD(value, stream); - return ret; -} - -template -bool HwApiBase::poll(const T &value, std::istream *stream, const int32_t timeoutMs) { - ATRACE_NAME("HwApi::poll"); - auto path = mPathPrefix + mNames[stream]; - unique_fd fileFd{::open(path.c_str(), O_RDONLY)}; - unique_fd epollFd{epoll_create(1)}; - epoll_event event = { - .events = EPOLLPRI | EPOLLET, - }; - T actual; - bool ret; - int epollRet; - - if (timeoutMs < -1) { - ALOGE("Invalid polling timeout!"); - return false; - } - - if (epoll_ctl(epollFd, EPOLL_CTL_ADD, fileFd, &event)) { - ALOGE("Failed to poll %s (%d): %s", mNames[stream].c_str(), errno, strerror(errno)); - return false; - } - - while ((ret = get(&actual, stream)) && (actual != value)) { - epollRet = epoll_wait(epollFd, &event, 1, timeoutMs); - if (epollRet <= 0) { - ALOGE("Polling error or timeout! (%d)", epollRet); - return false; - } - } - - HWAPI_RECORD(value, stream); - return ret; -} - -template -void HwApiBase::record(const char *func, const T &value, const std::ios *stream) { - std::lock_guard lock(mRecordsMutex); - mRecords.emplace_back(std::make_unique>(func, value, stream)); - mRecords.pop_front(); -} - -template -std::string HwApiBase::Record::toString(const NamesMap &names) { - using utils::operator<<; - std::stringstream ret; - - ret << mFunc << " '" << names.at(mStream) << "' = '" << mValue << "'"; - - return ret.str(); -} - -class HwCalBase { - public: - HwCalBase(); - void debug(int fd); - - protected: - template - bool getProperty(const char *key, T *value, const T defval); - template - bool getPersist(const char *key, T *value); - - private: - std::string mPropertyPrefix; - std::map mCalData; -}; - -template -bool HwCalBase::getProperty(const char *key, T *outval, const T defval) { - ATRACE_NAME("HwCal::getProperty"); - *outval = utils::getProperty(mPropertyPrefix + key, defval); - return true; -} - -template -bool HwCalBase::getPersist(const char *key, T *value) { - ATRACE_NAME("HwCal::getPersist"); - auto it = mCalData.find(key); - if (it == mCalData.end()) { - ALOGE("Missing %s config!", key); - return false; - } - std::stringstream stream{it->second}; - utils::unpack(stream, value); - if (!stream || !stream.eof()) { - ALOGE("Invalid %s config!", key); - return false; - } - return true; -} - -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/common/utils.h b/vibrator/common/utils.h deleted file mode 100644 index 188554d..0000000 --- a/vibrator/common/utils.h +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Copyright (C) 2019 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include -#include -#include -#include - -#include -#include -#include - -namespace aidl { -namespace android { -namespace hardware { -namespace vibrator { -namespace utils { - -template -class Is_Iterable { - private: - template - static std::true_type test(typename U::iterator *u); - - template - static std::false_type test(U *u); - - public: - static const bool value = decltype(test(0))::value; -}; - -template -using Enable_If_Iterable = std::enable_if_t::value == B>; - -template -using Enable_If_Signed = std::enable_if_t, U>; - -template -using Enable_If_Unsigned = std::enable_if_t, U>; - -// override for default behavior of printing as a character -inline std::ostream &operator<<(std::ostream &stream, const int8_t value) { - return stream << +value; -} -// override for default behavior of printing as a character -inline std::ostream &operator<<(std::ostream &stream, const uint8_t value) { - return stream << +value; -} - -template -inline auto toUnderlying(const T value) { - return static_cast>(value); -} - -template -inline Enable_If_Iterable unpack(std::istream &stream, T *value) { - for (auto &entry : *value) { - stream >> entry; - } -} - -template -inline Enable_If_Iterable unpack(std::istream &stream, T *value) { - stream >> *value; -} - -template <> -inline void unpack(std::istream &stream, std::string *value) { - *value = std::string(std::istreambuf_iterator(stream), {}); - stream.setstate(std::istream::eofbit); -} - -template -inline Enable_If_Signed getProperty(const std::string &key, const T def) { - if (std::is_floating_point_v) { - float result; - std::string value = ::android::base::GetProperty(key, ""); - if (!value.empty() && ::android::base::ParseFloat(value, &result)) { - return result; - } - return def; - } else { - return ::android::base::GetIntProperty(key, def); - } -} - -template -inline Enable_If_Unsigned getProperty(const std::string &key, const T def) { - return ::android::base::GetUintProperty(key, def); -} - -template <> -inline bool getProperty(const std::string &key, const bool def) { - return ::android::base::GetBoolProperty(key, def); -} - -template -static void openNoCreate(const std::string &file, T *outStream) { - auto mode = std::is_base_of_v ? std::ios_base::out : std::ios_base::in; - - // Force 'in' mode to prevent file creation - outStream->open(file, mode | std::ios_base::in); - if (!*outStream) { - ALOGE("Failed to open %s (%d): %s", file.c_str(), errno, strerror(errno)); - } -} - -template -static void fileFromEnv(const char *env, T *outStream, std::string *outName = nullptr) { - auto file = std::getenv(env); - - if (file == nullptr) { - ALOGE("Failed get env %s", env); - return; - } - - if (outName != nullptr) { - *outName = std::string(file); - } - - openNoCreate(file, outStream); -} - -static ATTRIBUTE_UNUSED auto pathsFromEnv(const char *env, const std::string &prefix = "") { - std::map ret; - auto value = std::getenv(env); - - if (value == nullptr) { - return ret; - } - - std::istringstream paths{value}; - std::string path; - - while (paths >> path) { - ret[path].open(prefix + path); - } - - return ret; -} - -static ATTRIBUTE_UNUSED std::string trim(const std::string &str, - const std::string &whitespace = " \t") { - const auto str_begin = str.find_first_not_of(whitespace); - if (str_begin == std::string::npos) { - return ""; - } - - const auto str_end = str.find_last_not_of(whitespace); - const auto str_range = str_end - str_begin + 1; - - return str.substr(str_begin, str_range); -} - -} // namespace utils -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/cs40l26/Android.bp b/vibrator/cs40l26/Android.bp deleted file mode 100644 index f60189d..0000000 --- a/vibrator/cs40l26/Android.bp +++ /dev/null @@ -1,107 +0,0 @@ -// -// Copyright (C) 2022 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package { - default_applicable_licenses: ["Android-Apache-2.0"], -} - -cc_defaults { - name: "android.hardware.vibrator-defaults.cs40l26-private-lynx", - cflags: [ - "-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)", - "-DLOG_TAG=\"android.hardware.vibrator-cs40l26\"", - ], - shared_libs: [ - "libbinder", - ], -} - -cc_defaults { - name: "VibratorHalCs40l26BinaryDefaultsPrivateLynx", - defaults: [ - "PixelVibratorBinaryDefaultsPrivateLynx", - "android.hardware.vibrator-defaults.cs40l26-private-lynx", - ], - include_dirs: [ - "external/tinyalsa/include", - ], - shared_libs: [ - "libcutils", - "libtinyalsa", - ], -} - -cc_defaults { - name: "VibratorHalCs40l26TestDefaultsPrivateLynx", - defaults: [ - "PixelVibratorTestDefaultsPrivateLynx", - "android.hardware.vibrator-defaults.cs40l26-private-lynx", - ], - static_libs: [ - "libtinyalsa", - ], - shared_libs: ["android.hardware.vibrator-impl.cs40l26-private-lynx"], -} - -cc_library_shared { - name: "libvibecapo_proto_lynx", - vendor_available: true, - owner: "google", - srcs: [ - "proto/capo.proto", - ], - shared_libs: [ - "libprotobuf-cpp-full", - ], - export_include_dirs: [ - "inc", - ], - proto: { - type: "lite", - export_proto_headers: true, - }, -} - -cc_library_shared { - name: "android.hardware.vibrator-impl.cs40l26-private-lynx", - defaults: ["VibratorHalCs40l26BinaryDefaultsPrivateLynx"], - srcs: [ - "Vibrator.cpp", - "CapoDetector.cpp", - ], - static_libs: [ - "chre_client", - ], - shared_libs: [ - "libvibecapo_proto_lynx", - "libprotobuf-cpp-full", - ], - export_include_dirs: [ - ".", - "inc", - ], - vendor_available: true, - visibility: [":__subpackages__"], -} - -cc_binary { - name: "android.hardware.vibrator-service.cs40l26-private-lynx", - defaults: ["VibratorHalCs40l26BinaryDefaultsPrivateLynx"], - init_rc: ["android.hardware.vibrator-service.cs40l26-private-lynx.rc"], - vintf_fragments: ["android.hardware.vibrator-service.cs40l26-private-lynx.xml"], - srcs: ["service.cpp"], - shared_libs: ["android.hardware.vibrator-impl.cs40l26-private-lynx"], - proprietary: true, -} diff --git a/vibrator/cs40l26/CapoDetector.cpp b/vibrator/cs40l26/CapoDetector.cpp deleted file mode 100644 index 1b8ba89..0000000 --- a/vibrator/cs40l26/CapoDetector.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright 2022 Google LLC. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "CapoDetector.h" -#include -#include -#include - -#include - -#ifdef LOG_TAG -#undef LOG_TAG -#define LOG_TAG "CapoDetector" -#endif - -namespace android { -namespace chre { - -namespace { // anonymous namespace for file-local definitions - -static capo::ConfigureDetector_ConfigData config_data = capo::ConfigureDetector_ConfigData(); -static capo::ConfigureDetector msg = capo::ConfigureDetector(); - - -/** - * Called when onConnected() to send NanoappList request. - */ -void requestNanoappList(SocketClient &client) { - flatbuffers::FlatBufferBuilder builder; - HostProtocolHost::encodeNanoappListRequest(builder); - if (!client.sendMessage(builder.GetBufferPointer(), builder.GetSize())) { - ALOGE("Failed to send NanoappList request"); - } -} - -} // namespace - -/** - * Called when initializing connection with CHRE socket. - */ -sp CapoDetector::start() { - sp listener = new CapoDetector(); - if (!listener->connectInBackground(kChreSocketName, listener)) { - ALOGE("Couldn't connect to CHRE socket"); - return nullptr; - } - ALOGI("%s connect to CHRE socket.", __func__); - - return listener; -} - -/** - * Called when the socket is successfully (re-)connected. - * Reset the position and try to send NanoappList request. - */ -void CapoDetector::onConnected() { - flatbuffers::FlatBufferBuilder builder; - - // Reset the last position type. - last_position_type_ = capo::PositionType::UNKNOWN; - requestNanoappList(*this); -} - -/** - * Called when we have failed to (re-)connect the socket after many attempts - * and are giving up. - */ -void CapoDetector::onConnectionAborted() { - ALOGE("%s, Capo Aborting Connection!", __func__); -} - -/** - * Invoked when the socket is disconnected, and this connection loss was not - * the result of an explicit call to disconnect(). - * Reset the position while disconnecting. - */ - -void CapoDetector::onDisconnected() { - last_position_type_ = capo::PositionType::UNKNOWN; -} - -/** - * Decode unix socket msgs to CHRE messages, and call the appropriate - * callback depending on the CHRE message. - */ -void CapoDetector::onMessageReceived(const void *data, size_t length) { - if (!HostProtocolHost::decodeMessageFromChre(data, length, *this)) { - ALOGE("Failed to decode message"); - } -} - -/** - * Listen for messages from capo nanoapp and handle the message. - */ -void CapoDetector::handleNanoappMessage(const fbs::NanoappMessageT &message) { - ALOGI("%s, Id %" PRIu64 ", type %d, size %d", __func__, message.app_id, message.message_type, - static_cast(message.message.size())); - // Exclude the message with unmatched nanoapp id. - if (message.app_id != kCapoNanoappId) - return; - - // Handle the message with message_type. - switch (message.message_type) { - case capo::MessageType::ACK_NOTIFICATION: { - capo::AckNotification gd; - gd.set_notification_type(static_cast(message.message[1])); - ALOGD("%s, get notification event from capo nanoapp, type %d", __func__, - gd.notification_type()); - break; - } - case capo::MessageType::POSITION_DETECTED: { - capo::PositionDetected gd; - gd.set_position_type(static_cast(message.message[1])); - ALOGD("%s, get position event from capo nanoapp, type %d", __func__, - gd.position_type()); - - // Callback to function while getting carried position event. - if (callback_func_ != nullptr) { - last_position_type_ = gd.position_type(); - ALOGD("%s, sent position type %d to callback function", __func__, - last_position_type_); - callback_func_(last_position_type_); - } - break; - } - default: - ALOGE("%s, get invalid message, type: %" PRIu32 ", from capo nanoapp.", __func__, - message.message_type); - break; - } -} - -/** - * Handle the response of a NanoappList request. - * Ensure that capo nanoapp is running. - */ -void CapoDetector::handleNanoappListResponse(const fbs::NanoappListResponseT &response) { - for (const std::unique_ptr &nanoapp : response.nanoapps) { - if (nanoapp->app_id == kCapoNanoappId) { - if (nanoapp->enabled) - enable(); - else - ALOGE("Capo nanoapp not enabled"); - return; - } - } - ALOGE("Capo nanoapp not found"); -} - -/** - * Send enabling message to the nanoapp. - */ -void CapoDetector::enable() { - // Create CHRE message with serialized message - flatbuffers::FlatBufferBuilder builder, config_builder, force_builder; - - config_data.set_still_time_threshold_nanosecond(mCapoDetectorMDParameters.still_time_threshold_ns); - config_data.set_window_width_nanosecond(mCapoDetectorMDParameters.window_width_ns); - config_data.set_motion_confidence_threshold(mCapoDetectorMDParameters.motion_confidence_threshold); - config_data.set_still_confidence_threshold(mCapoDetectorMDParameters.still_confidence_threshold); - config_data.set_var_threshold(mCapoDetectorMDParameters.var_threshold); - config_data.set_var_threshold_delta(mCapoDetectorMDParameters.var_threshold_delta); - - msg.set_allocated_config_data(&config_data); - - auto pb_size = msg.ByteSizeLong(); - auto pb_data = std::make_unique(pb_size); - - if (!msg.SerializeToArray(pb_data.get(), pb_size)) { - ALOGE("Failed to serialize message."); - } - - ALOGI("Configuring CapoDetector"); - // Configure the detector from host-side - android::chre::HostProtocolHost::encodeNanoappMessage( - config_builder, getNanoppAppId(), capo::MessageType::CONFIGURE_DETECTOR, getHostEndPoint(), - pb_data.get(), pb_size); - ALOGI("Sending capo config message to Nanoapp, %" PRIu32 " bytes", config_builder.GetSize()); - if (!sendMessage(config_builder.GetBufferPointer(), config_builder.GetSize())) { - ALOGE("Failed to send config event for capo nanoapp"); - } - - ALOGI("Enabling CapoDetector"); - android::chre::HostProtocolHost::encodeNanoappMessage( - builder, getNanoppAppId(), capo::MessageType::ENABLE_DETECTOR, getHostEndPoint(), - /*messageData*/ nullptr, /*messageDataLenbuffer*/ 0); - ALOGI("Sending enable message to Nanoapp, %" PRIu32 " bytes", builder.GetSize()); - if (!sendMessage(builder.GetBufferPointer(), builder.GetSize())) { - ALOGE("Failed to send enable event for capo nanoapp"); - } - - ALOGI("Forcing CapoDetector to update state"); - // Force an updated state upon connection - android::chre::HostProtocolHost::encodeNanoappMessage( - force_builder, getNanoppAppId(), capo::MessageType::FORCE_UPDATE, getHostEndPoint(), - /*messageData*/ nullptr, /*messageDataLenbuffer*/ 0); - ALOGI("Sending force-update message to Nanoapp, %" PRIu32 " bytes", force_builder.GetSize()); - if (!sendMessage(force_builder.GetBufferPointer(), force_builder.GetSize())) { - ALOGE("Failed to send force-update event for capo nanoapp"); - } -} - -} // namespace chre -} // namespace android diff --git a/vibrator/cs40l26/Hardware.h b/vibrator/cs40l26/Hardware.h deleted file mode 100644 index be97594..0000000 --- a/vibrator/cs40l26/Hardware.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include - -#include "HardwareBase.h" -#include "Vibrator.h" - -#define PROC_SND_PCM "/proc/asound/pcm" -#define HAPTIC_PCM_DEVICE_SYMBOL "haptic nohost playback" - -static struct pcm_config haptic_nohost_config = { - .channels = 1, - .rate = 48000, - .period_size = 80, - .period_count = 2, - .format = PCM_FORMAT_S16_LE, -}; - -enum WaveformIndex : uint16_t { - /* Physical waveform */ - WAVEFORM_LONG_VIBRATION_EFFECT_INDEX = 0, - WAVEFORM_RESERVED_INDEX_1 = 1, - WAVEFORM_CLICK_INDEX = 2, - WAVEFORM_SHORT_VIBRATION_EFFECT_INDEX = 3, - WAVEFORM_THUD_INDEX = 4, - WAVEFORM_SPIN_INDEX = 5, - WAVEFORM_QUICK_RISE_INDEX = 6, - WAVEFORM_SLOW_RISE_INDEX = 7, - WAVEFORM_QUICK_FALL_INDEX = 8, - WAVEFORM_LIGHT_TICK_INDEX = 9, - WAVEFORM_LOW_TICK_INDEX = 10, - WAVEFORM_RESERVED_MFG_1, - WAVEFORM_RESERVED_MFG_2, - WAVEFORM_RESERVED_MFG_3, - WAVEFORM_MAX_PHYSICAL_INDEX, - /* OWT waveform */ - WAVEFORM_COMPOSE = WAVEFORM_MAX_PHYSICAL_INDEX, - WAVEFORM_PWLE, - /* - * Refer to , the WAVEFORM_MAX_INDEX must not exceed 96. - * #define FF_GAIN 0x60 // 96 in decimal - * #define FF_MAX_EFFECTS FF_GAIN - */ - WAVEFORM_MAX_INDEX, -}; - -namespace aidl { -namespace android { -namespace hardware { -namespace vibrator { - -class HwApi : public Vibrator::HwApi, private HwApiBase { - public: - HwApi() { - open("calibration/f0_stored", &mF0); - open("default/f0_offset", &mF0Offset); - open("calibration/redc_stored", &mRedc); - open("calibration/q_stored", &mQ); - open("default/vibe_state", &mVibeState); - open("default/num_waves", &mEffectCount); - open("default/owt_free_space", &mOwtFreeSpace); - open("default/f0_comp_enable", &mF0CompEnable); - open("default/redc_comp_enable", &mRedcCompEnable); - open("default/delay_before_stop_playback_us", &mMinOnOffInterval); - } - - bool setF0(std::string value) override { return set(value, &mF0); } - bool setF0Offset(uint32_t value) override { return set(value, &mF0Offset); } - bool setRedc(std::string value) override { return set(value, &mRedc); } - bool setQ(std::string value) override { return set(value, &mQ); } - bool getEffectCount(uint32_t *value) override { return get(value, &mEffectCount); } - bool pollVibeState(uint32_t value, int32_t timeoutMs) override { - return poll(value, &mVibeState, timeoutMs); - } - bool hasOwtFreeSpace() override { return has(mOwtFreeSpace); } - bool getOwtFreeSpace(uint32_t *value) override { return get(value, &mOwtFreeSpace); } - bool setF0CompEnable(bool value) override { return set(value, &mF0CompEnable); } - bool setRedcCompEnable(bool value) override { return set(value, &mRedcCompEnable); } - bool setMinOnOffInterval(uint32_t value) override { return set(value, &mMinOnOffInterval); } - uint32_t getContextScale() override { - return utils::getProperty("persist.vendor.vibrator.hal.context.scale", 100); - } - bool getContextEnable() override { - return utils::getProperty("persist.vendor.vibrator.hal.context.enable", false); - } - uint32_t getContextSettlingTime() override { - return utils::getProperty("persist.vendor.vibrator.hal.context.settlingtime", 3000); - } - uint32_t getContextCooldownTime() override { - return utils::getProperty("persist.vendor.vibrator.hal.context.cooldowntime", 1000); - } - bool getContextFadeEnable() override { - return utils::getProperty("persist.vendor.vibrator.hal.context.fade", false); - } - - // TODO(b/234338136): Need to add the force feedback HW API test cases - bool setFFGain(int fd, uint16_t value) override { - struct input_event gain = { - .type = EV_FF, - .code = FF_GAIN, - .value = value, - }; - 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).replay.length != timeoutMs) || (ioctl(fd, EVIOCSFF, effect) < 0)) { - ALOGE("setFFEffect fail"); - return false; - } else { - return true; - } - } - bool setFFPlay(int fd, int8_t index, bool value) override { - struct input_event play = { - .type = EV_FF, - .code = static_cast(index), - .value = value, - }; - if (write(fd, (const void *)&play, sizeof(play)) != sizeof(play)) { - return false; - } else { - return true; - } - } - bool getHapticAlsaDevice(int *card, int *device) override { - std::string line; - std::ifstream myfile(PROC_SND_PCM); - if (myfile.is_open()) { - while (getline(myfile, line)) { - if (line.find(HAPTIC_PCM_DEVICE_SYMBOL) != std::string::npos) { - std::stringstream ss(line); - std::string currentToken; - std::getline(ss, currentToken, ':'); - sscanf(currentToken.c_str(), "%d-%d", card, device); - return true; - } - } - myfile.close(); - } else { - ALOGE("Failed to read file: %s", PROC_SND_PCM); - } - return false; - } - bool setHapticPcmAmp(struct pcm **haptic_pcm, bool enable, int card, int device) override { - int ret = 0; - - if (enable) { - *haptic_pcm = pcm_open(card, device, PCM_OUT, &haptic_nohost_config); - if (!pcm_is_ready(*haptic_pcm)) { - ALOGE("cannot open pcm_out driver: %s", pcm_get_error(*haptic_pcm)); - goto fail; - } - - ret = pcm_prepare(*haptic_pcm); - if (ret < 0) { - ALOGE("cannot prepare haptic_pcm: %s", pcm_get_error(*haptic_pcm)); - goto fail; - } - - ret = pcm_start(*haptic_pcm); - if (ret < 0) { - ALOGE("cannot start haptic_pcm: %s", pcm_get_error(*haptic_pcm)); - goto fail; - } - - return true; - } else { - if (*haptic_pcm) { - pcm_close(*haptic_pcm); - *haptic_pcm = NULL; - } - return true; - } - - fail: - pcm_close(*haptic_pcm); - *haptic_pcm = NULL; - return false; - } - bool uploadOwtEffect(int fd, uint8_t *owtData, 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"); - *status = EX_NULL_POINTER; - return false; - } - memcpy((*effect).u.periodic.custom_data, owtData, numBytes); - - if ((*effect).id != -1) { - ALOGE("(*effect).id != -1"); - } - - /* Create a new OWT waveform to update the PWLE or composite effect. */ - (*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; - } - - if ((*effect).id >= FF_MAX_EFFECTS || (*effect).id < 0) { - ALOGE("Invalid waveform index after upload OWT effect: %d", (*effect).id); - *status = EX_ILLEGAL_ARGUMENT; - return false; - } - *outEffectIndex = (*effect).id; - *status = 0; - return true; - } - bool eraseOwtEffect(int fd, int8_t effectIndex, std::vector *effect) override { - uint32_t effectCountBefore, effectCountAfter, i, successFlush = 0; - - if (effectIndex < WAVEFORM_MAX_PHYSICAL_INDEX) { - ALOGE("Invalid waveform index for OWT erase: %d", effectIndex); - return false; - } - - if (effectIndex < WAVEFORM_MAX_INDEX) { - /* Normal situation. Only erase the effect which we just played. */ - if (ioctl(fd, EVIOCRMFF, effectIndex) < 0) { - ALOGE("Failed to erase effect %d (%d): %s", effectIndex, errno, strerror(errno)); - } - for (i = WAVEFORM_MAX_PHYSICAL_INDEX; i < WAVEFORM_MAX_INDEX; i++) { - if ((*effect)[i].id == effectIndex) { - (*effect)[i].id = -1; - break; - } - } - } else { - /* Flush all non-prestored effects of ff-core and driver. */ - getEffectCount(&effectCountBefore); - for (i = WAVEFORM_MAX_PHYSICAL_INDEX; i < FF_MAX_EFFECTS; i++) { - if (ioctl(fd, EVIOCRMFF, i) >= 0) { - successFlush++; - } - } - getEffectCount(&effectCountAfter); - ALOGW("Flushed effects: ff: %d; driver: %d -> %d; success: %d", effectIndex, - effectCountBefore, effectCountAfter, successFlush); - /* Reset all OWT effect index of HAL. */ - for (i = WAVEFORM_MAX_PHYSICAL_INDEX; i < WAVEFORM_MAX_INDEX; i++) { - (*effect)[i].id = -1; - } - } - return true; - } - - void debug(int fd) override { HwApiBase::debug(fd); } - - private: - std::ofstream mF0; - std::ofstream mF0Offset; - std::ofstream mRedc; - std::ofstream mQ; - std::ifstream mEffectCount; - std::ifstream mVibeState; - std::ifstream mOwtFreeSpace; - std::ofstream mF0CompEnable; - std::ofstream mRedcCompEnable; - std::ofstream mMinOnOffInterval; -}; - -class HwCal : public Vibrator::HwCal, private HwCalBase { - private: - static constexpr char VERSION[] = "version"; - static constexpr char F0_CONFIG[] = "f0_measured"; - static constexpr char REDC_CONFIG[] = "redc_measured"; - static constexpr char Q_CONFIG[] = "q_measured"; - static constexpr char TICK_VOLTAGES_CONFIG[] = "v_tick"; - static constexpr char CLICK_VOLTAGES_CONFIG[] = "v_click"; - static constexpr char LONG_VOLTAGES_CONFIG[] = "v_long"; - - 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}; - - public: - HwCal() {} - - bool getVersion(uint32_t *value) override { - if (getPersist(VERSION, value)) { - return true; - } - *value = VERSION_DEFAULT; - return true; - } - bool getLongFrequencyShift(int32_t *value) override { - return getProperty("long.frequency.shift", value, DEFAULT_FREQUENCY_SHIFT); - } - bool getF0(std::string *value) override { return getPersist(F0_CONFIG, value); } - bool getRedc(std::string *value) override { return getPersist(REDC_CONFIG, value); } - bool getQ(std::string *value) override { return getPersist(Q_CONFIG, value); } - bool getTickVolLevels(std::array *value) override { - if (getPersist(TICK_VOLTAGES_CONFIG, value)) { - return true; - } - *value = V_TICK_DEFAULT; - return true; - } - bool getClickVolLevels(std::array *value) override { - if (getPersist(CLICK_VOLTAGES_CONFIG, value)) { - return true; - } - *value = V_CLICK_DEFAULT; - return true; - } - bool getLongVolLevels(std::array *value) override { - if (getPersist(LONG_VOLTAGES_CONFIG, value)) { - return true; - } - *value = V_LONG_DEFAULT; - return true; - } - bool isChirpEnabled() override { - bool value; - getProperty("chirp.enabled", &value, false); - return value; - } - bool getSupportedPrimitives(uint32_t *value) override { - return getProperty("supported_primitives", value, (uint32_t)0); - } - bool isF0CompEnabled() override { - bool value; - getProperty("f0.comp.enabled", &value, true); - return value; - } - bool isRedcCompEnabled() override { - bool value; - getProperty("redc.comp.enabled", &value, true); - return value; - } - void debug(int fd) override { HwCalBase::debug(fd); } -}; - -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/cs40l26/TEST_MAPPING b/vibrator/cs40l26/TEST_MAPPING deleted file mode 100644 index 1d8ff7a..0000000 --- a/vibrator/cs40l26/TEST_MAPPING +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presubmit": [ - { - "name": "VibratorHalCs40l26TestSuite", - "keywords": [ - "nextgen" - ] - } - ] -} diff --git a/vibrator/cs40l26/Vibrator.cpp b/vibrator/cs40l26/Vibrator.cpp deleted file mode 100644 index 21a1682..0000000 --- a/vibrator/cs40l26/Vibrator.cpp +++ /dev/null @@ -1,1441 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "Vibrator.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "CapoDetector.h" - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0])) -#endif - -#ifdef LOG_TAG -#undef LOG_TAG -#define LOG_TAG "Vibrator" -#endif - -using CapoDetector = android::chre::CapoDetector; - -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; - -static constexpr uint32_t WAVEFORM_DOUBLE_CLICK_SILENCE_MS = 100; - -static constexpr uint32_t WAVEFORM_LONG_VIBRATION_THRESHOLD_MS = 50; - -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 uint32_t MIN_ON_OFF_INTERVAL_US = 8500; // SVC initialization time -static constexpr int8_t MAX_PAUSE_TIMING_ERROR_MS = 1; // ALERT Irq Handling -static constexpr uint32_t MAX_TIME_MS = UINT16_MAX; - -static constexpr auto ASYNC_COMPLETION_TIMEOUT = std::chrono::milliseconds(100); -static constexpr auto POLLING_TIMEOUT = 20; -static constexpr int32_t COMPOSE_DELAY_MAX_MS = 10000; - -/* nsections is 8 bits. Need to preserve 1 section for the first delay before the first effect. */ -static constexpr int32_t COMPOSE_SIZE_MAX = 254; -static constexpr int32_t COMPOSE_PWLE_SIZE_MAX_DEFAULT = 127; - -// Measured resonant frequency, f0_measured, is represented by Q10.14 fixed -// point format on cs40l26 devices. The expression to calculate f0 is: -// f0 = f0_measured / 2^Q14_BIT_SHIFT -// See the LRA Calibration Support documentation for more details. -static constexpr int32_t Q14_BIT_SHIFT = 14; - -// Measured Q factor, q_measured, is represented by Q8.16 fixed -// point format on cs40l26 devices. The expression to calculate q is: -// q = q_measured / 2^Q16_BIT_SHIFT -// See the LRA Calibration Support documentation for more details. -static constexpr int32_t Q16_BIT_SHIFT = 16; - -static constexpr int32_t COMPOSE_PWLE_PRIMITIVE_DURATION_MAX_MS = 16383; - -static constexpr uint32_t WT_LEN_CALCD = 0x00800000; -static constexpr uint8_t PWLE_CHIRP_BIT = 0x8; // Dynamic/static frequency and voltage -static constexpr uint8_t PWLE_BRAKE_BIT = 0x4; -static constexpr uint8_t PWLE_AMP_REG_BIT = 0x2; - -static constexpr float PWLE_LEVEL_MIN = 0.0; -static constexpr float PWLE_LEVEL_MAX = 1.0; -static constexpr float CS40L26_PWLE_LEVEL_MIX = -1.0; -static constexpr float CS40L26_PWLE_LEVEL_MAX = 0.9995118; -static constexpr float PWLE_FREQUENCY_RESOLUTION_HZ = 1.00; -static constexpr float PWLE_FREQUENCY_MIN_HZ = 1.00; -static constexpr float PWLE_FREQUENCY_MAX_HZ = 1000.00; -static constexpr float PWLE_BW_MAP_SIZE = - 1 + ((PWLE_FREQUENCY_MAX_HZ - PWLE_FREQUENCY_MIN_HZ) / PWLE_FREQUENCY_RESOLUTION_HZ); - -#ifndef DISABLE_ADAPTIVE_HAPTICS_FEATURE -static constexpr bool mAdaptiveHapticsEnable = true; -#else -static constexpr bool mAdaptiveHapticsEnable = false; -#endif /* DISABLE_ADAPTIVE_HAPTICS_FEATURE */ - -static sp vibeContextListener; -uint8_t mCapoDeviceState = 0; -uint32_t mLastFaceUpEvent = 0; -uint32_t mLastEffectPlayedTime = 0; -float mLastPlayedScale = 0; - -static uint32_t getCurrentTimeInMs(void) { - return std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); -} - -static void capoEventCallback(uint8_t eventId) { - ALOGD("Vibrator %s, From: 0x%x To: 0x%x", __func__, mCapoDeviceState, (uint32_t)eventId); - // Record the last moment we were in FACE_UP state - if (mCapoDeviceState == capo::PositionType::ON_TABLE_FACE_UP || - eventId == capo::PositionType::ON_TABLE_FACE_UP) { - mLastFaceUpEvent = getCurrentTimeInMs(); - } - mCapoDeviceState = eventId; -} - -static uint8_t getDeviceState(void) { - return mCapoDeviceState; -} - -enum WaveformBankID : uint8_t { - RAM_WVFRM_BANK, - ROM_WVFRM_BANK, - OWT_WVFRM_BANK, -}; - -enum WaveformIndex : uint16_t { - /* Physical waveform */ - WAVEFORM_LONG_VIBRATION_EFFECT_INDEX = 0, - WAVEFORM_RESERVED_INDEX_1 = 1, - WAVEFORM_CLICK_INDEX = 2, - WAVEFORM_SHORT_VIBRATION_EFFECT_INDEX = 3, - WAVEFORM_THUD_INDEX = 4, - WAVEFORM_SPIN_INDEX = 5, - WAVEFORM_QUICK_RISE_INDEX = 6, - WAVEFORM_SLOW_RISE_INDEX = 7, - WAVEFORM_QUICK_FALL_INDEX = 8, - WAVEFORM_LIGHT_TICK_INDEX = 9, - WAVEFORM_LOW_TICK_INDEX = 10, - WAVEFORM_RESERVED_MFG_1, - WAVEFORM_RESERVED_MFG_2, - WAVEFORM_RESERVED_MFG_3, - WAVEFORM_MAX_PHYSICAL_INDEX, - /* OWT waveform */ - WAVEFORM_COMPOSE = WAVEFORM_MAX_PHYSICAL_INDEX, - WAVEFORM_PWLE, - /* - * Refer to , the WAVEFORM_MAX_INDEX must not exceed 96. - * #define FF_GAIN 0x60 // 96 in decimal - * #define FF_MAX_EFFECTS FF_GAIN - */ - WAVEFORM_MAX_INDEX, -}; - -std::vector defaultSupportedPrimitives = { - ndk::enum_range().begin(), ndk::enum_range().end()}; - -enum vibe_state { - VIBE_STATE_STOPPED = 0, - VIBE_STATE_HAPTIC, - VIBE_STATE_ASP, -}; - -std::mutex mActiveId_mutex; // protects mActiveId - -static int min(int x, int y) { - return x < y ? x : y; -} - -static int floatToUint16(float input, uint16_t *output, float scale, float min, float max) { - if (input < min || input > max) - return -ERANGE; - - *output = roundf(input * scale); - return 0; -} - -struct dspmem_chunk { - uint8_t *head; - uint8_t *current; - uint8_t *max; - int bytes; - - uint32_t cache; - int cachebits; -}; - -static dspmem_chunk *dspmem_chunk_create(void *data, int size) { - auto ch = new dspmem_chunk{ - .head = reinterpret_cast(data), - .current = reinterpret_cast(data), - .max = reinterpret_cast(data) + size, - }; - - return ch; -} - -static bool dspmem_chunk_end(struct dspmem_chunk *ch) { - return ch->current == ch->max; -} - -static int dspmem_chunk_bytes(struct dspmem_chunk *ch) { - return ch->bytes; -} - -static int dspmem_chunk_write(struct dspmem_chunk *ch, int nbits, uint32_t val) { - int nwrite, i; - - nwrite = min(24 - ch->cachebits, nbits); - ch->cache <<= nwrite; - ch->cache |= val >> (nbits - nwrite); - ch->cachebits += nwrite; - nbits -= nwrite; - - if (ch->cachebits == 24) { - if (dspmem_chunk_end(ch)) - return -ENOSPC; - - ch->cache &= 0xFFFFFF; - for (i = 0; i < sizeof(ch->cache); i++, ch->cache <<= 8) - *ch->current++ = (ch->cache & 0xFF000000) >> 24; - - ch->bytes += sizeof(ch->cache); - ch->cachebits = 0; - } - - if (nbits) - return dspmem_chunk_write(ch, nbits, val); - - return 0; -} - -static int dspmem_chunk_flush(struct dspmem_chunk *ch) { - if (!ch->cachebits) - return 0; - - return dspmem_chunk_write(ch, 24 - ch->cachebits, 0); -} - -Vibrator::Vibrator(std::unique_ptr hwapi, std::unique_ptr hwcal) - : mHwApi(std::move(hwapi)), mHwCal(std::move(hwcal)), mAsyncHandle(std::async([] {})) { - int32_t longFrequencyShift; - std::string caldata{8, '0'}; - uint32_t calVer; - - const char *inputEventName = std::getenv("INPUT_EVENT_NAME"); - const char *inputEventPathName = std::getenv("INPUT_EVENT_PATH"); - if ((strstr(inputEventName, "cs40l26") != nullptr) || - (strstr(inputEventName, "cs40l26_dual_input") != nullptr)) { - glob_t inputEventPaths; - int fd = -1; - int ret; - uint32_t val = 0; - char str[20] = {0x00}; - for (uint8_t retry = 0; retry < 10; retry++) { - ret = glob(inputEventPathName, 0, nullptr, &inputEventPaths); - if (ret) { - ALOGE("Fail to get input event paths (%d): %s", errno, strerror(errno)); - } else { - for (int i = 0; i < inputEventPaths.gl_pathc; i++) { - fd = TEMP_FAILURE_RETRY(open(inputEventPaths.gl_pathv[i], O_RDWR)); - if (fd > 0) { - if (ioctl(fd, EVIOCGBIT(0, sizeof(val)), &val) > 0 && - (val & (1 << EV_FF)) && ioctl(fd, EVIOCGNAME(sizeof(str)), &str) > 0 && - strstr(str, inputEventName) != nullptr) { - mInputFd.reset(fd); - ALOGI("Control %s through %s", inputEventName, - inputEventPaths.gl_pathv[i]); - break; - } - close(fd); - } - } - } - - if (ret == 0) { - globfree(&inputEventPaths); - } - if (mInputFd.ok()) { - break; - } - - sleep(1); - ALOGW("Retry #%d to search in %zu input devices.", retry, inputEventPaths.gl_pathc); - } - - if (!mInputFd.ok()) { - ALOGE("Fail to get an input event with name %s", inputEventName); - } - } else { - ALOGE("The input name %s is not cs40l26_input or cs40l26_dual_input", inputEventName); - } - - mFfEffects.resize(WAVEFORM_MAX_INDEX); - mEffectDurations.resize(WAVEFORM_MAX_INDEX); - mEffectDurations = { - 1000, 100, 30, 1000, 300, 130, 150, 500, 100, 15, 20, 1000, 1000, 1000, - }; /* 11+3 waveforms. The duration must < UINT16_MAX */ - - uint8_t effectIndex; - for (effectIndex = 0; effectIndex < WAVEFORM_MAX_INDEX; effectIndex++) { - if (effectIndex < WAVEFORM_MAX_PHYSICAL_INDEX) { - /* Initialize physical waveforms. */ - mFfEffects[effectIndex] = { - .type = FF_PERIODIC, - .id = -1, - .replay.length = static_cast(mEffectDurations[effectIndex]), - .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, - }; - // Bypass the waveform update due to different input name - if ((strstr(inputEventName, "cs40l26") != nullptr) || - (strstr(inputEventName, "cs40l26_dual_input") != nullptr)) { - if (!mHwApi->setFFEffect( - mInputFd, &mFfEffects[effectIndex], - static_cast(mFfEffects[effectIndex].replay.length))) { - ALOGE("Failed upload effect %d (%d): %s", effectIndex, errno, strerror(errno)); - } - } - if (mFfEffects[effectIndex].id != effectIndex) { - ALOGW("Unexpected effect index: %d -> %d", effectIndex, mFfEffects[effectIndex].id); - } - } else { - /* Initiate placeholders for OWT effects. */ - mFfEffects[effectIndex] = { - .type = FF_PERIODIC, - .id = -1, - .replay.length = 0, - .u.periodic.waveform = FF_CUSTOM, - .u.periodic.custom_data = nullptr, - .u.periodic.custom_len = 0, - }; - } - } - - if (mHwCal->getF0(&caldata)) { - mHwApi->setF0(caldata); - } - if (mHwCal->getRedc(&caldata)) { - mHwApi->setRedc(caldata); - } - if (mHwCal->getQ(&caldata)) { - mHwApi->setQ(caldata); - } - - mHwCal->getLongFrequencyShift(&longFrequencyShift); - if (longFrequencyShift > 0) { - mF0Offset = longFrequencyShift * std::pow(2, 14); - } else if (longFrequencyShift < 0) { - mF0Offset = std::pow(2, 24) - std::abs(longFrequencyShift) * std::pow(2, 14); - } else { - mF0Offset = 0; - } - - mHwCal->getVersion(&calVer); - if (calVer == 2) { - mHwCal->getTickVolLevels(&mTickEffectVol); - mHwCal->getClickVolLevels(&mClickEffectVol); - mHwCal->getLongVolLevels(&mLongEffectVol); - } else { - ALOGD("Unsupported calibration version: %u!", calVer); - } - - mHwApi->setF0CompEnable(mHwCal->isF0CompEnabled()); - mHwApi->setRedcCompEnable(mHwCal->isRedcCompEnabled()); - - mIsUnderExternalControl = false; - - mIsChirpEnabled = mHwCal->isChirpEnabled(); - - mHwCal->getSupportedPrimitives(&mSupportedPrimitivesBits); - if (mSupportedPrimitivesBits > 0) { - for (auto e : defaultSupportedPrimitives) { - if (mSupportedPrimitivesBits & (1 << uint32_t(e))) { - mSupportedPrimitives.emplace_back(e); - } - } - } else { - for (auto e : defaultSupportedPrimitives) { - mSupportedPrimitivesBits |= (1 << uint32_t(e)); - } - mSupportedPrimitives = defaultSupportedPrimitives; - } - - mHwApi->setMinOnOffInterval(MIN_ON_OFF_INTERVAL_US); - - if (mAdaptiveHapticsEnable) { - vibeContextListener = CapoDetector::start(); - if (vibeContextListener == nullptr) { - ALOGE("%s, CapoDetector failed to start", __func__); - } else { - ALOGD("%s, CapoDetector started successfully! NanoAppID: 0x%x", __func__, - (uint32_t)vibeContextListener->getNanoppAppId()); - vibeContextListener->setCallback(capoEventCallback); - ALOGD("%s, CapoDetector Set Callback function from vibe", __func__); - } - } -} - -ndk::ScopedAStatus Vibrator::getCapabilities(int32_t *_aidl_return) { - ATRACE_NAME("Vibrator::getCapabilities"); - - int32_t ret = IVibrator::CAP_ON_CALLBACK | IVibrator::CAP_PERFORM_CALLBACK | - IVibrator::CAP_AMPLITUDE_CONTROL | IVibrator::CAP_GET_RESONANT_FREQUENCY | - IVibrator::CAP_GET_Q_FACTOR; - if (hasHapticAlsaDevice()) { - ret |= IVibrator::CAP_EXTERNAL_CONTROL; - } else { - ALOGE("No haptics ALSA device"); - } - if (mHwApi->hasOwtFreeSpace()) { - ret |= IVibrator::CAP_COMPOSE_EFFECTS; - if (mIsChirpEnabled) { - ret |= IVibrator::CAP_FREQUENCY_CONTROL | IVibrator::CAP_COMPOSE_PWLE_EFFECTS; - } - } - *_aidl_return = ret; - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::off() { - ATRACE_NAME("Vibrator::off"); - bool ret{true}; - const std::scoped_lock lock(mActiveId_mutex); - - if (mActiveId >= 0) { - /* Stop the active effect. */ - if (!mHwApi->setFFPlay(mInputFd, mActiveId, false)) { - ALOGE("Failed to stop effect %d (%d): %s", mActiveId, errno, strerror(errno)); - ret = false; - } - - if ((mActiveId >= WAVEFORM_MAX_PHYSICAL_INDEX) && - (!mHwApi->eraseOwtEffect(mInputFd, mActiveId, &mFfEffects))) { - ALOGE("Failed to clean up the composed effect %d", mActiveId); - ret = false; - } - } else { - ALOGV("Vibrator is already off"); - } - - mActiveId = -1; - setGlobalAmplitude(false); - if (mF0Offset) { - mHwApi->setF0Offset(0); - } - - if (ret) { - return ndk::ScopedAStatus::ok(); - } else { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } -} - -ndk::ScopedAStatus Vibrator::on(int32_t timeoutMs, - const std::shared_ptr &callback) { - ATRACE_NAME("Vibrator::on"); - if (timeoutMs > MAX_TIME_MS) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - const uint16_t index = (timeoutMs < WAVEFORM_LONG_VIBRATION_THRESHOLD_MS) - ? WAVEFORM_SHORT_VIBRATION_EFFECT_INDEX - : WAVEFORM_LONG_VIBRATION_EFFECT_INDEX; - if (MAX_COLD_START_LATENCY_MS <= MAX_TIME_MS - timeoutMs) { - timeoutMs += MAX_COLD_START_LATENCY_MS; - } - setGlobalAmplitude(true); - if (mF0Offset) { - mHwApi->setF0Offset(mF0Offset); - } - return on(timeoutMs, index, nullptr /*ignored*/, callback); -} - -ndk::ScopedAStatus Vibrator::perform(Effect effect, EffectStrength strength, - const std::shared_ptr &callback, - int32_t *_aidl_return) { - ATRACE_NAME("Vibrator::perform"); - return performEffect(effect, strength, callback, _aidl_return); -} - -ndk::ScopedAStatus Vibrator::getSupportedEffects(std::vector *_aidl_return) { - *_aidl_return = {Effect::TEXTURE_TICK, Effect::TICK, Effect::CLICK, Effect::HEAVY_CLICK, - Effect::DOUBLE_CLICK}; - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::setAmplitude(float amplitude) { - ATRACE_NAME("Vibrator::setAmplitude"); - if (amplitude <= 0.0f || amplitude > 1.0f) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - - mLongEffectScale = amplitude; - if (!isUnderExternalControl()) { - return setGlobalAmplitude(true); - } else { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } -} - -ndk::ScopedAStatus Vibrator::setExternalControl(bool enabled) { - ATRACE_NAME("Vibrator::setExternalControl"); - setGlobalAmplitude(enabled); - - if (mHasHapticAlsaDevice || mConfigHapticAlsaDeviceDone || hasHapticAlsaDevice()) { - if (!mHwApi->setHapticPcmAmp(&mHapticPcm, enabled, mCard, mDevice)) { - ALOGE("Failed to %s haptic pcm device: %d", (enabled ? "enable" : "disable"), mDevice); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } - } else { - ALOGE("No haptics ALSA device"); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } - - mIsUnderExternalControl = enabled; - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::getCompositionDelayMax(int32_t *maxDelayMs) { - ATRACE_NAME("Vibrator::getCompositionDelayMax"); - *maxDelayMs = COMPOSE_DELAY_MAX_MS; - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::getCompositionSizeMax(int32_t *maxSize) { - ATRACE_NAME("Vibrator::getCompositionSizeMax"); - *maxSize = COMPOSE_SIZE_MAX; - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::getSupportedPrimitives(std::vector *supported) { - *supported = mSupportedPrimitives; - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::getPrimitiveDuration(CompositePrimitive primitive, - int32_t *durationMs) { - ndk::ScopedAStatus status; - uint32_t effectIndex; - if (primitive != CompositePrimitive::NOOP) { - status = getPrimitiveDetails(primitive, &effectIndex); - if (!status.isOk()) { - return status; - } - - *durationMs = mEffectDurations[effectIndex]; - } else { - *durationMs = 0; - } - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::compose(const std::vector &composite, - const std::shared_ptr &callback) { - ATRACE_NAME("Vibrator::compose"); - uint16_t size; - uint16_t nextEffectDelay; - - auto ch = dspmem_chunk_create(new uint8_t[FF_CUSTOM_DATA_LEN_MAX_COMP]{0x00}, - FF_CUSTOM_DATA_LEN_MAX_COMP); - - if (composite.size() > COMPOSE_SIZE_MAX || composite.empty()) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - - /* Check if there is a wait before the first effect. */ - nextEffectDelay = composite.front().delayMs; - if (nextEffectDelay > COMPOSE_DELAY_MAX_MS || nextEffectDelay < 0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } else if (nextEffectDelay > 0) { - size = composite.size() + 1; - } else { - size = composite.size(); - } - - dspmem_chunk_write(ch, 8, 0); /* Padding */ - dspmem_chunk_write(ch, 8, (uint8_t)(0xFF & size)); /* nsections */ - dspmem_chunk_write(ch, 8, 0); /* repeat */ - uint8_t header_count = dspmem_chunk_bytes(ch); - - /* Insert 1 section for a wait before the first effect. */ - if (nextEffectDelay) { - dspmem_chunk_write(ch, 32, 0); /* amplitude, index, repeat & flags */ - dspmem_chunk_write(ch, 16, (uint16_t)(0xFFFF & nextEffectDelay)); /* delay */ - } - - for (uint32_t i_curr = 0, i_next = 1; i_curr < composite.size(); i_curr++, i_next++) { - auto &e_curr = composite[i_curr]; - uint32_t effectIndex = 0; - uint32_t effectVolLevel = 0; - if (e_curr.scale < 0.0f || e_curr.scale > 1.0f) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - - if (e_curr.primitive != CompositePrimitive::NOOP) { - ndk::ScopedAStatus status; - status = getPrimitiveDetails(e_curr.primitive, &effectIndex); - if (!status.isOk()) { - return status; - } - effectVolLevel = intensityToVolLevel(e_curr.scale, effectIndex); - } - - /* Fetch the next composite effect delay and fill into the current section */ - nextEffectDelay = 0; - if (i_next < composite.size()) { - auto &e_next = composite[i_next]; - int32_t delay = e_next.delayMs; - - if (delay > COMPOSE_DELAY_MAX_MS || delay < 0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - nextEffectDelay = delay; - } - - if (effectIndex == 0 && nextEffectDelay == 0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - - dspmem_chunk_write(ch, 8, (uint8_t)(0xFF & effectVolLevel)); /* amplitude */ - dspmem_chunk_write(ch, 8, (uint8_t)(0xFF & effectIndex)); /* index */ - dspmem_chunk_write(ch, 8, 0); /* repeat */ - dspmem_chunk_write(ch, 8, 0); /* flags */ - dspmem_chunk_write(ch, 16, (uint16_t)(0xFFFF & nextEffectDelay)); /* delay */ - } - dspmem_chunk_flush(ch); - if (header_count == dspmem_chunk_bytes(ch)) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } else { - return performEffect(WAVEFORM_MAX_INDEX /*ignored*/, VOLTAGE_SCALE_MAX /*ignored*/, ch, - callback); - } -} - -ndk::ScopedAStatus Vibrator::on(uint32_t timeoutMs, uint32_t effectIndex, dspmem_chunk *ch, - const std::shared_ptr &callback) { - ndk::ScopedAStatus status = ndk::ScopedAStatus::ok(); - - if (effectIndex >= FF_MAX_EFFECTS) { - ALOGE("Invalid waveform index %d", effectIndex); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - if (mAsyncHandle.wait_for(ASYNC_COMPLETION_TIMEOUT) != std::future_status::ready) { - ALOGE("Previous vibration pending: prev: %d, curr: %d", mActiveId, effectIndex); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } - - if (ch) { - /* Upload OWT effect. */ - if (ch->head == nullptr) { - ALOGE("Invalid OWT bank"); - delete ch; - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - bool isPwle = (*reinterpret_cast(ch->head) != 0x0000); - effectIndex = isPwle ? WAVEFORM_PWLE : WAVEFORM_COMPOSE; - - uint32_t freeBytes; - mHwApi->getOwtFreeSpace(&freeBytes); - if (dspmem_chunk_bytes(ch) > freeBytes) { - ALOGE("Invalid OWT length: Effect %d: %d > %d!", effectIndex, dspmem_chunk_bytes(ch), - freeBytes); - delete ch; - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - int errorStatus; - if (!mHwApi->uploadOwtEffect(mInputFd, ch->head, dspmem_chunk_bytes(ch), - &mFfEffects[effectIndex], &effectIndex, &errorStatus)) { - delete ch; - ALOGE("Invalid uploadOwtEffect"); - return ndk::ScopedAStatus::fromExceptionCode(errorStatus); - } - delete ch; - - } else if (effectIndex == WAVEFORM_SHORT_VIBRATION_EFFECT_INDEX || - effectIndex == WAVEFORM_LONG_VIBRATION_EFFECT_INDEX) { - /* Update duration for long/short vibration. */ - mFfEffects[effectIndex].replay.length = static_cast(timeoutMs); - if (!mHwApi->setFFEffect(mInputFd, &mFfEffects[effectIndex], - static_cast(timeoutMs))) { - ALOGE("Failed to edit effect %d (%d): %s", effectIndex, errno, strerror(errno)); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } - } - - const std::scoped_lock lock(mActiveId_mutex); - mActiveId = effectIndex; - /* Play the event now. */ - if (!mHwApi->setFFPlay(mInputFd, effectIndex, true)) { - ALOGE("Failed to play effect %d (%d): %s", effectIndex, errno, strerror(errno)); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } - - mAsyncHandle = std::async(&Vibrator::waitForComplete, this, callback); - return ndk::ScopedAStatus::ok(); -} - -uint16_t Vibrator::amplitudeToScale(float amplitude, float maximum, bool scalable) { - float ratio = 100; /* Unit: % */ - - if (maximum != 0) - ratio = amplitude / maximum * 100; - - if (maximum == 0 || ratio > 100) - ratio = 100; - - if (scalable && mContextEnable & mAdaptiveHapticsEnable) { - uint32_t now = getCurrentTimeInMs(); - uint32_t last_played = mLastEffectPlayedTime; - float context_scale = 1.0; - bool device_face_up = getDeviceState() == capo::PositionType::ON_TABLE_FACE_UP; - float pre_scaled_ratio = ratio; - mLastEffectPlayedTime = now; - - ALOGD("Vibrator Now: %u, Last: %u, ScaleTime: %u, Since? %d", now, mLastFaceUpEvent, mScaleTime, (now < mLastFaceUpEvent + mScaleTime)); - /* If the device is face-up or within the fade scaling range, find new scaling factor */ - if (device_face_up || now < mLastFaceUpEvent + mScaleTime) { - /* Device is face-up, so we will scale it down. Start with highest scaling factor */ - context_scale = mScalingFactor <= 100 ? static_cast(mScalingFactor)/100 : 1.0; - if (mFadeEnable && mScaleTime > 0 && (context_scale < 1.0) && (now < mLastFaceUpEvent + mScaleTime) && !device_face_up) { - float fade_scale = static_cast(now - mLastFaceUpEvent)/static_cast(mScaleTime); - context_scale += ((1.0 - context_scale)*fade_scale); - ALOGD("Vibrator fade scale applied: %f", fade_scale); - } - ratio *= context_scale; - ALOGD("Vibrator adjusting for face-up: pre: %f, post: %f", - std::round(pre_scaled_ratio), std::round(ratio)); - } - - /* If we haven't played an effect within the cooldown time, save the scaling factor */ - if ((now - last_played) > mScaleCooldown) { - ALOGD("Vibrator updating lastplayed scale, old: %f, new: %f", mLastPlayedScale, context_scale); - mLastPlayedScale = context_scale; - } - else { - /* Override the scale to match previously played scale */ - ratio = mLastPlayedScale * pre_scaled_ratio; - ALOGD("Vibrator repeating last scale: %f, new ratio: %f, duration since last: %u", mLastPlayedScale, ratio, (now - last_played)); - } - } - - return std::round(ratio); -} - -void Vibrator::updateContext() { - mContextEnable = mHwApi->getContextEnable(); - mFadeEnable = mHwApi->getContextFadeEnable(); - mScalingFactor = mHwApi->getContextScale(); - mScaleTime = mHwApi->getContextSettlingTime(); - mScaleCooldown = mHwApi->getContextCooldownTime(); -} - -ndk::ScopedAStatus Vibrator::setEffectAmplitude(float amplitude, float maximum, bool scalable) { - uint16_t scale; - - if (mAdaptiveHapticsEnable && scalable) { - updateContext(); - } - - scale = amplitudeToScale(amplitude, maximum, scalable); - - if (!mHwApi->setFFGain(mInputFd, scale)) { - ALOGE("Failed to set the gain to %u (%d): %s", scale, errno, strerror(errno)); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::setGlobalAmplitude(bool set) { - uint8_t amplitude = set ? roundf(mLongEffectScale * mLongEffectVol[1]) : VOLTAGE_SCALE_MAX; - if (!set) { - mLongEffectScale = 1.0; // Reset the scale for the later new effect. - } - return setEffectAmplitude(amplitude, VOLTAGE_SCALE_MAX, true); -} - -ndk::ScopedAStatus Vibrator::getSupportedAlwaysOnEffects(std::vector * /*_aidl_return*/) { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); -} - -ndk::ScopedAStatus Vibrator::alwaysOnEnable(int32_t /*id*/, Effect /*effect*/, - EffectStrength /*strength*/) { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); -} -ndk::ScopedAStatus Vibrator::alwaysOnDisable(int32_t /*id*/) { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); -} - -ndk::ScopedAStatus Vibrator::getResonantFrequency(float *resonantFreqHz) { - std::string caldata{8, '0'}; - if (!mHwCal->getF0(&caldata)) { - ALOGE("Failed to get resonant frequency (%d): %s", errno, strerror(errno)); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } - *resonantFreqHz = static_cast(std::stoul(caldata, nullptr, 16)) / (1 << Q14_BIT_SHIFT); - - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::getQFactor(float *qFactor) { - std::string caldata{8, '0'}; - if (!mHwCal->getQ(&caldata)) { - ALOGE("Failed to get q factor (%d): %s", errno, strerror(errno)); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_STATE); - } - *qFactor = static_cast(std::stoul(caldata, nullptr, 16)) / (1 << Q16_BIT_SHIFT); - - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::getFrequencyResolution(float *freqResolutionHz) { - int32_t capabilities; - Vibrator::getCapabilities(&capabilities); - if (capabilities & IVibrator::CAP_FREQUENCY_CONTROL) { - *freqResolutionHz = PWLE_FREQUENCY_RESOLUTION_HZ; - return ndk::ScopedAStatus::ok(); - } else { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } -} - -ndk::ScopedAStatus Vibrator::getFrequencyMinimum(float *freqMinimumHz) { - int32_t capabilities; - Vibrator::getCapabilities(&capabilities); - if (capabilities & IVibrator::CAP_FREQUENCY_CONTROL) { - *freqMinimumHz = PWLE_FREQUENCY_MIN_HZ; - return ndk::ScopedAStatus::ok(); - } else { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } -} - -ndk::ScopedAStatus Vibrator::getBandwidthAmplitudeMap(std::vector *_aidl_return) { - // TODO(b/170919640): complete implementation - int32_t capabilities; - Vibrator::getCapabilities(&capabilities); - if (capabilities & IVibrator::CAP_FREQUENCY_CONTROL) { - std::vector bandwidthAmplitudeMap(PWLE_BW_MAP_SIZE, 1.0); - *_aidl_return = bandwidthAmplitudeMap; - return ndk::ScopedAStatus::ok(); - } else { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } -} - -ndk::ScopedAStatus Vibrator::getPwlePrimitiveDurationMax(int32_t *durationMs) { - int32_t capabilities; - Vibrator::getCapabilities(&capabilities); - if (capabilities & IVibrator::CAP_COMPOSE_PWLE_EFFECTS) { - *durationMs = COMPOSE_PWLE_PRIMITIVE_DURATION_MAX_MS; - return ndk::ScopedAStatus::ok(); - } else { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } -} - -ndk::ScopedAStatus Vibrator::getPwleCompositionSizeMax(int32_t *maxSize) { - int32_t capabilities; - Vibrator::getCapabilities(&capabilities); - if (capabilities & IVibrator::CAP_COMPOSE_PWLE_EFFECTS) { - *maxSize = COMPOSE_PWLE_SIZE_MAX_DEFAULT; - return ndk::ScopedAStatus::ok(); - } else { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } -} - -ndk::ScopedAStatus Vibrator::getSupportedBraking(std::vector *supported) { - int32_t capabilities; - Vibrator::getCapabilities(&capabilities); - if (capabilities & IVibrator::CAP_COMPOSE_PWLE_EFFECTS) { - *supported = { - Braking::NONE, - }; - return ndk::ScopedAStatus::ok(); - } else { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } -} - -static void resetPreviousEndAmplitudeEndFrequency(float *prevEndAmplitude, - float *prevEndFrequency) { - const float reset = -1.0; - *prevEndAmplitude = reset; - *prevEndFrequency = reset; -} - -static void incrementIndex(int *index) { - *index += 1; -} - -static void constructPwleSegment(dspmem_chunk *ch, uint16_t delay, uint16_t amplitude, - uint16_t frequency, uint8_t flags, uint32_t vbemfTarget = 0) { - dspmem_chunk_write(ch, 16, delay); - dspmem_chunk_write(ch, 12, amplitude); - dspmem_chunk_write(ch, 12, frequency); - /* feature flags to control the chirp, CLAB braking, back EMF amplitude regulation */ - dspmem_chunk_write(ch, 8, (flags | 1) << 4); - if (flags & PWLE_AMP_REG_BIT) { - dspmem_chunk_write(ch, 24, vbemfTarget); /* target back EMF voltage */ - } -} - -static int constructActiveSegment(dspmem_chunk *ch, int duration, float amplitude, float frequency, - bool chirp) { - uint16_t delay = 0; - uint16_t amp = 0; - uint16_t freq = 0; - uint8_t flags = 0x0; - if ((floatToUint16(duration, &delay, 4, 0.0f, COMPOSE_PWLE_PRIMITIVE_DURATION_MAX_MS) < 0) || - (floatToUint16(amplitude, &, 2048, CS40L26_PWLE_LEVEL_MIX, CS40L26_PWLE_LEVEL_MAX) < - 0) || - (floatToUint16(frequency, &freq, 4, PWLE_FREQUENCY_MIN_HZ, PWLE_FREQUENCY_MAX_HZ) < 0)) { - ALOGE("Invalid argument: %d, %f, %f", duration, amplitude, frequency); - return -ERANGE; - } - if (chirp) { - flags |= PWLE_CHIRP_BIT; - } - constructPwleSegment(ch, delay, amp, freq, flags, 0 /*ignored*/); - return 0; -} - -static int constructBrakingSegment(dspmem_chunk *ch, int duration, Braking brakingType) { - uint16_t delay = 0; - uint16_t freq = 0; - uint8_t flags = 0x00; - if (floatToUint16(duration, &delay, 4, 0.0f, COMPOSE_PWLE_PRIMITIVE_DURATION_MAX_MS) < 0) { - ALOGE("Invalid argument: %d", duration); - return -ERANGE; - } - floatToUint16(PWLE_FREQUENCY_MIN_HZ, &freq, 4, PWLE_FREQUENCY_MIN_HZ, PWLE_FREQUENCY_MAX_HZ); - if (static_cast::type>(brakingType)) { - flags |= PWLE_BRAKE_BIT; - } - - constructPwleSegment(ch, delay, 0 /*ignored*/, freq, flags, 0 /*ignored*/); - return 0; -} - -static void updateWLength(dspmem_chunk *ch, uint32_t totalDuration) { - 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. */ - *(ch->head + 0) = (totalDuration >> 24) & 0xFF; - *(ch->head + 1) = (totalDuration >> 16) & 0xFF; - *(ch->head + 2) = (totalDuration >> 8) & 0xFF; - *(ch->head + 3) = totalDuration & 0xFF; -} - -static void updateNSection(dspmem_chunk *ch, int segmentIdx) { - *(ch->head + 7) |= (0xF0 & segmentIdx) >> 4; /* Bit 4 to 7 */ - *(ch->head + 9) |= (0x0F & segmentIdx) << 4; /* Bit 3 to 0 */ -} - -ndk::ScopedAStatus Vibrator::composePwle(const std::vector &composite, - const std::shared_ptr &callback) { - ATRACE_NAME("Vibrator::composePwle"); - int32_t capabilities; - - Vibrator::getCapabilities(&capabilities); - if ((capabilities & IVibrator::CAP_COMPOSE_PWLE_EFFECTS) == 0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } - - if (composite.empty() || composite.size() > COMPOSE_PWLE_SIZE_MAX_DEFAULT) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - - std::vector supported; - Vibrator::getSupportedBraking(&supported); - bool isClabSupported = - std::find(supported.begin(), supported.end(), Braking::CLAB) != supported.end(); - - int segmentIdx = 0; - uint32_t totalDuration = 0; - float prevEndAmplitude; - float prevEndFrequency; - resetPreviousEndAmplitudeEndFrequency(&prevEndAmplitude, &prevEndFrequency); - auto ch = dspmem_chunk_create(new uint8_t[FF_CUSTOM_DATA_LEN_MAX_PWLE]{0x00}, - FF_CUSTOM_DATA_LEN_MAX_PWLE); - bool chirp = false; - - dspmem_chunk_write(ch, 24, 0x000000); /* Waveform length placeholder */ - dspmem_chunk_write(ch, 8, 0); /* Repeat */ - dspmem_chunk_write(ch, 12, 0); /* Wait time between repeats */ - dspmem_chunk_write(ch, 8, 0x00); /* nsections placeholder */ - - for (auto &e : composite) { - switch (e.getTag()) { - case PrimitivePwle::active: { - auto active = e.get(); - if (active.duration < 0 || - active.duration > COMPOSE_PWLE_PRIMITIVE_DURATION_MAX_MS) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - if (active.startAmplitude < PWLE_LEVEL_MIN || - active.startAmplitude > PWLE_LEVEL_MAX || - active.endAmplitude < PWLE_LEVEL_MIN || active.endAmplitude > PWLE_LEVEL_MAX) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - if (active.startAmplitude > CS40L26_PWLE_LEVEL_MAX) { - active.startAmplitude = CS40L26_PWLE_LEVEL_MAX; - } - if (active.endAmplitude > CS40L26_PWLE_LEVEL_MAX) { - active.endAmplitude = CS40L26_PWLE_LEVEL_MAX; - } - - if (active.startFrequency < PWLE_FREQUENCY_MIN_HZ || - active.startFrequency > PWLE_FREQUENCY_MAX_HZ || - active.endFrequency < PWLE_FREQUENCY_MIN_HZ || - active.endFrequency > PWLE_FREQUENCY_MAX_HZ) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - - if (!((active.startAmplitude == prevEndAmplitude) && - (active.startFrequency == prevEndFrequency))) { - if (constructActiveSegment(ch, 0, active.startAmplitude, active.startFrequency, - false) < 0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - incrementIndex(&segmentIdx); - } - - if (active.startFrequency != active.endFrequency) { - chirp = true; - } - if (constructActiveSegment(ch, active.duration, active.endAmplitude, - active.endFrequency, chirp) < 0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - incrementIndex(&segmentIdx); - - prevEndAmplitude = active.endAmplitude; - prevEndFrequency = active.endFrequency; - totalDuration += active.duration; - chirp = false; - break; - } - case PrimitivePwle::braking: { - auto braking = e.get(); - if (braking.braking > Braking::CLAB) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } else if (!isClabSupported && (braking.braking == Braking::CLAB)) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - - if (braking.duration > COMPOSE_PWLE_PRIMITIVE_DURATION_MAX_MS) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - - if (constructBrakingSegment(ch, 0, braking.braking) < 0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - incrementIndex(&segmentIdx); - - if (constructBrakingSegment(ch, braking.duration, braking.braking) < 0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - incrementIndex(&segmentIdx); - - resetPreviousEndAmplitudeEndFrequency(&prevEndAmplitude, &prevEndFrequency); - totalDuration += braking.duration; - break; - } - } - - if (segmentIdx > COMPOSE_PWLE_SIZE_MAX_DEFAULT) { - ALOGE("Too many PrimitivePwle section!"); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - } - dspmem_chunk_flush(ch); - - /* Update wlength */ - totalDuration += MAX_COLD_START_LATENCY_MS; - if (totalDuration > 0x7FFFF) { - ALOGE("Total duration is too long (%d)!", totalDuration); - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - } - updateWLength(ch, totalDuration); - - /* Update nsections */ - updateNSection(ch, segmentIdx); - - return performEffect(WAVEFORM_MAX_INDEX /*ignored*/, VOLTAGE_SCALE_MAX /*ignored*/, ch, - callback); -} - -bool Vibrator::isUnderExternalControl() { - return mIsUnderExternalControl; -} - -binder_status_t Vibrator::dump(int fd, const char **args, uint32_t numArgs) { - if (fd < 0) { - ALOGE("Called debug() with invalid fd."); - return STATUS_OK; - } - - (void)args; - (void)numArgs; - - dprintf(fd, "AIDL:\n"); - - dprintf(fd, " F0 Offset: %" PRIu32 "\n", mF0Offset); - - dprintf(fd, " Voltage Levels:\n"); - dprintf(fd, " Tick Effect Min: %" PRIu32 " Max: %" PRIu32 "\n", mTickEffectVol[0], - mTickEffectVol[1]); - dprintf(fd, " Click Effect Min: %" PRIu32 " Max: %" PRIu32 "\n", mClickEffectVol[0], - mClickEffectVol[1]); - 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, "\tId\tIndex\tt ->\tt'\n"); - for (uint8_t effectId = 0; effectId < WAVEFORM_MAX_PHYSICAL_INDEX; effectId++) { - dprintf(fd, "\t%d\t%d\t%d\t%d\n", mFfEffects[effectId].id, - mFfEffects[effectId].u.periodic.custom_data[1], mEffectDurations[effectId], - mFfEffects[effectId].replay.length); - } - dprintf(fd, " OWT waveform:\n"); - dprintf(fd, "\tId\tBytes\tData\n"); - for (uint8_t effectId = WAVEFORM_MAX_PHYSICAL_INDEX; effectId < WAVEFORM_MAX_INDEX; - effectId++) { - uint32_t numBytes = mFfEffects[effectId].u.periodic.custom_len * 2; - std::stringstream ss; - ss << " "; - for (int i = 0; i < numBytes; i++) { - ss << std::uppercase << std::setfill('0') << std::setw(2) << std::hex - << (uint16_t)(*( - reinterpret_cast(mFfEffects[effectId].u.periodic.custom_data) + - i)) - << " "; - } - dprintf(fd, "\t%d\t%d\t{%s}\n", mFfEffects[effectId].id, numBytes, ss.str().c_str()); - } - - dprintf(fd, "\n"); - dprintf(fd, "\n"); - - mHwApi->debug(fd); - - dprintf(fd, "\n"); - - mHwCal->debug(fd); - - dprintf(fd, "Capo Info\n"); - if (vibeContextListener) { - dprintf(fd, "Capo ID: 0x%x\n", (uint32_t)(vibeContextListener->getNanoppAppId())); - dprintf(fd, "Capo State: %d DetectedState: %d\n", vibeContextListener->getCarriedPosition(), - getDeviceState()); - } else { - dprintf(fd, "Capo ID: 0x%x\n", (uint32_t)(0xdeadbeef)); - dprintf(fd, "Capo State: %d DetectedState: %d\n", (uint32_t)0x454545, getDeviceState()); - } - - fsync(fd); - return STATUS_OK; -} - -bool Vibrator::hasHapticAlsaDevice() { - // We need to call findHapticAlsaDevice once only. Calling in the - // constructor is too early in the boot process and the pcm file contents - // are empty. Hence we make the call here once only right before we need to. - if (!mConfigHapticAlsaDeviceDone) { - if (mHwApi->getHapticAlsaDevice(&mCard, &mDevice)) { - mHasHapticAlsaDevice = true; - mConfigHapticAlsaDeviceDone = true; - } else { - ALOGE("Haptic ALSA device not supported"); - } - } else { - ALOGD("Haptic ALSA device configuration done."); - } - return mHasHapticAlsaDevice; -} - -ndk::ScopedAStatus Vibrator::getSimpleDetails(Effect effect, EffectStrength strength, - uint32_t *outEffectIndex, uint32_t *outTimeMs, - uint32_t *outVolLevel) { - uint32_t effectIndex; - uint32_t timeMs; - float intensity; - uint32_t volLevel; - switch (strength) { - case EffectStrength::LIGHT: - intensity = 0.5f; - break; - case EffectStrength::MEDIUM: - intensity = 0.7f; - break; - case EffectStrength::STRONG: - intensity = 1.0f; - break; - default: - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } - - switch (effect) { - case Effect::TEXTURE_TICK: - effectIndex = WAVEFORM_LIGHT_TICK_INDEX; - intensity *= 0.5f; - break; - case Effect::TICK: - effectIndex = WAVEFORM_CLICK_INDEX; - intensity *= 0.5f; - break; - case Effect::CLICK: - effectIndex = WAVEFORM_CLICK_INDEX; - intensity *= 0.7f; - break; - case Effect::HEAVY_CLICK: - effectIndex = WAVEFORM_CLICK_INDEX; - intensity *= 1.0f; - break; - default: - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } - - volLevel = intensityToVolLevel(intensity, effectIndex); - timeMs = mEffectDurations[effectIndex] + MAX_COLD_START_LATENCY_MS; - - *outEffectIndex = effectIndex; - *outTimeMs = timeMs; - *outVolLevel = volLevel; - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::getCompoundDetails(Effect effect, EffectStrength strength, - uint32_t *outTimeMs, dspmem_chunk *outCh) { - ndk::ScopedAStatus status; - uint32_t timeMs = 0; - uint32_t thisEffectIndex; - uint32_t thisTimeMs; - uint32_t thisVolLevel; - switch (effect) { - case Effect::DOUBLE_CLICK: - dspmem_chunk_write(outCh, 8, 0); /* Padding */ - dspmem_chunk_write(outCh, 8, 2); /* nsections */ - dspmem_chunk_write(outCh, 8, 0); /* repeat */ - - status = getSimpleDetails(Effect::CLICK, strength, &thisEffectIndex, &thisTimeMs, - &thisVolLevel); - if (!status.isOk()) { - return status; - } - timeMs += thisTimeMs; - - dspmem_chunk_write(outCh, 8, (uint8_t)(0xFF & thisVolLevel)); /* amplitude */ - dspmem_chunk_write(outCh, 8, (uint8_t)(0xFF & thisEffectIndex)); /* index */ - dspmem_chunk_write(outCh, 8, 0); /* repeat */ - dspmem_chunk_write(outCh, 8, 0); /* flags */ - dspmem_chunk_write(outCh, 16, - (uint16_t)(0xFFFF & WAVEFORM_DOUBLE_CLICK_SILENCE_MS)); /* delay */ - - timeMs += WAVEFORM_DOUBLE_CLICK_SILENCE_MS + MAX_PAUSE_TIMING_ERROR_MS; - - status = getSimpleDetails(Effect::HEAVY_CLICK, strength, &thisEffectIndex, &thisTimeMs, - &thisVolLevel); - if (!status.isOk()) { - return status; - } - timeMs += thisTimeMs; - - dspmem_chunk_write(outCh, 8, (uint8_t)(0xFF & thisVolLevel)); /* amplitude */ - dspmem_chunk_write(outCh, 8, (uint8_t)(0xFF & thisEffectIndex)); /* index */ - dspmem_chunk_write(outCh, 8, 0); /* repeat */ - dspmem_chunk_write(outCh, 8, 0); /* flags */ - dspmem_chunk_write(outCh, 16, 0); /* delay */ - dspmem_chunk_flush(outCh); - - break; - default: - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } - - *outTimeMs = timeMs; - - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::getPrimitiveDetails(CompositePrimitive primitive, - uint32_t *outEffectIndex) { - uint32_t effectIndex; - uint32_t primitiveBit = 1 << int32_t(primitive); - if ((primitiveBit & mSupportedPrimitivesBits) == 0x0) { - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } - - switch (primitive) { - case CompositePrimitive::NOOP: - return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); - case CompositePrimitive::CLICK: - effectIndex = WAVEFORM_CLICK_INDEX; - break; - case CompositePrimitive::THUD: - effectIndex = WAVEFORM_THUD_INDEX; - break; - case CompositePrimitive::SPIN: - effectIndex = WAVEFORM_SPIN_INDEX; - break; - case CompositePrimitive::QUICK_RISE: - effectIndex = WAVEFORM_QUICK_RISE_INDEX; - break; - case CompositePrimitive::SLOW_RISE: - effectIndex = WAVEFORM_SLOW_RISE_INDEX; - break; - case CompositePrimitive::QUICK_FALL: - effectIndex = WAVEFORM_QUICK_FALL_INDEX; - break; - case CompositePrimitive::LIGHT_TICK: - effectIndex = WAVEFORM_LIGHT_TICK_INDEX; - break; - case CompositePrimitive::LOW_TICK: - effectIndex = WAVEFORM_LOW_TICK_INDEX; - break; - default: - return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - } - - *outEffectIndex = effectIndex; - - return ndk::ScopedAStatus::ok(); -} - -ndk::ScopedAStatus Vibrator::performEffect(Effect effect, EffectStrength strength, - const std::shared_ptr &callback, - int32_t *outTimeMs) { - ndk::ScopedAStatus status; - uint32_t effectIndex; - uint32_t timeMs = 0; - uint32_t volLevel; - dspmem_chunk *ch = nullptr; - switch (effect) { - case Effect::TEXTURE_TICK: - // fall-through - case Effect::TICK: - // fall-through - case Effect::CLICK: - // fall-through - case Effect::HEAVY_CLICK: - status = getSimpleDetails(effect, strength, &effectIndex, &timeMs, &volLevel); - break; - case Effect::DOUBLE_CLICK: - ch = dspmem_chunk_create(new uint8_t[FF_CUSTOM_DATA_LEN_MAX_COMP]{0x00}, - FF_CUSTOM_DATA_LEN_MAX_COMP); - status = getCompoundDetails(effect, strength, &timeMs, ch); - volLevel = VOLTAGE_SCALE_MAX; - break; - default: - status = ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION); - break; - } - if (!status.isOk()) { - goto exit; - } - - status = performEffect(effectIndex, volLevel, ch, callback); - -exit: - *outTimeMs = timeMs; - return status; -} - -ndk::ScopedAStatus Vibrator::performEffect(uint32_t effectIndex, uint32_t volLevel, - dspmem_chunk *ch, - const std::shared_ptr &callback) { - setEffectAmplitude(volLevel, VOLTAGE_SCALE_MAX, false); - - return on(MAX_TIME_MS, effectIndex, ch, callback); -} - -void Vibrator::waitForComplete(std::shared_ptr &&callback) { - if (!mHwApi->pollVibeState(VIBE_STATE_HAPTIC, POLLING_TIMEOUT)) { - ALOGW("Failed to get state \"Haptic\""); - } - mHwApi->pollVibeState(VIBE_STATE_STOPPED); - - const std::scoped_lock lock(mActiveId_mutex); - if ((mActiveId >= WAVEFORM_MAX_PHYSICAL_INDEX) && - (!mHwApi->eraseOwtEffect(mInputFd, mActiveId, &mFfEffects))) { - ALOGE("Failed to clean up the composed effect %d", mActiveId); - } - mActiveId = -1; - - if (callback) { - auto ret = callback->onComplete(); - if (!ret.isOk()) { - ALOGE("Failed completion callback: %d", ret.getExceptionCode()); - } - } -} - -uint32_t Vibrator::intensityToVolLevel(float intensity, uint32_t effectIndex) { - uint32_t volLevel; - auto calc = [](float intst, std::array v) -> uint32_t { - return std::lround(intst * (v[1] - v[0])) + v[0]; - }; - - switch (effectIndex) { - case WAVEFORM_LIGHT_TICK_INDEX: - volLevel = calc(intensity, mTickEffectVol); - break; - case WAVEFORM_QUICK_RISE_INDEX: - // fall-through - case WAVEFORM_QUICK_FALL_INDEX: - volLevel = calc(intensity, mLongEffectVol); - break; - case WAVEFORM_CLICK_INDEX: - // fall-through - case WAVEFORM_THUD_INDEX: - // fall-through - case WAVEFORM_SPIN_INDEX: - // fall-through - case WAVEFORM_SLOW_RISE_INDEX: - // fall-through - default: - volLevel = calc(intensity, mClickEffectVol); - break; - } - return volLevel; -} - -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/cs40l26/Vibrator.h b/vibrator/cs40l26/Vibrator.h deleted file mode 100644 index 7c9e99c..0000000 --- a/vibrator/cs40l26/Vibrator.h +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace aidl { -namespace android { -namespace hardware { -namespace vibrator { - -class Vibrator : public BnVibrator { - public: - // APIs for interfacing with the kernel driver. - class HwApi { - public: - virtual ~HwApi() = default; - // Stores the LRA resonant frequency to be used for PWLE playback - // and click compensation. - virtual bool setF0(std::string value) = 0; - // Stores the frequency offset for long vibrations. - virtual bool setF0Offset(uint32_t value) = 0; - // Stores the LRA series resistance to be used for click - // compensation. - virtual bool setRedc(std::string value) = 0; - // Stores the LRA Q factor to be used for Q-dependent waveform - // selection. - virtual bool setQ(std::string value) = 0; - // Reports the number of effect waveforms loaded in firmware. - virtual bool getEffectCount(uint32_t *value) = 0; - // Blocks until timeout or vibrator reaches desired state - // (2 = ASP enabled, 1 = haptic enabled, 0 = disabled). - virtual bool pollVibeState(uint32_t value, int32_t timeoutMs = -1) = 0; - // Reports whether getOwtFreeSpace() is supported. - virtual bool hasOwtFreeSpace() = 0; - // Reports the available OWT bytes. - virtual bool getOwtFreeSpace(uint32_t *value) = 0; - // Enables/Disables F0 compensation enable status - virtual bool setF0CompEnable(bool value) = 0; - // Enables/Disables Redc compensation enable status - virtual bool setRedcCompEnable(bool value) = 0; - // Stores the minumun delay time between playback and stop effects. - virtual bool setMinOnOffInterval(uint32_t value) = 0; - // Gets the scaling factor for contextual haptic events. - virtual uint32_t getContextScale() = 0; - // Gets the enable status for contextual haptic events. - virtual bool getContextEnable() = 0; - // Gets the settling time for contextual haptic events. - // This will allow the device to stay face up for the duration given, - // even if InMotion events were detected. - virtual uint32_t getContextSettlingTime() = 0; - // Gets the cooldown time for contextual haptic events. - // This is used to avoid changing the scale of close playback events. - virtual uint32_t getContextCooldownTime() = 0; - // Checks the enable status for contextual haptics fade feature. When enabled - // this feature will cause the scaling factor to fade back up to max over - // the setting time set, instead of instantaneously changing it back to max. - virtual bool getContextFadeEnable() = 0; - // Indicates the number of 0.125-dB steps of attenuation to apply to - // waveforms triggered in response to vibration calls from the - // Android vibrator HAL. - virtual bool setFFGain(int fd, uint16_t value) = 0; - // Create/modify custom effects for all physical waveforms. - virtual bool setFFEffect(int fd, struct ff_effect *effect, uint16_t timeoutMs) = 0; - // Activates/deactivates the effect index after setFFGain() and setFFEffect(). - virtual bool setFFPlay(int fd, int8_t index, bool value) = 0; - // Get the Alsa device for the audio coupled haptics effect - virtual bool getHapticAlsaDevice(int *card, int *device) = 0; - // Set haptics PCM amplifier before triggering audio haptics feature - virtual bool setHapticPcmAmp(struct pcm **haptic_pcm, bool enable, int card, - int device) = 0; - // Set OWT waveform for compose or compose PWLE request - virtual bool uploadOwtEffect(int fd, uint8_t *owtData, uint32_t numBytes, - struct ff_effect *effect, uint32_t *outEffectIndex, - int *status) = 0; - // Erase OWT waveform - virtual bool eraseOwtEffect(int fd, int8_t effectIndex, std::vector *effect) = 0; - // Emit diagnostic information to the given file. - virtual void debug(int fd) = 0; - }; - - // APIs for obtaining calibration/configuration data from persistent memory. - class HwCal { - public: - virtual ~HwCal() = default; - // Obtain the calibration version - virtual bool getVersion(uint32_t *value) = 0; - // Obtains the LRA resonant frequency to be used for PWLE playback - // and click compensation. - virtual bool getF0(std::string *value) = 0; - // Obtains the LRA series resistance to be used for click - // compensation. - virtual bool getRedc(std::string *value) = 0; - // Obtains the LRA Q factor to be used for Q-dependent waveform - // selection. - virtual bool getQ(std::string *value) = 0; - // Obtains frequency shift for long vibrations. - virtual bool getLongFrequencyShift(int32_t *value) = 0; - // Obtains the v0/v1(min/max) voltage levels to be applied for - // tick/click/long in units of 1%. - virtual bool getTickVolLevels(std::array *value) = 0; - virtual bool getClickVolLevels(std::array *value) = 0; - virtual bool getLongVolLevels(std::array *value) = 0; - // Checks if the chirp feature is enabled. - virtual bool isChirpEnabled() = 0; - // Obtains the supported primitive effects. - virtual bool getSupportedPrimitives(uint32_t *value) = 0; - // Checks if the f0 compensation feature needs to be enabled. - virtual bool isF0CompEnabled() = 0; - // Checks if the redc compensation feature needs to be enabled. - virtual bool isRedcCompEnabled() = 0; - // Emit diagnostic information to the given file. - virtual void debug(int fd) = 0; - }; - - public: - Vibrator(std::unique_ptr hwapi, std::unique_ptr hwcal); - - ndk::ScopedAStatus getCapabilities(int32_t *_aidl_return) override; - ndk::ScopedAStatus off() override; - ndk::ScopedAStatus on(int32_t timeoutMs, - const std::shared_ptr &callback) override; - ndk::ScopedAStatus perform(Effect effect, EffectStrength strength, - const std::shared_ptr &callback, - int32_t *_aidl_return) override; - ndk::ScopedAStatus getSupportedEffects(std::vector *_aidl_return) override; - ndk::ScopedAStatus setAmplitude(float amplitude) override; - ndk::ScopedAStatus setExternalControl(bool enabled) override; - ndk::ScopedAStatus getCompositionDelayMax(int32_t *maxDelayMs); - ndk::ScopedAStatus getCompositionSizeMax(int32_t *maxSize); - ndk::ScopedAStatus getSupportedPrimitives(std::vector *supported) override; - ndk::ScopedAStatus getPrimitiveDuration(CompositePrimitive primitive, - int32_t *durationMs) override; - ndk::ScopedAStatus compose(const std::vector &composite, - const std::shared_ptr &callback) override; - ndk::ScopedAStatus getSupportedAlwaysOnEffects(std::vector *_aidl_return) override; - ndk::ScopedAStatus alwaysOnEnable(int32_t id, Effect effect, EffectStrength strength) override; - ndk::ScopedAStatus alwaysOnDisable(int32_t id) override; - ndk::ScopedAStatus getResonantFrequency(float *resonantFreqHz) override; - ndk::ScopedAStatus getQFactor(float *qFactor) override; - ndk::ScopedAStatus getFrequencyResolution(float *freqResolutionHz) override; - ndk::ScopedAStatus getFrequencyMinimum(float *freqMinimumHz) override; - ndk::ScopedAStatus getBandwidthAmplitudeMap(std::vector *_aidl_return) override; - ndk::ScopedAStatus getPwlePrimitiveDurationMax(int32_t *durationMs) override; - ndk::ScopedAStatus getPwleCompositionSizeMax(int32_t *maxSize) override; - ndk::ScopedAStatus getSupportedBraking(std::vector *supported) override; - ndk::ScopedAStatus composePwle(const std::vector &composite, - const std::shared_ptr &callback) override; - - binder_status_t dump(int fd, const char **args, uint32_t numArgs) override; - - private: - ndk::ScopedAStatus on(uint32_t timeoutMs, uint32_t effectIndex, struct dspmem_chunk *ch, - const std::shared_ptr &callback); - // set 'amplitude' based on an arbitrary scale determined by 'maximum' - ndk::ScopedAStatus setEffectAmplitude(float amplitude, float maximum, bool scalable); - ndk::ScopedAStatus setGlobalAmplitude(bool set); - // 'simple' effects are those precompiled and loaded into the controller - ndk::ScopedAStatus getSimpleDetails(Effect effect, EffectStrength strength, - uint32_t *outEffectIndex, uint32_t *outTimeMs, - uint32_t *outVolLevel); - // 'compound' effects are those composed by stringing multiple 'simple' effects - ndk::ScopedAStatus getCompoundDetails(Effect effect, EffectStrength strength, - uint32_t *outTimeMs, struct dspmem_chunk *outCh); - ndk::ScopedAStatus getPrimitiveDetails(CompositePrimitive primitive, uint32_t *outEffectIndex); - ndk::ScopedAStatus performEffect(Effect effect, EffectStrength strength, - const std::shared_ptr &callback, - int32_t *outTimeMs); - ndk::ScopedAStatus performEffect(uint32_t effectIndex, uint32_t volLevel, - struct dspmem_chunk *ch, - const std::shared_ptr &callback); - ndk::ScopedAStatus setPwle(const std::string &pwleQueue); - bool isUnderExternalControl(); - void waitForComplete(std::shared_ptr &&callback); - uint32_t intensityToVolLevel(float intensity, uint32_t effectIndex); - bool findHapticAlsaDevice(int *card, int *device); - bool hasHapticAlsaDevice(); - bool enableHapticPcmAmp(struct pcm **haptic_pcm, bool enable, int card, int device); - uint16_t amplitudeToScale(float amplitude, float maximum, bool scalable); - void updateContext(); - - std::unique_ptr mHwApi; - std::unique_ptr mHwCal; - uint32_t mF0Offset; - std::array mTickEffectVol; - std::array mClickEffectVol; - std::array mLongEffectVol; - std::vector mFfEffects; - std::vector mEffectDurations; - std::future mAsyncHandle; - ::android::base::unique_fd mInputFd; - int8_t mActiveId{-1}; - struct pcm *mHapticPcm; - int mCard; - int mDevice; - bool mHasHapticAlsaDevice{false}; - bool mIsUnderExternalControl; - float mLongEffectScale = 1.0; - bool mIsChirpEnabled; - uint32_t mScaleTime; - bool mFadeEnable; - uint32_t mScalingFactor; - uint32_t mScaleCooldown; - bool mContextEnable; - uint32_t mSupportedPrimitivesBits = 0x0; - std::vector mSupportedPrimitives; - bool mConfigHapticAlsaDeviceDone{false}; -}; - -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/cs40l26/android.hardware.vibrator-service.cs40l26-private-lynx.rc b/vibrator/cs40l26/android.hardware.vibrator-service.cs40l26-private-lynx.rc deleted file mode 100644 index 6986d1a..0000000 --- a/vibrator/cs40l26/android.hardware.vibrator-service.cs40l26-private-lynx.rc +++ /dev/null @@ -1,47 +0,0 @@ -on property:vendor.all.modules.ready=1 - wait /sys/bus/i2c/devices/i2c-cs40l26a/calibration/redc_cal_time_ms - - mkdir /mnt/vendor/persist/haptics 0770 system system - chmod 770 /mnt/vendor/persist/haptics - chmod 440 /mnt/vendor/persist/haptics/cs40l26.cal - chown system system /mnt/vendor/persist/haptics - chown system system /mnt/vendor/persist/haptics/cs40l26.cal - - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/f0_stored - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/q_stored - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/calibration/redc_stored - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/vibe_state - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/num_waves - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_offset - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/owt_free_space - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/f0_comp_enable - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/redc_comp_enable - chown system system /sys/bus/i2c/devices/i2c-cs40l26a/default/delay_before_stop_playback_us - - enable vendor.vibrator.cs40l26 - -service vendor.vibrator.cs40l26 /vendor/bin/hw/android.hardware.vibrator-service.cs40l26-private-lynx - class hal - user system - group system input context_hub - - setenv INPUT_EVENT_NAME cs40l26_input - setenv INPUT_EVENT_PATH /dev/input/event* - setenv PROPERTY_PREFIX ro.vendor.vibrator.hal. - setenv CALIBRATION_FILEPATH /mnt/vendor/persist/haptics/cs40l26.cal - - setenv HWAPI_PATH_PREFIX /sys/bus/i2c/devices/i2c-cs40l26a/ - setenv HWAPI_DEBUG_PATHS " - calibration/f0_stored - calibration/redc_stored - calibration/q_stored - default/vibe_state - default/num_waves - default/f0_offset - default/owt_free_space - default/f0_comp_enable - default/redc_comp_enable - default/delay_before_stop_playback_us - " - - disabled diff --git a/vibrator/cs40l26/android.hardware.vibrator-service.cs40l26-private-lynx.xml b/vibrator/cs40l26/android.hardware.vibrator-service.cs40l26-private-lynx.xml deleted file mode 100644 index 4db8f8c..0000000 --- a/vibrator/cs40l26/android.hardware.vibrator-service.cs40l26-private-lynx.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - android.hardware.vibrator - 2 - IVibrator/default - - diff --git a/vibrator/cs40l26/device.mk b/vibrator/cs40l26/device.mk deleted file mode 100644 index 68860ef..0000000 --- a/vibrator/cs40l26/device.mk +++ /dev/null @@ -1,6 +0,0 @@ -PRODUCT_PACKAGES += \ - android.hardware.vibrator-service.cs40l26-private-lynx - -BOARD_SEPOLICY_DIRS += \ - hardware/google/pixel-sepolicy/vibrator/common \ - hardware/google/pixel-sepolicy/vibrator/cs40l26 diff --git a/vibrator/cs40l26/inc/CapoDetector.h b/vibrator/cs40l26/inc/CapoDetector.h deleted file mode 100644 index 4b898ef..0000000 --- a/vibrator/cs40l26/inc/CapoDetector.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2022 Google LLC. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include - -#include "proto/capo.pb.h" - -using android::sp; -using android::chre::HostProtocolHost; -using android::chre::IChreMessageHandlers; -using android::chre::SocketClient; - -// following convention of CHRE code. -namespace fbs = ::chre::fbs; - -namespace android { -namespace chre { - -#define NS_FROM_MS(x) ((x)*1000000) - -struct CapoMDParams { - uint64_t still_time_threshold_ns; - uint32_t window_width_ns; - float motion_confidence_threshold; - float still_confidence_threshold; - float var_threshold; - float var_threshold_delta; -}; - -class CapoDetector : public android::chre::SocketClient::ICallbacks, - public android::chre::IChreMessageHandlers, - public android::chre::SocketClient { - public: - // Typedef declaration for callback function. - typedef std::function cb_fn_t; - - // Called when initializing connection with CHRE socket. - static android::sp start(); - // Called when the socket is successfully (re-)connected. - // Reset the position and try to send NanoappList request. - void onConnected() override; - // Called when we have failed to (re-)connect the socket after many attempts - // and are giving up. - void onConnectionAborted() override; - // Invoked when the socket is disconnected, and this connection loss - // was not the result of an explicit call to disconnect(). - // Reset the position while disconnecting. - void onDisconnected() override; - // Decode unix socket msgs to CHRE messages, and call the appropriate - // callback depending on the CHRE message. - void onMessageReceived(const void *data, size_t length) override; - // Listen for messages from capo nanoapp and handle the message. - void handleNanoappMessage(const ::chre::fbs::NanoappMessageT &message) override; - // Handle the response of a NanoappList request. - // Ensure that capo nanoapp is running. - void handleNanoappListResponse(const ::chre::fbs::NanoappListResponseT &response) override; - // Send enabling message to the nanoapp. - void enable(); - - // Get last carried position type. - uint8_t getCarriedPosition() { return last_position_type_; } - // Get the host endpoint. - uint16_t getHostEndPoint() { return kHostEndpoint; } - // Get the capo nanoapp ID. - uint64_t getNanoppAppId() { return kCapoNanoappId; } - // Set up callback_func_ if needed. - void setCallback(cb_fn_t cb) { callback_func_ = cb; } - - private: - // Nanoapp ID of capo, ref: go/nanoapp-id-tracker. - static constexpr uint64_t kCapoNanoappId = 0x476f6f676c001020ULL; - // String of socket name for connecting chre. - static constexpr char kChreSocketName[] = "chre"; - // The host endpoint we use when sending message. - // Set with 0x9020 based on 0x8000 AND capo_app_id(1020). - // Ref: go/host-endpoint-id-tracker. - static constexpr uint16_t kHostEndpoint = 0x9020; - // Using for hal layer callback function. - cb_fn_t callback_func_ = nullptr; - // Last carried position received from the nano app - capo::PositionType last_position_type_ = capo::PositionType::UNKNOWN; - // Motion detector parameters for host-driven capo config - const struct CapoMDParams mCapoDetectorMDParameters { - .still_time_threshold_ns = NS_FROM_MS(500), - .window_width_ns = NS_FROM_MS(100), - .motion_confidence_threshold = 0.98f, - .still_confidence_threshold = 0.99f, - .var_threshold = 0.0125f, - .var_threshold_delta = 0.0125f, - }; -}; - -} // namespace chre -} // namespace android diff --git a/vibrator/cs40l26/proto/capo.proto b/vibrator/cs40l26/proto/capo.proto deleted file mode 100644 index 00b3186..0000000 --- a/vibrator/cs40l26/proto/capo.proto +++ /dev/null @@ -1,148 +0,0 @@ -syntax = "proto3"; - -package capo; - -// The message types used in capo nanoapp. Some of them are H2C -// (Host-To-CHRE) and others are C2H (CHRE-To-Host). One message type must be -// either H2C or C2H. Each message type can choose to have payload or not. -enum MessageType { - // Explicitly prevents 0 from being used as a valid message type. - // Doing so protects from obscure bugs caused by default-initialized values. - INVALID = 0; - - // Detector configuration related message start from 100. - // Signal for host to acknowledge the notification. - // It contains AckNotification payload. - ACK_NOTIFICATION = 100; - - // Signal to enable the carried position detector for device. No payload. - ENABLE_DETECTOR = 101; - - // Signal to disable the carried position detector for device. No payload. - DISABLE_DETECTOR = 102; - - // Signal to request most recent carried position detector state. No payload. - REQUEST_UPDATE = 103; - - // Signal to force carried position detector to refresh state. No payload. - FORCE_UPDATE = 104; - - // Configure the detector with desired parameters. ConfigureDetector payload. - CONFIGURE_DETECTOR = 105; - - // Position Detection related message start from 200. - // Signal while carried position of device detected. - // It contains PositionDetected payload. - POSITION_DETECTED = 200; -} - -// Notification Type. -enum NotificationType { - // Explicitly prevents 0 from being used as a valid notification type. - // Doing so protects from obscure bugs caused by default-initialized values. - INVALID_NOTIFICATION = 0; - - // Notification of enabling the carried position detector for device. - ENABLE_NOTIFICATION = 1; - - // Notification of disabling the carried position detector for device. - DISABLE_NOTIFICATION = 2; - - // Notification of request update from the carried position detector. - REQUEST_UPDATE_NOTIFICATION = 3; - - // Notification of force update from the carried position detector. - FORCE_UPDATE_NOTIFICATION = 4; - - // Notification of configure message. - CONFIGURE_NOTIFICATION = 5; -} - -// This message type used for host to acknowledge the notification. -message AckNotification { - // Sent a notification type for host to acknowledge. - NotificationType notification_type = 1; -} - -// Position type. -enum PositionType { - // Explicitly prevents 0 from being used as a valid carried position type. - // Doing so protects from obscure bugs caused by default-initialized values. - UNKNOWN = 0; - - // Carried position while device is in motion. - IN_MOTION = 1; - - // Carried position while device is on table and faces up. - ON_TABLE_FACE_UP = 2; - - // Carried position while device is on table and faces down. - ON_TABLE_FACE_DOWN = 3; - - // Carried position while device is stationary in unknown orientation. - STATIONARY_UNKNOWN = 4; -} - -// This message type used to notify host a position was a detected. -message PositionDetected { - // Sent a position type that is defined in PositionTypes. - PositionType position_type = 1; -} - -// Predefined configurations for detector. -enum ConfigPresetType { - // Explicitly prevents 0 from being used as a valid type. - // Doing so protects from obscure bugs caused by default-initialized values. - CONFIG_PRESET_UNSPECIFIED = 0; - - // Default preset. - CONFIG_PRESET_DEFAULT = 1; - - // Preset for sticky-stationary behavior. - CONFIG_PRESET_STICKY_STATIONARY = 2; -} - -message ConfigureDetector { - // Ref: cs/location/lbs/contexthub/nanoapps/motiondetector/motion_detector.h - message ConfigData { - // These algo parameters are exposed to enable tuning via server flags. - // The amount of time that the algorithm's computed stillness confidence - // must exceed still_confidence_threshold before entering the stationary - // state. Increasing this value will make the algorithm take longer to - // transition from the in motion state to the stationary state. - uint64 still_time_threshold_nanosecond = 1; - - // The amount of time in which the variance should be averaged. Increasing - // this value will effectively smooth the input data, making the algorithm - // less likely to transition between states. - uint32 window_width_nanosecond = 2; - - // The required confidence that the device is in motion before entering the - // motion state. Valid range is [0.0, 1.0], where 1.0 indicates that the - // algorithm must be 100% certain that the device is moving before entering - // the motion state. If the Instant Motion sensor is triggered, this value - // is ignored and the algorithm is immediately transitioned into the in - // motion state. - float motion_confidence_threshold = 3; - - // The required confidence that the device is stationary before entering the - // stationary state. Valid range is [0.0, 1.0], where 1.0 indicates that the - // algorithm must be 100% certain that the device is stationary before - // entering the stationary state. - float still_confidence_threshold = 4; - - // The variance threshold for the StillnessDetector algorithm. Increasing - // this value causes the algorithm to be less likely to detect motion. - float var_threshold = 5; - - // The variance threshold delta for the StillnessDetector algorithm about - // which the stationary confidence is calculated. Valid range is - // [0.0, var_threshold]. - float var_threshold_delta = 6; - } - - oneof type { - ConfigPresetType preset_type = 1; - ConfigData config_data = 2; - } -} diff --git a/vibrator/cs40l26/service.cpp b/vibrator/cs40l26/service.cpp deleted file mode 100644 index 27173d9..0000000 --- a/vibrator/cs40l26/service.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include -#include -#include -#include -#include - -#include "Hardware.h" -#include "Vibrator.h" - -using ::aidl::android::hardware::vibrator::HwApi; -using ::aidl::android::hardware::vibrator::HwCal; -using ::aidl::android::hardware::vibrator::Vibrator; -using ::android::defaultServiceManager; -using ::android::ProcessState; -using ::android::sp; -using ::android::String16; - -#if !defined(VIBRATOR_NAME) -#define VIBRATOR_NAME "default" -#endif - -int main() { - auto svc = ndk::SharedRefBase::make(std::make_unique(), - std::make_unique()); - const auto svcName = std::string() + svc->descriptor + "/" + VIBRATOR_NAME; - - ProcessState::initWithDriver("/dev/vndbinder"); - - auto svcBinder = svc->asBinder(); - binder_status_t status = AServiceManager_addService(svcBinder.get(), svcName.c_str()); - LOG_ALWAYS_FATAL_IF(status != STATUS_OK); - - ProcessState::self()->setThreadPoolMaxThreadCount(1); - ProcessState::self()->startThreadPool(); - - ABinderProcess_setThreadPoolMaxThreadCount(0); - ABinderProcess_joinThreadPool(); - - return EXIT_FAILURE; // should not reach -} diff --git a/vibrator/cs40l26/tests/Android.bp b/vibrator/cs40l26/tests/Android.bp deleted file mode 100644 index c53ec23..0000000 --- a/vibrator/cs40l26/tests/Android.bp +++ /dev/null @@ -1,35 +0,0 @@ -// -// Copyright (C) 2022 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package { - default_applicable_licenses: ["Android-Apache-2.0"], -} - -cc_test { - name: "VibratorHalCs40l26TestSuitePrivateLynx", - defaults: ["VibratorHalCs40l26TestDefaultsPrivateLynx"], - srcs: [ - "test-hwcal.cpp", - "test-hwapi.cpp", - "test-vibrator.cpp", - ], - static_libs: [ - "libc++fs", - "libgmock", - ], - shared_libs: [ - "libbase", - ], -} diff --git a/vibrator/cs40l26/tests/mocks.h b/vibrator/cs40l26/tests/mocks.h deleted file mode 100644 index 5ba0270..0000000 --- a/vibrator/cs40l26/tests/mocks.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef ANDROID_HARDWARE_VIBRATOR_TEST_MOCKS_H -#define ANDROID_HARDWARE_VIBRATOR_TEST_MOCKS_H - -#include - -#include "Vibrator.h" - -class MockApi : public ::aidl::android::hardware::vibrator::Vibrator::HwApi { - public: - MOCK_METHOD0(destructor, void()); - MOCK_METHOD1(setF0, bool(std::string value)); - MOCK_METHOD1(setF0Offset, bool(uint32_t value)); - MOCK_METHOD1(setRedc, bool(std::string value)); - MOCK_METHOD1(setQ, bool(std::string value)); - MOCK_METHOD1(getEffectCount, bool(uint32_t *value)); - MOCK_METHOD2(pollVibeState, bool(uint32_t value, int32_t timeoutMs)); - MOCK_METHOD0(hasOwtFreeSpace, bool()); - MOCK_METHOD1(getOwtFreeSpace, bool(uint32_t *value)); - MOCK_METHOD1(setF0CompEnable, bool(bool value)); - MOCK_METHOD1(setRedcCompEnable, bool(bool value)); - MOCK_METHOD1(setMinOnOffInterval, bool(uint32_t value)); - MOCK_METHOD0(getContextScale, uint32_t()); - MOCK_METHOD0(getContextEnable, bool()); - MOCK_METHOD0(getContextSettlingTime, uint32_t()); - MOCK_METHOD0(getContextCooldownTime, uint32_t()); - MOCK_METHOD0(getContextFadeEnable, bool()); - MOCK_METHOD2(setFFGain, bool(int fd, uint16_t value)); - MOCK_METHOD3(setFFEffect, bool(int fd, struct ff_effect *effect, uint16_t timeoutMs)); - MOCK_METHOD3(setFFPlay, bool(int fd, int8_t index, bool value)); - MOCK_METHOD2(getHapticAlsaDevice, bool(int *card, int *device)); - MOCK_METHOD4(setHapticPcmAmp, bool(struct pcm **haptic_pcm, bool enable, int card, int device)); - MOCK_METHOD6(uploadOwtEffect, - bool(int fd, uint8_t *owtData, uint32_t numBytes, struct ff_effect *effect, - uint32_t *outEffectIndex, int *status)); - MOCK_METHOD3(eraseOwtEffect, bool(int fd, int8_t effectIndex, std::vector *effect)); - MOCK_METHOD1(debug, void(int fd)); - - ~MockApi() override { destructor(); }; -}; - -class MockCal : public ::aidl::android::hardware::vibrator::Vibrator::HwCal { - public: - MOCK_METHOD0(destructor, void()); - MOCK_METHOD1(getVersion, bool(uint32_t *value)); - MOCK_METHOD1(getF0, bool(std::string &value)); - MOCK_METHOD1(getRedc, bool(std::string &value)); - MOCK_METHOD1(getQ, bool(std::string &value)); - MOCK_METHOD1(getLongFrequencyShift, bool(int32_t *value)); - MOCK_METHOD1(getTickVolLevels, bool(std::array *value)); - MOCK_METHOD1(getClickVolLevels, bool(std::array *value)); - MOCK_METHOD1(getLongVolLevels, bool(std::array *value)); - MOCK_METHOD0(isChirpEnabled, bool()); - MOCK_METHOD1(getSupportedPrimitives, bool(uint32_t *value)); - MOCK_METHOD0(isF0CompEnabled, bool()); - MOCK_METHOD0(isRedcCompEnabled, bool()); - MOCK_METHOD1(debug, void(int fd)); - - ~MockCal() override { destructor(); }; - // b/132668253: Workaround gMock Compilation Issue - bool getF0(std::string *value) { return getF0(*value); } - bool getRedc(std::string *value) { return getRedc(*value); } - bool getQ(std::string *value) { return getQ(*value); } -}; - -class MockVibratorCallback : public aidl::android::hardware::vibrator::BnVibratorCallback { - public: - MOCK_METHOD(ndk::ScopedAStatus, onComplete, ()); -}; - -#endif // ANDROID_HARDWARE_VIBRATOR_TEST_MOCKS_H diff --git a/vibrator/cs40l26/tests/test-hwapi.cpp b/vibrator/cs40l26/tests/test-hwapi.cpp deleted file mode 100644 index cc4d465..0000000 --- a/vibrator/cs40l26/tests/test-hwapi.cpp +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (C) 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -#include -#include - -#include "Hardware.h" - -namespace aidl { -namespace android { -namespace hardware { -namespace vibrator { - -using ::testing::Test; -using ::testing::TestParamInfo; -using ::testing::ValuesIn; -using ::testing::WithParamInterface; - -class HwApiTest : public Test { - private: - static constexpr const char *FILE_NAMES[]{ - "calibration/f0_stored", - "default/f0_offset", - "calibration/redc_stored", - "calibration/q_stored", - "default/f0_comp_enable", - "default/redc_comp_enable", - "default/owt_free_space", - "default/num_waves", - "default/delay_before_stop_playback_us", - }; - - public: - void SetUp() override { - std::string prefix; - for (auto n : FILE_NAMES) { - auto name = std::filesystem::path(n); - auto path = std::filesystem::path(mFilesDir.path) / name; - fs_mkdirs(path.c_str(), S_IRWXU); - std::ofstream touch{path}; - mFileMap[name] = path; - } - prefix = std::filesystem::path(mFilesDir.path) / ""; - setenv("HWAPI_PATH_PREFIX", prefix.c_str(), true); - mHwApi = std::make_unique(); - - for (auto n : FILE_NAMES) { - auto name = std::filesystem::path(n); - auto path = std::filesystem::path(mEmptyDir.path) / name; - } - prefix = std::filesystem::path(mEmptyDir.path) / ""; - setenv("HWAPI_PATH_PREFIX", prefix.c_str(), true); - mNoApi = std::make_unique(); - } - - void TearDown() override { verifyContents(); } - - static auto ParamNameFixup(std::string str) { - std::replace(str.begin(), str.end(), '/', '_'); - return str; - } - - protected: - // Set expected file content for a test. - template - void expectContent(const std::string &name, const T &value) { - mExpectedContent[name] << value << std::endl; - } - - // Set actual file content for an input test. - template - void updateContent(const std::string &name, const T &value) { - std::ofstream(mFileMap[name]) << value << std::endl; - } - - template - void expectAndUpdateContent(const std::string &name, const T &value) { - expectContent(name, value); - updateContent(name, value); - } - - // Compare all file contents against expected contents. - void verifyContents() { - for (auto &a : mFileMap) { - std::ifstream file{a.second}; - std::string expect = mExpectedContent[a.first].str(); - std::string actual = std::string(std::istreambuf_iterator(file), - std::istreambuf_iterator()); - EXPECT_EQ(expect, actual) << a.first; - } - } - - protected: - std::unique_ptr mHwApi; - std::unique_ptr mNoApi; - std::map mFileMap; - TemporaryDir mFilesDir; - TemporaryDir mEmptyDir; - std::map mExpectedContent; -}; - -template -class HwApiTypedTest : public HwApiTest, - public WithParamInterface>> { - public: - static auto PrintParam(const TestParamInfo &info) { - return ParamNameFixup(std::get<0>(info.param)); - } - static auto MakeParam(std::string name, std::function func) { - return std::make_tuple(name, func); - } -}; - -using HasTest = HwApiTypedTest; - -TEST_P(HasTest, success_returnsTrue) { - auto param = GetParam(); - auto func = std::get<1>(param); - - EXPECT_TRUE(func(*mHwApi)); -} - -TEST_P(HasTest, success_returnsFalse) { - auto param = GetParam(); - auto func = std::get<1>(param); - - EXPECT_FALSE(func(*mNoApi)); -} - -INSTANTIATE_TEST_CASE_P(HwApiTests, HasTest, - ValuesIn({ - HasTest::MakeParam("default/owt_free_space", - &Vibrator::HwApi::hasOwtFreeSpace), - }), - HasTest::PrintParam); - -using GetUint32Test = HwApiTypedTest; - -TEST_P(GetUint32Test, success) { - auto param = GetParam(); - auto name = std::get<0>(param); - auto func = std::get<1>(param); - uint32_t expect = std::rand(); - uint32_t actual = ~expect; - - expectAndUpdateContent(name, expect); - - EXPECT_TRUE(func(*mHwApi, &actual)); - EXPECT_EQ(expect, actual); -} - -TEST_P(GetUint32Test, failure) { - auto param = GetParam(); - auto func = std::get<1>(param); - uint32_t value; - - EXPECT_FALSE(func(*mNoApi, &value)); -} - -INSTANTIATE_TEST_CASE_P(HwApiTests, GetUint32Test, - ValuesIn({ - GetUint32Test::MakeParam("default/num_waves", - &Vibrator::HwApi::getEffectCount), - GetUint32Test::MakeParam("default/owt_free_space", - &Vibrator::HwApi::getOwtFreeSpace), - }), - GetUint32Test::PrintParam); - -using SetBoolTest = HwApiTypedTest; - -TEST_P(SetBoolTest, success_returnsTrue) { - auto param = GetParam(); - auto name = std::get<0>(param); - auto func = std::get<1>(param); - - expectContent(name, "1"); - - EXPECT_TRUE(func(*mHwApi, true)); -} - -TEST_P(SetBoolTest, success_returnsFalse) { - auto param = GetParam(); - auto name = std::get<0>(param); - auto func = std::get<1>(param); - - expectContent(name, "0"); - - EXPECT_TRUE(func(*mHwApi, false)); -} - -TEST_P(SetBoolTest, failure) { - auto param = GetParam(); - auto func = std::get<1>(param); - - EXPECT_FALSE(func(*mNoApi, true)); - EXPECT_FALSE(func(*mNoApi, false)); -} - -INSTANTIATE_TEST_CASE_P(HwApiTests, SetBoolTest, - ValuesIn({ - SetBoolTest::MakeParam("default/f0_comp_enable", - &Vibrator::HwApi::setF0CompEnable), - SetBoolTest::MakeParam("default/redc_comp_enable", - &Vibrator::HwApi::setRedcCompEnable), - }), - SetBoolTest::PrintParam); - -using SetUint32Test = HwApiTypedTest; - -TEST_P(SetUint32Test, success) { - auto param = GetParam(); - auto name = std::get<0>(param); - auto func = std::get<1>(param); - uint32_t value = std::rand(); - - expectContent(name, value); - - EXPECT_TRUE(func(*mHwApi, value)); -} - -TEST_P(SetUint32Test, failure) { - auto param = GetParam(); - auto func = std::get<1>(param); - uint32_t value = std::rand(); - - EXPECT_FALSE(func(*mNoApi, value)); -} - -INSTANTIATE_TEST_CASE_P(HwApiTests, SetUint32Test, - ValuesIn({ - SetUint32Test::MakeParam("default/f0_offset", - &Vibrator::HwApi::setF0Offset), - SetUint32Test::MakeParam("default/delay_before_stop_playback_us", - &Vibrator::HwApi::setMinOnOffInterval), - }), - SetUint32Test::PrintParam); - -using SetStringTest = HwApiTypedTest; - -TEST_P(SetStringTest, success) { - auto param = GetParam(); - auto name = std::get<0>(param); - auto func = std::get<1>(param); - std::string value = TemporaryFile().path; - - expectContent(name, value); - - EXPECT_TRUE(func(*mHwApi, value)); -} - -TEST_P(SetStringTest, failure) { - auto param = GetParam(); - auto func = std::get<1>(param); - std::string value = TemporaryFile().path; - - EXPECT_FALSE(func(*mNoApi, value)); -} - -INSTANTIATE_TEST_CASE_P( - HwApiTests, SetStringTest, - ValuesIn({ - SetStringTest::MakeParam("calibration/f0_stored", &Vibrator::HwApi::setF0), - SetStringTest::MakeParam("calibration/redc_stored", &Vibrator::HwApi::setRedc), - SetStringTest::MakeParam("calibration/q_stored", &Vibrator::HwApi::setQ), - }), - SetStringTest::PrintParam); - -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/cs40l26/tests/test-hwcal.cpp b/vibrator/cs40l26/tests/test-hwcal.cpp deleted file mode 100644 index e482b6c..0000000 --- a/vibrator/cs40l26/tests/test-hwcal.cpp +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright (C) 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -#include - -#include "Hardware.h" - -namespace aidl { -namespace android { -namespace hardware { -namespace vibrator { - -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}; - - public: - void SetUp() override { setenv("CALIBRATION_FILEPATH", mCalFile.path, true); } - - private: - template - static void pack(std::ostream &stream, const T &value, std::string lpad, std::string rpad) { - stream << lpad << value << rpad; - } - - template ::size_type N> - static void pack(std::ostream &stream, const std::array &value, std::string lpad, - std::string rpad) { - for (auto &entry : value) { - pack(stream, entry, lpad, rpad); - } - } - - protected: - void createHwCal() { mHwCal = std::make_unique(); } - - template - void write(const std::string key, const T &value, std::string lpad = " ", - std::string rpad = "") { - std::ofstream calfile{mCalFile.path, std::ios_base::app}; - calfile << key << ":"; - pack(calfile, value, lpad, rpad); - calfile << std::endl; - } - - void unlink() { ::unlink(mCalFile.path); } - - protected: - std::unique_ptr mHwCal; - TemporaryFile mCalFile; -}; - -TEST_F(HwCalTest, f0_measured) { - uint32_t randInput = std::rand(); - std::string expect = std::to_string(randInput); - std::string actual = std::to_string(~randInput); - - write("f0_measured", expect); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getF0(&actual)); - EXPECT_EQ(expect, actual); -} - -TEST_F(HwCalTest, f0_missing) { - std::string actual; - - createHwCal(); - - EXPECT_FALSE(mHwCal->getF0(&actual)); -} - -TEST_F(HwCalTest, redc_measured) { - uint32_t randInput = std::rand(); - std::string expect = std::to_string(randInput); - std::string actual = std::to_string(~randInput); - - write("redc_measured", expect); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getRedc(&actual)); - EXPECT_EQ(expect, actual); -} - -TEST_F(HwCalTest, redc_missing) { - std::string actual; - - createHwCal(); - - EXPECT_FALSE(mHwCal->getRedc(&actual)); -} - -TEST_F(HwCalTest, q_measured) { - uint32_t randInput = std::rand(); - std::string expect = std::to_string(randInput); - std::string actual = std::to_string(~randInput); - - write("q_measured", expect); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getQ(&actual)); - EXPECT_EQ(expect, actual); -} - -TEST_F(HwCalTest, q_missing) { - std::string actual; - - createHwCal(); - - EXPECT_FALSE(mHwCal->getQ(&actual)); -} - -TEST_F(HwCalTest, v_levels) { - std::array expect; - std::array actual; - - // voltage for tick effects - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - - write("v_tick", expect); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getTickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - // voltage for click effects - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - - write("v_click", expect); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getClickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - // voltage for long effects - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - - write("v_long", expect); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getLongVolLevels(&actual)); - EXPECT_EQ(expect, actual); -} - -TEST_F(HwCalTest, v_missing) { - std::array expect = V_TICK_DEFAULT; - std::array actual; - - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; }); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getTickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - expect = V_CLICK_DEFAULT; - - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; }); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getClickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - expect = V_LONG_DEFAULT; - - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; }); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getLongVolLevels(&actual)); - EXPECT_EQ(expect, actual); -} - -TEST_F(HwCalTest, v_short) { - std::array expect = V_TICK_DEFAULT; - std::array actual; - - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; }); - - write("v_tick", std::array()); - write("v_click", std::array()); - write("v_long", std::array()); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getTickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - expect = V_CLICK_DEFAULT; - EXPECT_TRUE(mHwCal->getClickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - expect = V_LONG_DEFAULT; - EXPECT_TRUE(mHwCal->getLongVolLevels(&actual)); - EXPECT_EQ(expect, actual); -} - -TEST_F(HwCalTest, v_long) { - std::array expect = V_TICK_DEFAULT; - std::array actual; - - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; }); - - write("v_tick", std::array()); - write("v_click", std::array()); - write("v_long", std::array()); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getTickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - expect = V_CLICK_DEFAULT; - EXPECT_TRUE(mHwCal->getClickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - expect = V_LONG_DEFAULT; - EXPECT_TRUE(mHwCal->getLongVolLevels(&actual)); - EXPECT_EQ(expect, actual); -} - -TEST_F(HwCalTest, v_nofile) { - std::array expect = V_TICK_DEFAULT; - std::array actual; - - std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; }); - - write("v_tick", actual); - write("v_click", actual); - write("v_long", actual); - unlink(); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getTickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - expect = V_CLICK_DEFAULT; - EXPECT_TRUE(mHwCal->getClickVolLevels(&actual)); - EXPECT_EQ(expect, actual); - - expect = V_LONG_DEFAULT; - EXPECT_TRUE(mHwCal->getLongVolLevels(&actual)); - EXPECT_EQ(expect, actual); -} - -TEST_F(HwCalTest, multiple) { - uint32_t randInput = std::rand(); - std::string f0Expect = std::to_string(randInput); - std::string f0Actual = std::to_string(~randInput); - randInput = std::rand(); - std::string redcExpect = std::to_string(randInput); - std::string redcActual = std::to_string(~randInput); - randInput = std::rand(); - std::string qExpect = std::to_string(randInput); - std::string qActual = std::to_string(~randInput); - std::array volTickExpect, volClickExpect, volLongExpect; - std::array volActual; - - std::transform(volTickExpect.begin(), volTickExpect.end(), volActual.begin(), [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - - write("f0_measured", f0Expect); - write("redc_measured", redcExpect); - write("q_measured", qExpect); - write("v_tick", volTickExpect); - std::transform(volClickExpect.begin(), volClickExpect.end(), volActual.begin(), - [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - write("v_click", volClickExpect); - std::transform(volLongExpect.begin(), volLongExpect.end(), volActual.begin(), [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - write("v_long", volLongExpect); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getF0(&f0Actual)); - EXPECT_EQ(f0Expect, f0Actual); - EXPECT_TRUE(mHwCal->getRedc(&redcActual)); - EXPECT_EQ(redcExpect, redcActual); - EXPECT_TRUE(mHwCal->getQ(&qActual)); - EXPECT_EQ(qExpect, qActual); - EXPECT_TRUE(mHwCal->getTickVolLevels(&volActual)); - EXPECT_EQ(volTickExpect, volActual); - EXPECT_TRUE(mHwCal->getClickVolLevels(&volActual)); - EXPECT_EQ(volClickExpect, volActual); - EXPECT_TRUE(mHwCal->getLongVolLevels(&volActual)); - EXPECT_EQ(volLongExpect, volActual); -} - -TEST_F(HwCalTest, trimming) { - uint32_t randInput = std::rand(); - std::string f0Expect = std::to_string(randInput); - std::string f0Actual = std::to_string(~randInput); - randInput = std::rand(); - std::string redcExpect = std::to_string(randInput); - std::string redcActual = std::to_string(randInput); - randInput = std::rand(); - std::string qExpect = std::to_string(randInput); - std::string qActual = std::to_string(randInput); - std::array volTickExpect, volClickExpect, volLongExpect; - std::array volActual; - - std::transform(volTickExpect.begin(), volTickExpect.end(), volActual.begin(), [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - - write("f0_measured", f0Expect, " \t", "\t "); - write("redc_measured", redcExpect, " \t", "\t "); - write("q_measured", qExpect, " \t", "\t "); - write("v_tick", volTickExpect, " \t", "\t "); - std::transform(volClickExpect.begin(), volClickExpect.end(), volActual.begin(), - [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - write("v_click", volClickExpect, " \t", "\t "); - std::transform(volLongExpect.begin(), volLongExpect.end(), volActual.begin(), [](uint32_t &e) { - e = std::rand(); - return ~e; - }); - write("v_long", volLongExpect, " \t", "\t "); - - createHwCal(); - - EXPECT_TRUE(mHwCal->getF0(&f0Actual)); - EXPECT_EQ(f0Expect, f0Actual); - EXPECT_TRUE(mHwCal->getRedc(&redcActual)); - EXPECT_EQ(redcExpect, redcActual); - EXPECT_TRUE(mHwCal->getQ(&qActual)); - EXPECT_EQ(qExpect, qActual); - EXPECT_TRUE(mHwCal->getTickVolLevels(&volActual)); - EXPECT_EQ(volTickExpect, volActual); - EXPECT_TRUE(mHwCal->getClickVolLevels(&volActual)); - EXPECT_EQ(volClickExpect, volActual); - EXPECT_TRUE(mHwCal->getLongVolLevels(&volActual)); - EXPECT_EQ(volLongExpect, volActual); -} - -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/cs40l26/tests/test-vibrator.cpp b/vibrator/cs40l26/tests/test-vibrator.cpp deleted file mode 100644 index 603ef5e..0000000 --- a/vibrator/cs40l26/tests/test-vibrator.cpp +++ /dev/null @@ -1,692 +0,0 @@ -/* - * Copyright (C) 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include "Vibrator.h" -#include "mocks.h" -#include "types.h" -#include "utils.h" - -namespace aidl { -namespace android { -namespace hardware { -namespace vibrator { - -using ::testing::_; -using ::testing::AnyNumber; -using ::testing::Assign; -using ::testing::AtLeast; -using ::testing::AtMost; -using ::testing::Combine; -using ::testing::DoAll; -using ::testing::DoDefault; -using ::testing::Exactly; -using ::testing::Expectation; -using ::testing::ExpectationSet; -using ::testing::Ge; -using ::testing::Mock; -using ::testing::MockFunction; -using ::testing::Range; -using ::testing::Return; -using ::testing::Sequence; -using ::testing::SetArgPointee; -using ::testing::SetArgReferee; -using ::testing::Test; -using ::testing::TestParamInfo; -using ::testing::ValuesIn; -using ::testing::WithParamInterface; - -// Forward Declarations - -static EffectQueue Queue(const QueueEffect &effect); -static EffectQueue Queue(const QueueDelay &delay); -template -static EffectQueue Queue(const T &first, const U &second, Args... rest); - -static EffectLevel Level(float intensity, float levelLow, float levelHigh); -static EffectScale Scale(float intensity, float levelLow, float levelHigh); - -// Constants With Arbitrary Values - -static constexpr uint32_t CAL_VERSION = 2; -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 EFFECT_DURATIONS{ - 0, 100, 30, 1000, 300, 130, 150, 500, 100, 15, 20, 1000, 1000, 1000}; - -// Constants With Prescribed Values - -static const std::map EFFECT_INDEX{ - {Effect::CLICK, 2}, - {Effect::TICK, 2}, - {Effect::HEAVY_CLICK, 2}, - {Effect::TEXTURE_TICK, 9}, -}; -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; -enum WaveformIndex : uint16_t { - /* Physical waveform */ - WAVEFORM_LONG_VIBRATION_EFFECT_INDEX = 0, - WAVEFORM_RESERVED_INDEX_1 = 1, - WAVEFORM_CLICK_INDEX = 2, - WAVEFORM_SHORT_VIBRATION_EFFECT_INDEX = 3, - WAVEFORM_THUD_INDEX = 4, - WAVEFORM_SPIN_INDEX = 5, - WAVEFORM_QUICK_RISE_INDEX = 6, - WAVEFORM_SLOW_RISE_INDEX = 7, - WAVEFORM_QUICK_FALL_INDEX = 8, - WAVEFORM_LIGHT_TICK_INDEX = 9, - WAVEFORM_LOW_TICK_INDEX = 10, - WAVEFORM_RESERVED_MFG_1, - WAVEFORM_RESERVED_MFG_2, - WAVEFORM_RESERVED_MFG_3, - WAVEFORM_MAX_PHYSICAL_INDEX, - /* OWT waveform */ - WAVEFORM_COMPOSE = WAVEFORM_MAX_PHYSICAL_INDEX, - WAVEFORM_PWLE, - /* - * Refer to , the WAVEFORM_MAX_INDEX must not exceed 96. - * #define FF_GAIN 0x60 // 96 in decimal - * #define FF_MAX_EFFECTS FF_GAIN - */ - WAVEFORM_MAX_INDEX, -}; - -static const EffectScale ON_GLOBAL_SCALE{levelToScale(V_LONG_DEFAULT[1])}; -static const EffectIndex ON_EFFECT_INDEX{0}; - -static const std::map EFFECT_SCALE{ - {{Effect::TICK, EffectStrength::LIGHT}, - Scale(0.5f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::TICK, EffectStrength::MEDIUM}, - Scale(0.5f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::TICK, EffectStrength::STRONG}, - Scale(0.5f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::CLICK, EffectStrength::LIGHT}, - Scale(0.7f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::CLICK, EffectStrength::MEDIUM}, - Scale(0.7f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::CLICK, EffectStrength::STRONG}, - Scale(0.7f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::HEAVY_CLICK, EffectStrength::LIGHT}, - Scale(1.0f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::HEAVY_CLICK, EffectStrength::MEDIUM}, - Scale(1.0f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::HEAVY_CLICK, EffectStrength::STRONG}, - Scale(1.0f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - {{Effect::TEXTURE_TICK, EffectStrength::LIGHT}, - Scale(0.5f * 0.5f, V_TICK_DEFAULT[0], V_TICK_DEFAULT[1])}, - {{Effect::TEXTURE_TICK, EffectStrength::MEDIUM}, - Scale(0.5f * 0.7f, V_TICK_DEFAULT[0], V_TICK_DEFAULT[1])}, - {{Effect::TEXTURE_TICK, EffectStrength::STRONG}, - Scale(0.5f * 1.0f, V_TICK_DEFAULT[0], V_TICK_DEFAULT[1])}, -}; - -static const std::map EFFECT_QUEUE{ - {{Effect::DOUBLE_CLICK, EffectStrength::LIGHT}, - Queue(QueueEffect{EFFECT_INDEX.at(Effect::CLICK), - Level(0.7f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - 100, - QueueEffect{EFFECT_INDEX.at(Effect::CLICK), - Level(1.0f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])})}, - {{Effect::DOUBLE_CLICK, EffectStrength::MEDIUM}, - Queue(QueueEffect{EFFECT_INDEX.at(Effect::CLICK), - Level(0.7f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - 100, - QueueEffect{EFFECT_INDEX.at(Effect::CLICK), - Level(1.0f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])})}, - {{Effect::DOUBLE_CLICK, EffectStrength::STRONG}, - Queue(QueueEffect{EFFECT_INDEX.at(Effect::CLICK), - Level(0.7f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])}, - 100, - QueueEffect{EFFECT_INDEX.at(Effect::CLICK), - Level(1.0f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])})}, -}; - -EffectQueue Queue(const QueueEffect &effect) { - auto index = std::get<0>(effect); - auto level = std::get<1>(effect); - auto string = std::to_string(index) + "." + std::to_string(level); - auto duration = EFFECT_DURATIONS[index]; - return {string, duration}; -} - -EffectQueue Queue(const QueueDelay &delay) { - auto string = std::to_string(delay); - return {string, delay}; -} - -template -EffectQueue Queue(const T &first, const U &second, Args... rest) { - auto head = Queue(first); - auto tail = Queue(second, rest...); - auto string = std::get<0>(head) + "," + std::get<0>(tail); - auto duration = std::get<1>(head) + std::get<1>(tail); - return {string, duration}; -} - -static EffectLevel Level(float intensity, float levelLow, float levelHigh) { - return std::lround(intensity * (levelHigh - levelLow)) + levelLow; -} - -static EffectScale Scale(float intensity, float levelLow, float levelHigh) { - return levelToScale(Level(intensity, levelLow, levelHigh)); -} - -class VibratorTest : public Test { - public: - void SetUp() override { - setenv("INPUT_EVENT_NAME", "CS40L26TestSuite", true); - std::unique_ptr mockapi; - std::unique_ptr mockcal; - - createMock(&mockapi, &mockcal); - createVibrator(std::move(mockapi), std::move(mockcal)); - } - - void TearDown() override { deleteVibrator(); } - - protected: - void createMock(std::unique_ptr *mockapi, std::unique_ptr *mockcal) { - *mockapi = std::make_unique(); - *mockcal = std::make_unique(); - - mMockApi = mockapi->get(); - mMockCal = mockcal->get(); - - ON_CALL(*mMockApi, destructor()).WillByDefault(Assign(&mMockApi, nullptr)); - - ON_CALL(*mMockApi, setFFGain(_, _)).WillByDefault(Return(true)); - ON_CALL(*mMockApi, setFFEffect(_, _, _)).WillByDefault(Return(true)); - ON_CALL(*mMockApi, setFFPlay(_, _, _)).WillByDefault(Return(true)); - ON_CALL(*mMockApi, pollVibeState(_, _)).WillByDefault(Return(true)); - ON_CALL(*mMockApi, uploadOwtEffect(_, _, _, _, _, _)).WillByDefault(Return(true)); - ON_CALL(*mMockApi, eraseOwtEffect(_, _, _)).WillByDefault(Return(true)); - - ON_CALL(*mMockApi, getOwtFreeSpace(_)) - .WillByDefault(DoAll(SetArgPointee<0>(11504), Return(true))); - - ON_CALL(*mMockCal, destructor()).WillByDefault(Assign(&mMockCal, nullptr)); - - ON_CALL(*mMockCal, getVersion(_)) - .WillByDefault(DoAll(SetArgPointee<0>(CAL_VERSION), Return(true))); - - ON_CALL(*mMockCal, getTickVolLevels(_)) - .WillByDefault(DoAll(SetArgPointee<0>(V_TICK_DEFAULT), Return(true))); - ON_CALL(*mMockCal, getClickVolLevels(_)) - .WillByDefault(DoAll(SetArgPointee<0>(V_CLICK_DEFAULT), Return(true))); - ON_CALL(*mMockCal, getLongVolLevels(_)) - .WillByDefault(DoAll(SetArgPointee<0>(V_LONG_DEFAULT), Return(true))); - - relaxMock(false); - } - - void createVibrator(std::unique_ptr mockapi, std::unique_ptr mockcal, - bool relaxed = true) { - if (relaxed) { - relaxMock(true); - } - mVibrator = ndk::SharedRefBase::make(std::move(mockapi), std::move(mockcal)); - if (relaxed) { - relaxMock(false); - } - } - - void deleteVibrator(bool relaxed = true) { - if (relaxed) { - relaxMock(true); - } - mVibrator.reset(); - } - - private: - void relaxMock(bool relax) { - auto times = relax ? AnyNumber() : Exactly(0); - - Mock::VerifyAndClearExpectations(mMockApi); - Mock::VerifyAndClearExpectations(mMockCal); - - EXPECT_CALL(*mMockApi, destructor()).Times(times); - EXPECT_CALL(*mMockApi, setF0(_)).Times(times); - EXPECT_CALL(*mMockApi, setF0Offset(_)).Times(times); - EXPECT_CALL(*mMockApi, setRedc(_)).Times(times); - EXPECT_CALL(*mMockApi, setQ(_)).Times(times); - EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).Times(times); - EXPECT_CALL(*mMockApi, getOwtFreeSpace(_)).Times(times); - EXPECT_CALL(*mMockApi, setF0CompEnable(_)).Times(times); - EXPECT_CALL(*mMockApi, setRedcCompEnable(_)).Times(times); - EXPECT_CALL(*mMockApi, pollVibeState(_, _)).Times(times); - EXPECT_CALL(*mMockApi, setFFGain(_, _)).Times(times); - EXPECT_CALL(*mMockApi, setFFEffect(_, _, _)).Times(times); - EXPECT_CALL(*mMockApi, setFFPlay(_, _, _)).Times(times); - EXPECT_CALL(*mMockApi, setMinOnOffInterval(_)).Times(times); - EXPECT_CALL(*mMockApi, getContextScale()).Times(times); - EXPECT_CALL(*mMockApi, getContextEnable()).Times(times); - EXPECT_CALL(*mMockApi, getContextSettlingTime()).Times(times); - EXPECT_CALL(*mMockApi, getContextCooldownTime()).Times(times); - EXPECT_CALL(*mMockApi, getContextFadeEnable()).Times(times); - EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).Times(times); - EXPECT_CALL(*mMockApi, setHapticPcmAmp(_, _, _, _)).Times(times); - - EXPECT_CALL(*mMockApi, debug(_)).Times(times); - - EXPECT_CALL(*mMockCal, destructor()).Times(times); - EXPECT_CALL(*mMockCal, getF0(_)).Times(times); - EXPECT_CALL(*mMockCal, getRedc(_)).Times(times); - EXPECT_CALL(*mMockCal, getQ(_)).Times(times); - EXPECT_CALL(*mMockCal, getTickVolLevels(_)).Times(times); - EXPECT_CALL(*mMockCal, getClickVolLevels(_)).Times(times); - EXPECT_CALL(*mMockCal, getLongVolLevels(_)).Times(times); - EXPECT_CALL(*mMockCal, isChirpEnabled()).Times(times); - EXPECT_CALL(*mMockCal, getLongFrequencyShift(_)).Times(times); - EXPECT_CALL(*mMockCal, isF0CompEnabled()).Times(times); - EXPECT_CALL(*mMockCal, isRedcCompEnabled()).Times(times); - EXPECT_CALL(*mMockCal, debug(_)).Times(times); - } - - protected: - MockApi *mMockApi; - MockCal *mMockCal; - std::shared_ptr mVibrator; - uint32_t mEffectIndex; -}; - -TEST_F(VibratorTest, Constructor) { - std::unique_ptr mockapi; - std::unique_ptr mockcal; - std::string f0Val = std::to_string(std::rand()); - std::string redcVal = std::to_string(std::rand()); - std::string qVal = std::to_string(std::rand()); - uint32_t calVer; - uint32_t supportedPrimitivesBits = 0x0; - Expectation volGet; - Sequence f0Seq, redcSeq, qSeq, supportedPrimitivesSeq; - - EXPECT_CALL(*mMockApi, destructor()).WillOnce(DoDefault()); - EXPECT_CALL(*mMockCal, destructor()).WillOnce(DoDefault()); - - deleteVibrator(false); - - createMock(&mockapi, &mockcal); - - EXPECT_CALL(*mMockCal, getF0(_)) - .InSequence(f0Seq) - .WillOnce(DoAll(SetArgReferee<0>(f0Val), Return(true))); - EXPECT_CALL(*mMockApi, setF0(f0Val)).InSequence(f0Seq).WillOnce(Return(true)); - - EXPECT_CALL(*mMockCal, getRedc(_)) - .InSequence(redcSeq) - .WillOnce(DoAll(SetArgReferee<0>(redcVal), Return(true))); - EXPECT_CALL(*mMockApi, setRedc(redcVal)).InSequence(redcSeq).WillOnce(Return(true)); - - EXPECT_CALL(*mMockCal, getQ(_)) - .InSequence(qSeq) - .WillOnce(DoAll(SetArgReferee<0>(qVal), Return(true))); - EXPECT_CALL(*mMockApi, setQ(qVal)).InSequence(qSeq).WillOnce(Return(true)); - - EXPECT_CALL(*mMockCal, getLongFrequencyShift(_)).WillOnce(Return(true)); - - mMockCal->getVersion(&calVer); - if (calVer == 2) { - volGet = EXPECT_CALL(*mMockCal, getTickVolLevels(_)).WillOnce(DoDefault()); - volGet = EXPECT_CALL(*mMockCal, getClickVolLevels(_)).WillOnce(DoDefault()); - volGet = EXPECT_CALL(*mMockCal, getLongVolLevels(_)).WillOnce(DoDefault()); - } - - EXPECT_CALL(*mMockCal, isF0CompEnabled()).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, setF0CompEnable(true)).WillOnce(Return(true)); - EXPECT_CALL(*mMockCal, isRedcCompEnabled()).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, setRedcCompEnable(true)).WillOnce(Return(true)); - - EXPECT_CALL(*mMockCal, isChirpEnabled()).WillOnce(Return(true)); - EXPECT_CALL(*mMockCal, getSupportedPrimitives(_)) - .InSequence(supportedPrimitivesSeq) - .WillOnce(DoAll(SetArgPointee<0>(supportedPrimitivesBits), Return(true))); - - EXPECT_CALL(*mMockApi, setMinOnOffInterval(MIN_ON_OFF_INTERVAL_US)).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, getContextScale()).WillOnce(Return(0)); - EXPECT_CALL(*mMockApi, getContextEnable()).WillOnce(Return(false)); - EXPECT_CALL(*mMockApi, getContextSettlingTime()).WillOnce(Return(0)); - EXPECT_CALL(*mMockApi, getContextCooldownTime()).WillOnce(Return(0)); - EXPECT_CALL(*mMockApi, getContextFadeEnable()).WillOnce(Return(false)); - createVibrator(std::move(mockapi), std::move(mockcal), false); -} - -TEST_F(VibratorTest, on) { - Sequence s1, s2; - uint16_t duration = std::rand() + 1; - - EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE)).InSequence(s1).WillOnce(DoDefault()); - EXPECT_CALL(*mMockApi, setFFEffect(_, _, duration + MAX_COLD_START_LATENCY_MS)) - .InSequence(s2) - .WillOnce(DoDefault()); - EXPECT_CALL(*mMockApi, setFFPlay(_, ON_EFFECT_INDEX, true)) - .InSequence(s1, s2) - .WillOnce(DoDefault()); - EXPECT_TRUE(mVibrator->on(duration, nullptr).isOk()); -} - -TEST_F(VibratorTest, off) { - Sequence s1; - EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE)).InSequence(s1).WillOnce(DoDefault()); - EXPECT_TRUE(mVibrator->off().isOk()); -} - -TEST_F(VibratorTest, supportsAmplitudeControl_supported) { - int32_t capabilities; - EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(true)); - - EXPECT_TRUE(mVibrator->getCapabilities(&capabilities).isOk()); - EXPECT_GT(capabilities & IVibrator::CAP_AMPLITUDE_CONTROL, 0); -} - -TEST_F(VibratorTest, supportsExternalAmplitudeControl_unsupported) { - int32_t capabilities; - EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(true)); - - EXPECT_TRUE(mVibrator->getCapabilities(&capabilities).isOk()); - EXPECT_EQ(capabilities & IVibrator::CAP_EXTERNAL_AMPLITUDE_CONTROL, 0); -} - -TEST_F(VibratorTest, setAmplitude_supported) { - EffectAmplitude amplitude = static_cast(std::rand()) / RAND_MAX ?: 1.0f; - - EXPECT_CALL(*mMockApi, setFFGain(_, amplitudeToScale(amplitude))).WillOnce(Return(true)); - - EXPECT_TRUE(mVibrator->setAmplitude(amplitude).isOk()); -} - -TEST_F(VibratorTest, supportsExternalControl_supported) { - int32_t capabilities; - EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(true)); - - EXPECT_TRUE(mVibrator->getCapabilities(&capabilities).isOk()); - EXPECT_GT(capabilities & IVibrator::CAP_EXTERNAL_CONTROL, 0); -} - -TEST_F(VibratorTest, supportsExternalControl_unsupported) { - int32_t capabilities; - EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(false)); - - EXPECT_TRUE(mVibrator->getCapabilities(&capabilities).isOk()); - EXPECT_EQ(capabilities & IVibrator::CAP_EXTERNAL_CONTROL, 0); -} - -TEST_F(VibratorTest, setExternalControl_enable) { - Sequence s1, s2; - EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE)).InSequence(s1).WillOnce(DoDefault()); - EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).InSequence(s2).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, setHapticPcmAmp(_, true, _, _)) - .InSequence(s1, s2) - .WillOnce(Return(true)); - - EXPECT_TRUE(mVibrator->setExternalControl(true).isOk()); -} - -TEST_F(VibratorTest, setExternalControl_disable) { - Sequence s1, s2, s3, s4; - - // The default mIsUnderExternalControl is false, so it needs to turn on the External Control - // to make mIsUnderExternalControl become true. - EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE)) - .InSequence(s1) - .InSequence(s1) - .WillOnce(DoDefault()); - EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).InSequence(s2).WillOnce(Return(true)); - EXPECT_CALL(*mMockApi, setHapticPcmAmp(_, true, _, _)).InSequence(s3).WillOnce(Return(true)); - - EXPECT_TRUE(mVibrator->setExternalControl(true).isOk()); - - EXPECT_CALL(*mMockApi, setFFGain(_, levelToScale(VOLTAGE_SCALE_MAX))) - .InSequence(s4) - .WillOnce(DoDefault()); - EXPECT_CALL(*mMockApi, setHapticPcmAmp(_, false, _, _)) - .InSequence(s1, s2, s3, s4) - .WillOnce(Return(true)); - - EXPECT_TRUE(mVibrator->setExternalControl(false).isOk()); -} - -class EffectsTest : public VibratorTest, public WithParamInterface { - public: - static auto PrintParam(const TestParamInfo &info) { - auto param = info.param; - auto effect = std::get<0>(param); - auto strength = std::get<1>(param); - return toString(effect) + "_" + toString(strength); - } -}; - -TEST_P(EffectsTest, perform) { - auto param = GetParam(); - auto effect = std::get<0>(param); - auto strength = std::get<1>(param); - auto scale = EFFECT_SCALE.find(param); - auto queue = EFFECT_QUEUE.find(param); - EffectDuration duration; - auto callback = ndk::SharedRefBase::make(); - std::promise promise; - std::future future{promise.get_future()}; - auto complete = [&promise] { - promise.set_value(); - return ndk::ScopedAStatus::ok(); - }; - bool composeEffect; - - ExpectationSet eSetup; - Expectation eActivate, ePollHaptics, ePollStop, eEraseDone; - - if (scale != EFFECT_SCALE.end()) { - EffectIndex index = EFFECT_INDEX.at(effect); - duration = EFFECT_DURATIONS[index]; - - eSetup += EXPECT_CALL(*mMockApi, setFFGain(_, levelToScale(scale->second))) - .WillOnce(DoDefault()); - eActivate = EXPECT_CALL(*mMockApi, setFFPlay(_, index, true)) - .After(eSetup) - .WillOnce(DoDefault()); - } else if (queue != EFFECT_QUEUE.end()) { - duration = std::get<1>(queue->second); - eSetup += EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE)) - .After(eSetup) - .WillOnce(DoDefault()); - eSetup += EXPECT_CALL(*mMockApi, getOwtFreeSpace(_)).WillOnce(DoDefault()); - eSetup += EXPECT_CALL(*mMockApi, uploadOwtEffect(_, _, _, _, _, _)) - .After(eSetup) - .WillOnce(DoDefault()); - eActivate = EXPECT_CALL(*mMockApi, setFFPlay(_, WAVEFORM_COMPOSE, true)) - .After(eSetup) - .WillOnce(DoDefault()); - composeEffect = true; - } else { - duration = 0; - } - - if (duration) { - ePollHaptics = EXPECT_CALL(*mMockApi, pollVibeState(1, POLLING_TIMEOUT)) - .After(eActivate) - .WillOnce(DoDefault()); - ePollStop = EXPECT_CALL(*mMockApi, pollVibeState(0, -1)) - .After(ePollHaptics) - .WillOnce(DoDefault()); - if (composeEffect) { - eEraseDone = EXPECT_CALL(*mMockApi, eraseOwtEffect(_, _, _)) - .After(ePollStop) - .WillOnce(DoDefault()); - EXPECT_CALL(*callback, onComplete()).After(eEraseDone).WillOnce(complete); - } else { - EXPECT_CALL(*callback, onComplete()).After(ePollStop).WillOnce(complete); - } - } - - int32_t lengthMs; - ndk::ScopedAStatus status = mVibrator->perform(effect, strength, callback, &lengthMs); - if (status.isOk()) { - EXPECT_LE(duration, lengthMs); - } else { - EXPECT_EQ(EX_UNSUPPORTED_OPERATION, status.getExceptionCode()); - EXPECT_EQ(0, lengthMs); - } - - if (duration) { - EXPECT_EQ(future.wait_for(std::chrono::milliseconds(100)), std::future_status::ready); - } -} - -const std::vector kEffects{ndk::enum_range().begin(), - ndk::enum_range().end()}; -const std::vector kEffectStrengths{ndk::enum_range().begin(), - ndk::enum_range().end()}; - -INSTANTIATE_TEST_CASE_P(VibratorTests, EffectsTest, - Combine(ValuesIn(kEffects.begin(), kEffects.end()), - ValuesIn(kEffectStrengths.begin(), kEffectStrengths.end())), - EffectsTest::PrintParam); - -struct PrimitiveParam { - CompositePrimitive primitive; - EffectIndex index; -}; - -class PrimitiveTest : public VibratorTest, public WithParamInterface { - public: - static auto PrintParam(const TestParamInfo &info) { - return toString(info.param.primitive); - } -}; - -const std::vector kPrimitiveParams = { - {CompositePrimitive::CLICK, 2}, {CompositePrimitive::THUD, 4}, - {CompositePrimitive::SPIN, 5}, {CompositePrimitive::QUICK_RISE, 6}, - {CompositePrimitive::SLOW_RISE, 7}, {CompositePrimitive::QUICK_FALL, 8}, - {CompositePrimitive::LIGHT_TICK, 9}, {CompositePrimitive::LOW_TICK, 10}, -}; - -TEST_P(PrimitiveTest, getPrimitiveDuration) { - auto param = GetParam(); - auto primitive = param.primitive; - auto index = param.index; - int32_t duration; - - EXPECT_EQ(EX_NONE, mVibrator->getPrimitiveDuration(primitive, &duration).getExceptionCode()); - EXPECT_EQ(EFFECT_DURATIONS[index], duration); -} - -INSTANTIATE_TEST_CASE_P(VibratorTests, PrimitiveTest, - ValuesIn(kPrimitiveParams.begin(), kPrimitiveParams.end()), - PrimitiveTest::PrintParam); - -struct ComposeParam { - std::string name; - std::vector composite; - EffectQueue queue; -}; - -class ComposeTest : public VibratorTest, public WithParamInterface { - public: - static auto PrintParam(const TestParamInfo &info) { return info.param.name; } -}; - -TEST_P(ComposeTest, compose) { - auto param = GetParam(); - auto composite = param.composite; - auto queue = std::get<0>(param.queue); - ExpectationSet eSetup; - Expectation eActivate, ePollHaptics, ePollStop, eEraseDone; - auto callback = ndk::SharedRefBase::make(); - std::promise promise; - std::future future{promise.get_future()}; - auto complete = [&promise] { - promise.set_value(); - return ndk::ScopedAStatus::ok(); - }; - - eSetup += EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE)) - .After(eSetup) - .WillOnce(DoDefault()); - eSetup += EXPECT_CALL(*mMockApi, getOwtFreeSpace(_)).WillOnce(DoDefault()); - eSetup += EXPECT_CALL(*mMockApi, uploadOwtEffect(_, _, _, _, _, _)) - .After(eSetup) - .WillOnce(DoDefault()); - eActivate = EXPECT_CALL(*mMockApi, setFFPlay(_, WAVEFORM_COMPOSE, true)) - .After(eSetup) - .WillOnce(DoDefault()); - - ePollHaptics = EXPECT_CALL(*mMockApi, pollVibeState(1, POLLING_TIMEOUT)) - .After(eActivate) - .WillOnce(DoDefault()); - ePollStop = - EXPECT_CALL(*mMockApi, pollVibeState(0, -1)).After(ePollHaptics).WillOnce(DoDefault()); - eEraseDone = - EXPECT_CALL(*mMockApi, eraseOwtEffect(_, _, _)).After(ePollStop).WillOnce(DoDefault()); - EXPECT_CALL(*callback, onComplete()).After(eEraseDone).WillOnce(complete); - - EXPECT_EQ(EX_NONE, mVibrator->compose(composite, callback).getExceptionCode()); - - EXPECT_EQ(future.wait_for(std::chrono::milliseconds(100)), std::future_status::ready); -} - -const std::vector kComposeParams = { - {"click", - {{0, CompositePrimitive::CLICK, 1.0f}}, - Queue(QueueEffect(2, Level(1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)}, - {"thud", - {{1, CompositePrimitive::THUD, 0.8f}}, - Queue(1, QueueEffect(4, Level(0.8f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)}, - {"spin", - {{2, CompositePrimitive::SPIN, 0.6f}}, - Queue(2, QueueEffect(5, Level(0.6f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)}, - {"quick_rise", - {{3, CompositePrimitive::QUICK_RISE, 0.4f}}, - Queue(3, QueueEffect(6, Level(0.4f, V_LONG_DEFAULT[0], V_LONG_DEFAULT[1])), 0)}, - {"slow_rise", - {{4, CompositePrimitive::SLOW_RISE, 0.0f}}, - Queue(4, QueueEffect(7, Level(0.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)}, - {"quick_fall", - {{5, CompositePrimitive::QUICK_FALL, 1.0f}}, - Queue(5, QueueEffect(8, Level(1.0f, V_LONG_DEFAULT[0], V_LONG_DEFAULT[1])), 0)}, - {"pop", - {{6, CompositePrimitive::SLOW_RISE, 1.0f}, {50, CompositePrimitive::THUD, 1.0f}}, - Queue(6, QueueEffect(7, Level(1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 50, - QueueEffect(4, Level(1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)}, - {"snap", - {{7, CompositePrimitive::QUICK_RISE, 1.0f}, {0, CompositePrimitive::QUICK_FALL, 1.0f}}, - Queue(7, QueueEffect(6, Level(1.0f, V_LONG_DEFAULT[0], V_LONG_DEFAULT[1])), - QueueEffect(8, Level(1.0f, V_LONG_DEFAULT[0], V_LONG_DEFAULT[1])), 0)}, -}; - -INSTANTIATE_TEST_CASE_P(VibratorTests, ComposeTest, - ValuesIn(kComposeParams.begin(), kComposeParams.end()), - ComposeTest::PrintParam); -} // namespace vibrator -} // namespace hardware -} // namespace android -} // namespace aidl diff --git a/vibrator/cs40l26/tests/types.h b/vibrator/cs40l26/tests/types.h deleted file mode 100644 index e05c648..0000000 --- a/vibrator/cs40l26/tests/types.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef ANDROID_HARDWARE_VIBRATOR_TEST_TYPES_H -#define ANDROID_HARDWARE_VIBRATOR_TEST_TYPES_H - -#include - -using EffectIndex = uint16_t; -using EffectLevel = uint32_t; -using EffectAmplitude = float; -using EffectScale = uint16_t; -using EffectDuration = uint32_t; -using EffectQueue = std::tuple; -using EffectTuple = std::tuple<::aidl::android::hardware::vibrator::Effect, - ::aidl::android::hardware::vibrator::EffectStrength>; - -using QueueEffect = std::tuple; -using QueueDelay = uint32_t; - -#endif // ANDROID_HARDWARE_VIBRATOR_TEST_TYPES_H diff --git a/vibrator/cs40l26/tests/utils.h b/vibrator/cs40l26/tests/utils.h deleted file mode 100644 index e7f6055..0000000 --- a/vibrator/cs40l26/tests/utils.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2022 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef ANDROID_HARDWARE_VIBRATOR_TEST_UTILS_H -#define ANDROID_HARDWARE_VIBRATOR_TEST_UTILS_H - -#include - -#include "types.h" - -static inline EffectScale toScale(float amplitude, float maximum) { - float ratio = 100; /* Unit: % */ - if (maximum != 0) - ratio = amplitude / maximum * 100; - - if (maximum == 0 || ratio > 100) - ratio = 100; - - return std::round(ratio); -} - -static inline EffectScale levelToScale(EffectLevel level) { - return toScale(level, 100); -} - -static inline EffectScale amplitudeToScale(EffectAmplitude amplitude) { - return toScale(amplitude, 1.0f); -} - -static inline uint32_t msToCycles(EffectDuration ms) { - return ms * 48; -} - -#endif // ANDROID_HARDWARE_VIBRATOR_TEST_UTILS_H -- cgit v1.2.3 From 4985b917cfb5e3452848365984de891db4fbde8e Mon Sep 17 00:00:00 2001 From: Kris Chen Date: Tue, 21 Feb 2023 15:39:18 +0800 Subject: Remove the redundant g7 ta loading in init.xxx.rc Bug: 264646112 Test: fingerprint works fine after device reboot Change-Id: Ic91d6290d8215bf9f4239c520bd609f27312c7a3 --- conf/init.lynx.rc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index 6071e31..1ff60a1 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -38,10 +38,6 @@ on property:vendor.mfgapi.touchpanel.permission=1 chmod 0600 /sys/devices/virtual/sec/tsp/cmd chown system system /sys/devices/virtual/sec/tsp/cmd -# Fingerprint -on post-fs-data - exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g7.app - # SecureElement eSE2 cts mode on property:persist.vendor.se.ese2.mode=ctsmode write /sys/class/st33spi/st33spi/st33spi_state 33 -- cgit v1.2.3 From c3a27cae536ad0d61e662d0429b04f5055e443da Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Wed, 22 Feb 2023 21:51:50 +0800 Subject: haptics: update hapitcs sink and slot setting Bug: 270023634 Test: trigger audio coupled haptics via sound picker app Change-Id: If61728014fa990d10b552d2a5001aa12082901d3 --- audio/lynx/config/mixer_paths.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/lynx/config/mixer_paths.xml b/audio/lynx/config/mixer_paths.xml index 45df0f8..db18303 100644 --- a/audio/lynx/config/mixer_paths.xml +++ b/audio/lynx/config/mixer_paths.xml @@ -42,7 +42,7 @@ - + -- cgit v1.2.3 From 643cbacd03fb4db4d36af2951d433c288a05b073 Mon Sep 17 00:00:00 2001 From: Kai Shi Date: Thu, 23 Feb 2023 11:17:31 -0800 Subject: Enable country code update during setup wizard Bug: 267944733 Test: manual with various network Change-Id: Ic1590430754a057ac6992011c6ec722f7d326e57 --- rro_overlays/WifiOverlay/res/values/config.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml index 1019ddb..afb99c6 100644 --- a/rro_overlays/WifiOverlay/res/values/config.xml +++ b/rro_overlays/WifiOverlay/res/values/config.xml @@ -141,4 +141,9 @@ true + + + true -- cgit v1.2.3 From 4a90c40de243033a9676a960f6fd6a283442e56c Mon Sep 17 00:00:00 2001 From: Jasmine Cha Date: Fri, 24 Feb 2023 16:24:44 +0800 Subject: audio: create aidl config for testing. Test: build pass Bug: 206738075 Change-Id: I262b1ff42e0b86db5e677def19dca87eccc64ade Signed-off-by: Jasmine Cha --- audio/lynx/aidl_config/audio_effects.xml | 68 ++ .../aidl_config/audio_platform_configuration.xml | 319 +++++++ .../audio_platform_configuration_aidl.xml | 189 ++++ .../aidl_config/audio_policy_configuration.xml | 168 ++++ ..._policy_configuration_a2dp_offload_disabled.xml | 239 +++++ ...o_policy_configuration_bluetooth_legacy_hal.xml | 235 +++++ ...io_policy_configuration_le_offload_disabled.xml | 260 ++++++ audio/lynx/aidl_config/audio_policy_volumes.xml | 227 +++++ ...ooth_with_le_audio_policy_configuration_7_0.xml | 71 ++ audio/lynx/aidl_config/mixer_paths.xml | 889 +++++++++++++++++++ audio/lynx/aidl_config/mixer_paths_aidl.xml | 978 +++++++++++++++++++++ audio/lynx/aidl_config/mixer_paths_factory.xml | 388 ++++++++ .../aidl_config/sound_trigger_configuration.xml | 33 + audio/lynx/audio-tables.mk | 30 +- 14 files changed, 4085 insertions(+), 9 deletions(-) create mode 100644 audio/lynx/aidl_config/audio_effects.xml create mode 100644 audio/lynx/aidl_config/audio_platform_configuration.xml create mode 100644 audio/lynx/aidl_config/audio_platform_configuration_aidl.xml create mode 100644 audio/lynx/aidl_config/audio_policy_configuration.xml create mode 100644 audio/lynx/aidl_config/audio_policy_configuration_a2dp_offload_disabled.xml create mode 100644 audio/lynx/aidl_config/audio_policy_configuration_bluetooth_legacy_hal.xml create mode 100644 audio/lynx/aidl_config/audio_policy_configuration_le_offload_disabled.xml create mode 100644 audio/lynx/aidl_config/audio_policy_volumes.xml create mode 100644 audio/lynx/aidl_config/bluetooth_with_le_audio_policy_configuration_7_0.xml create mode 100644 audio/lynx/aidl_config/mixer_paths.xml create mode 100644 audio/lynx/aidl_config/mixer_paths_aidl.xml create mode 100644 audio/lynx/aidl_config/mixer_paths_factory.xml create mode 100644 audio/lynx/aidl_config/sound_trigger_configuration.xml diff --git a/audio/lynx/aidl_config/audio_effects.xml b/audio/lynx/aidl_config/audio_effects.xml new file mode 100644 index 0000000..11e66e5 --- /dev/null +++ b/audio/lynx/aidl_config/audio_effects.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/audio_platform_configuration.xml b/audio/lynx/aidl_config/audio_platform_configuration.xml new file mode 100644 index 0000000..84ee3a5 --- /dev/null +++ b/audio/lynx/aidl_config/audio_platform_configuration.xml @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml b/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml new file mode 100644 index 0000000..eef3e87 --- /dev/null +++ b/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/audio_policy_configuration.xml b/audio/lynx/aidl_config/audio_policy_configuration.xml new file mode 100644 index 0000000..121c3fe --- /dev/null +++ b/audio/lynx/aidl_config/audio_policy_configuration.xml @@ -0,0 +1,168 @@ + + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/lynx/aidl_config/audio_policy_configuration_a2dp_offload_disabled.xml new file mode 100644 index 0000000..f5c129f --- /dev/null +++ b/audio/lynx/aidl_config/audio_policy_configuration_a2dp_offload_disabled.xml @@ -0,0 +1,239 @@ + + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/audio_policy_configuration_bluetooth_legacy_hal.xml b/audio/lynx/aidl_config/audio_policy_configuration_bluetooth_legacy_hal.xml new file mode 100644 index 0000000..92d97af --- /dev/null +++ b/audio/lynx/aidl_config/audio_policy_configuration_bluetooth_legacy_hal.xml @@ -0,0 +1,235 @@ + + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/audio_policy_configuration_le_offload_disabled.xml b/audio/lynx/aidl_config/audio_policy_configuration_le_offload_disabled.xml new file mode 100644 index 0000000..7cf76e6 --- /dev/null +++ b/audio/lynx/aidl_config/audio_policy_configuration_le_offload_disabled.xml @@ -0,0 +1,260 @@ + + + + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/audio_policy_volumes.xml b/audio/lynx/aidl_config/audio_policy_volumes.xml new file mode 100644 index 0000000..04e731d --- /dev/null +++ b/audio/lynx/aidl_config/audio_policy_volumes.xml @@ -0,0 +1,227 @@ + + + + + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + 1,-4700 + 33,-3500 + 66,-2350 + 100,-1250 + + + + + + + 1,-3350 + 33,-2100 + 66,-1000 + 100,0 + + + + + + + + + + + + 0,-4800 + 33,-2050 + 66,-800 + 100,0 + + + + + + + 1,-3800 + 33,-2600 + 66,-1400 + 100,0 + + + + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + 0,-2400 + 33,-1600 + 66,-800 + 100,0 + + + 0,-4200 + 33,-2800 + 66,-1400 + 100,0 + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + 1,-4700 + 33,-3500 + 66,-2350 + 100,-1250 + + + + + + 1,-3000 + 33,-2600 + 66,-2200 + 100,-1800 + + + 1,-5500 + 33,-3650 + 66,-2700 + 100,-1800 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/bluetooth_with_le_audio_policy_configuration_7_0.xml b/audio/lynx/aidl_config/bluetooth_with_le_audio_policy_configuration_7_0.xml new file mode 100644 index 0000000..8b2af59 --- /dev/null +++ b/audio/lynx/aidl_config/bluetooth_with_le_audio_policy_configuration_7_0.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/audio/lynx/aidl_config/mixer_paths.xml b/audio/lynx/aidl_config/mixer_paths.xml new file mode 100644 index 0000000..153f117 --- /dev/null +++ b/audio/lynx/aidl_config/mixer_paths.xml @@ -0,0 +1,889 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/mixer_paths_aidl.xml b/audio/lynx/aidl_config/mixer_paths_aidl.xml new file mode 100644 index 0000000..502ca17 --- /dev/null +++ b/audio/lynx/aidl_config/mixer_paths_aidl.xml @@ -0,0 +1,978 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/mixer_paths_factory.xml b/audio/lynx/aidl_config/mixer_paths_factory.xml new file mode 100644 index 0000000..4dfc826 --- /dev/null +++ b/audio/lynx/aidl_config/mixer_paths_factory.xml @@ -0,0 +1,388 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/sound_trigger_configuration.xml b/audio/lynx/aidl_config/sound_trigger_configuration.xml new file mode 100644 index 0000000..dbee090 --- /dev/null +++ b/audio/lynx/aidl_config/sound_trigger_configuration.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/audio-tables.mk b/audio/lynx/audio-tables.mk index 812dbce..d5e0276 100644 --- a/audio/lynx/audio-tables.mk +++ b/audio/lynx/audio-tables.mk @@ -16,24 +16,36 @@ AUDIO_TABLE_FOLDER := lynx +# Enable this to build AIDL +# BUILD_AUDIO_AIDL_VERSION := true + +ifeq ($(BUILD_AUDIO_AIDL_VERSION),true) +CONFIG_FOLDER := aidl_config +PRODUCT_COPY_FILES += \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/mixer_paths_aidl.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_aidl.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_platform_configuration_aidl.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration_aidl.xml +else +CONFIG_FOLDER := config +endif + # Platform Configuration for AudioHAL / SoundTriggerHAL PRODUCT_COPY_FILES += \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.xml \ frameworks/av/services/audiopolicy/config/bluetooth_with_le_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml # AudioEffectHAL Configuration PRODUCT_COPY_FILES += \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml # Mixer Path Configuration for AudioHAL PRODUCT_COPY_FILES += \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml # Speaker firmware files SPK_FIRMWARE_PATH := $(AUDIO_TABLE_FOLDER)/cs35l41/fw -- cgit v1.2.3 From add8872c72a68e0f669b65e962af166b15f2c68f Mon Sep 17 00:00:00 2001 From: Rios Kao Date: Wed, 1 Mar 2023 06:37:51 +0000 Subject: soundtrigger: aidl table for L10 Test: verify with test build. Bug: 206738138 Change-Id: I3ab4c1e66d1739f8e65cdb0df460fc5bb31828f1 --- audio/lynx/aidl_config/audio_policy_configuration.xml | 6 ++++++ audio/lynx/aidl_config/mixer_paths_aidl.xml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/audio/lynx/aidl_config/audio_policy_configuration.xml b/audio/lynx/aidl_config/audio_policy_configuration.xml index 121c3fe..941c9f0 100644 --- a/audio/lynx/aidl_config/audio_policy_configuration.xml +++ b/audio/lynx/aidl_config/audio_policy_configuration.xml @@ -71,6 +71,11 @@ samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/> + + + @@ -157,6 +162,7 @@ + diff --git a/audio/lynx/aidl_config/mixer_paths_aidl.xml b/audio/lynx/aidl_config/mixer_paths_aidl.xml index 502ca17..aab517f 100644 --- a/audio/lynx/aidl_config/mixer_paths_aidl.xml +++ b/audio/lynx/aidl_config/mixer_paths_aidl.xml @@ -587,6 +587,9 @@ + + + -- cgit v1.2.3 From bb31c3775bbb30807dc59338cefa56eff6141b71 Mon Sep 17 00:00:00 2001 From: Patty Huang Date: Wed, 1 Mar 2023 11:37:15 +0800 Subject: Enable LE Audio unicast by default on android U Bug: 265225257 Test: LE Audio unicast related services are all enabled by default Change-Id: Iec837ebd864699874e2d84a732275fcc0d1c5f97 --- bluetooth/qti_default.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bluetooth/qti_default.mk b/bluetooth/qti_default.mk index 07df727..4fbe425 100644 --- a/bluetooth/qti_default.mk +++ b/bluetooth/qti_default.mk @@ -24,10 +24,15 @@ PRODUCT_PRODUCT_PROPERTIES += \ # Bluetooth LE Audio PRODUCT_PRODUCT_PROPERTIES += \ ro.bluetooth.leaudio_switcher.supported=true \ - ro.bluetooth.leaudio_broadcast_switcher.supported=true \ ro.bluetooth.leaudio_offload.supported=true \ persist.bluetooth.leaudio_offload.disabled=false \ ro.vendor.audio_hal.ble_use_stream_id=true \ + bluetooth.profile.bap.unicast.client.enabled=true \ + bluetooth.profile.csip.set_coordinator.enabled=true \ + bluetooth.profile.hap.client.enabled=true \ + bluetooth.profile.mcp.server.enabled=true \ + bluetooth.profile.ccp.server.enabled=true \ + bluetooth.profile.vcp.controller.enabled=true \ # Bluetooth LE Audio CIS handover to SCO # Set the property only if the controller doesn't support CIS and SCO -- cgit v1.2.3 From 2fa5c5525adee09a973b96b6d137decb79a9f7d8 Mon Sep 17 00:00:00 2001 From: Jeff Pu Date: Thu, 2 Mar 2023 21:40:50 +0000 Subject: Remove fingerprint virtual hal from individual pixel device mk files since it is included in common one Bug: 270940857 Test: manual build Change-Id: Ib93975ce0eaaa64284b7e45789752821e927fc40 --- device-lynx.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/device-lynx.mk b/device-lynx.mk index fecef7a..c814db5 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -272,10 +272,6 @@ PRODUCT_PACKAGES += \ SettingsOverlayGHL1X \ SettingsOverlayGWKK3 -# Biometrics virtual HAL for e2e testing -PRODUCT_PACKAGES_DEBUG += \ - android.hardware.biometrics.fingerprint-service.example - # Setup Wizard device-specific settings PRODUCT_PRODUCT_PROPERTIES += \ setupwizard.feature.enable_quick_start_flow_for_debug=true \ -- cgit v1.2.3 From ea74506c5e9ca3853d90b569a340e73a4ba820a7 Mon Sep 17 00:00:00 2001 From: Jimmy Shiu Date: Wed, 22 Feb 2023 20:27:49 +0800 Subject: powerhint: Boost GPU(302000) by 1st frame Take ADPF_FIRST_FRAME hint to boost the GPU freq to 302000 Bug: 243025173 Test: Manual Change-Id: I840c7f1c1c8347ba71b9139ea3615669c9294071 --- powerhint.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/powerhint.json b/powerhint.json index 2678f75..8dc8832 100644 --- a/powerhint.json +++ b/powerhint.json @@ -1508,6 +1508,12 @@ "Duration": 0, "Value": "572000" }, + { + "PowerHint": "ADPF_FIRST_FRAME", + "Node": "GPUMinFreq", + "Duration": 50, + "Value": "302000" + }, { "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_LIGHT", "Node": "PMU_POLL", -- cgit v1.2.3 From d2ce2adf78382bb0435684b7e324c21a4d7f68ca Mon Sep 17 00:00:00 2001 From: pointerkung Date: Fri, 3 Mar 2023 17:26:46 +0800 Subject: Camera: Force front camera always binning for 720P or less Bug: 271241073 Test: Build pass Change-Id: Ic0588ddfd3c60e37c197b977decdfb24742b44b3 --- device-lynx.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index c814db5..6c6ff25 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -246,6 +246,10 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_VENDOR_PROPERTIES += \ persist.vendor.camera.exif_reveal_make_model=true +# Enable front camera always binning for 720P or smaller resolution +PRODUCT_VENDOR_PROPERTIES += \ + persist.vendor.camera.front_720P_always_binning=true + # Device features PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml -- cgit v1.2.3 From 608f8ceaf14f3887becd0532777c92a14de894c8 Mon Sep 17 00:00:00 2001 From: David Li Date: Wed, 1 Mar 2023 21:52:38 +0800 Subject: audio: add compressed offload to the AIDL audio_policy_configuration.xml Bug: 270552159 Test: n/a Change-Id: Ia0b57de95b72b17d16fe6cad4917cfdd559cafbc --- audio/lynx/aidl_config/audio_policy_configuration.xml | 19 +++++++++++++++++-- audio/lynx/aidl_config/mixer_paths_aidl.xml | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/audio/lynx/aidl_config/audio_policy_configuration.xml b/audio/lynx/aidl_config/audio_policy_configuration.xml index 941c9f0..af824c3 100644 --- a/audio/lynx/aidl_config/audio_policy_configuration.xml +++ b/audio/lynx/aidl_config/audio_policy_configuration.xml @@ -36,6 +36,21 @@ + + + + + + + sources="primary output,deep buffer,haptic,voip_rx,compressed offload"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed offload"/> - + -- cgit v1.2.3 From c715c9d8e6f0b4a398cb392578bc5b8fcefbbdcb Mon Sep 17 00:00:00 2001 From: George Chang Date: Thu, 9 Mar 2023 08:17:13 +0000 Subject: [NFC] Add antenna position coordinates Bug: 272406680 Test: manual Change-Id: I5c8aade77b86199e6e1bbb56cd8f6dab957a174a --- lynx/overlay/packages/apps/Nfc/res/values/config.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lynx/overlay/packages/apps/Nfc/res/values/config.xml b/lynx/overlay/packages/apps/Nfc/res/values/config.xml index 8c96d35..4a8efa9 100644 --- a/lynx/overlay/packages/apps/Nfc/res/values/config.xml +++ b/lynx/overlay/packages/apps/Nfc/res/values/config.xml @@ -22,4 +22,14 @@ G82U8 true + + 70 + 150 + false + + 36 + + + 102 + -- cgit v1.2.3 From 4e31e5eeb3fb18a1abb682988b2d65cff07e677c Mon Sep 17 00:00:00 2001 From: Chris Paulo Date: Tue, 14 Feb 2023 21:38:44 +0000 Subject: device/lynx: Add adaptive haptics feature flag Add adaptive haptics feature flag to device-lynx.mk to enable feature in vibrator HAL. Bug: 198239103 Test: Verified on device Change-Id: I2fee6f06bfff33b7044516a4022b16bd76a4beb5 Signed-off-by: Chris Paulo --- device-lynx.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device-lynx.mk b/device-lynx.mk index 30e2c00..30b3adc 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -152,6 +152,7 @@ include device/google/gs101/fingerprint/udfps_factory.mk endif # Vibrator HAL +ADAPTIVE_HAPTICS_FEATURE := adaptive_haptics_v1 PRODUCT_VENDOR_PROPERTIES += \ ro.vendor.vibrator.hal.supported_primitives=243 \ ro.vendor.vibrator.hal.f0.comp.enabled=1 \ -- cgit v1.2.3 From bcf427acd65fbe13783b401cff2cc462e2ac2b90 Mon Sep 17 00:00:00 2001 From: Gaurav Sarode Date: Tue, 21 Mar 2023 13:57:11 -0700 Subject: Lynx: Fix configs for google_car varient Fixed screen density and bt configs for google_car target bug: 273813426 Test: Local check Change-Id: I292a071d6325121f884634d0661c8467a2635fe7 --- bluetooth/qti_default.mk | 12 ++++++------ lynx/BoardConfig.mk | 9 ++++++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bluetooth/qti_default.mk b/bluetooth/qti_default.mk index 4fbe425..5158663 100644 --- a/bluetooth/qti_default.mk +++ b/bluetooth/qti_default.mk @@ -27,12 +27,12 @@ PRODUCT_PRODUCT_PROPERTIES += \ ro.bluetooth.leaudio_offload.supported=true \ persist.bluetooth.leaudio_offload.disabled=false \ ro.vendor.audio_hal.ble_use_stream_id=true \ - bluetooth.profile.bap.unicast.client.enabled=true \ - bluetooth.profile.csip.set_coordinator.enabled=true \ - bluetooth.profile.hap.client.enabled=true \ - bluetooth.profile.mcp.server.enabled=true \ - bluetooth.profile.ccp.server.enabled=true \ - bluetooth.profile.vcp.controller.enabled=true \ + bluetooth.profile.bap.unicast.client.enabled?=true \ + bluetooth.profile.csip.set_coordinator.enabled?=true \ + bluetooth.profile.hap.client.enabled?=true \ + bluetooth.profile.mcp.server.enabled?=true \ + bluetooth.profile.ccp.server.enabled?=true \ + bluetooth.profile.vcp.controller.enabled?=true \ # Bluetooth LE Audio CIS handover to SCO # Set the property only if the controller doesn't support CIS and SCO diff --git a/lynx/BoardConfig.mk b/lynx/BoardConfig.mk index b955068..ca5006a 100644 --- a/lynx/BoardConfig.mk +++ b/lynx/BoardConfig.mk @@ -13,9 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. # + TARGET_BOARD_INFO_FILE := device/google/lynx/board-info.txt TARGET_BOOTLOADER_BOARD_NAME := lynx -TARGET_SCREEN_DENSITY := 420 + +ifdef PHONE_CAR_BOARD_PRODUCT + include vendor/auto/embedded/products/$(PHONE_CAR_BOARD_PRODUCT)/BoardConfig.mk +else + TARGET_SCREEN_DENSITY := 420 +endif + BOARD_USES_GENERIC_AUDIO := true USES_DEVICE_GOOGLE_LYNX := true -- cgit v1.2.3 From b7c340d98f2d0f9b9893e4d6ada094cd344ab81c Mon Sep 17 00:00:00 2001 From: David Li Date: Fri, 24 Mar 2023 21:56:39 +0800 Subject: audio: reorg aidl_config and add voice call paths Bug: 206737711 Test: mm Change-Id: I9cc66ec5d35dd4e8df2981bb4205671fa926ab0c --- audio/lynx/aidl_config/audio_effects.xml | 68 -- .../aidl_config/audio_platform_configuration.xml | 319 -------- .../audio_platform_configuration_aidl.xml | 196 +---- .../aidl_config/audio_policy_configuration.xml | 364 +++++---- ..._policy_configuration_a2dp_offload_disabled.xml | 239 ------ ...o_policy_configuration_bluetooth_legacy_hal.xml | 235 ------ ...io_policy_configuration_le_offload_disabled.xml | 260 ------ ...ooth_with_le_audio_policy_configuration_7_0.xml | 71 -- audio/lynx/aidl_config/mixer_paths.xml | 889 --------------------- audio/lynx/aidl_config/mixer_paths_aidl.xml | 267 ++----- audio/lynx/aidl_config/mixer_paths_factory.xml | 388 --------- .../aidl_config/sound_trigger_configuration.xml | 33 - audio/lynx/audio-tables.mk | 29 +- 13 files changed, 311 insertions(+), 3047 deletions(-) delete mode 100644 audio/lynx/aidl_config/audio_effects.xml delete mode 100644 audio/lynx/aidl_config/audio_platform_configuration.xml delete mode 100644 audio/lynx/aidl_config/audio_policy_configuration_a2dp_offload_disabled.xml delete mode 100644 audio/lynx/aidl_config/audio_policy_configuration_bluetooth_legacy_hal.xml delete mode 100644 audio/lynx/aidl_config/audio_policy_configuration_le_offload_disabled.xml delete mode 100644 audio/lynx/aidl_config/bluetooth_with_le_audio_policy_configuration_7_0.xml delete mode 100644 audio/lynx/aidl_config/mixer_paths.xml delete mode 100644 audio/lynx/aidl_config/mixer_paths_factory.xml delete mode 100644 audio/lynx/aidl_config/sound_trigger_configuration.xml diff --git a/audio/lynx/aidl_config/audio_effects.xml b/audio/lynx/aidl_config/audio_effects.xml deleted file mode 100644 index 11e66e5..0000000 --- a/audio/lynx/aidl_config/audio_effects.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/audio/lynx/aidl_config/audio_platform_configuration.xml b/audio/lynx/aidl_config/audio_platform_configuration.xml deleted file mode 100644 index 84ee3a5..0000000 --- a/audio/lynx/aidl_config/audio_platform_configuration.xml +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml b/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml index eef3e87..c1739fd 100644 --- a/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml +++ b/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml @@ -25,165 +25,47 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/audio/lynx/aidl_config/audio_policy_configuration.xml b/audio/lynx/aidl_config/audio_policy_configuration.xml index af824c3..dfc8577 100644 --- a/audio/lynx/aidl_config/audio_policy_configuration.xml +++ b/audio/lynx/aidl_config/audio_policy_configuration.xml @@ -11,179 +11,193 @@ limitations under the License. --> - - - - - - Speaker - Speaker Safe - Earpiece - Built-In Mic - Built-In Back Mic - Telephony Tx - Voice Call And Telephony Rx - Echo Ref In - - Speaker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + Speaker + Speaker Safe + Earpiece + Built-In Mic + Built-In Back Mic + Telephony Tx + Voice Call And Telephony Rx + Echo Ref In + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/lynx/aidl_config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/lynx/aidl_config/audio_policy_configuration_a2dp_offload_disabled.xml deleted file mode 100644 index f5c129f..0000000 --- a/audio/lynx/aidl_config/audio_policy_configuration_a2dp_offload_disabled.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - - Speaker - Speaker Safe - Earpiece - Built-In Mic - Built-In Back Mic - Telephony Tx - Voice Call And Telephony Rx - Echo Ref In - - Speaker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/audio/lynx/aidl_config/audio_policy_configuration_bluetooth_legacy_hal.xml b/audio/lynx/aidl_config/audio_policy_configuration_bluetooth_legacy_hal.xml deleted file mode 100644 index 92d97af..0000000 --- a/audio/lynx/aidl_config/audio_policy_configuration_bluetooth_legacy_hal.xml +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - Speaker - Speaker Safe - Earpiece - Built-In Mic - Built-In Back Mic - Telephony Tx - Voice Call And Telephony Rx - Echo Ref In - - Speaker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/audio/lynx/aidl_config/audio_policy_configuration_le_offload_disabled.xml b/audio/lynx/aidl_config/audio_policy_configuration_le_offload_disabled.xml deleted file mode 100644 index 7cf76e6..0000000 --- a/audio/lynx/aidl_config/audio_policy_configuration_le_offload_disabled.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - Speaker - Speaker Safe - Earpiece - Built-In Mic - Built-In Back Mic - Telephony Tx - Voice Call And Telephony Rx - Echo Ref In - - Speaker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/audio/lynx/aidl_config/bluetooth_with_le_audio_policy_configuration_7_0.xml b/audio/lynx/aidl_config/bluetooth_with_le_audio_policy_configuration_7_0.xml deleted file mode 100644 index 8b2af59..0000000 --- a/audio/lynx/aidl_config/bluetooth_with_le_audio_policy_configuration_7_0.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/audio/lynx/aidl_config/mixer_paths.xml b/audio/lynx/aidl_config/mixer_paths.xml deleted file mode 100644 index 153f117..0000000 --- a/audio/lynx/aidl_config/mixer_paths.xml +++ /dev/null @@ -1,889 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/audio/lynx/aidl_config/mixer_paths_aidl.xml b/audio/lynx/aidl_config/mixer_paths_aidl.xml index 260cda6..17c4660 100644 --- a/audio/lynx/aidl_config/mixer_paths_aidl.xml +++ b/audio/lynx/aidl_config/mixer_paths_aidl.xml @@ -378,7 +378,7 @@ - + @@ -425,15 +425,13 @@ - - - + @@ -457,7 +455,7 @@ - + @@ -480,15 +478,12 @@ - - - - + - + @@ -512,7 +507,7 @@ - + @@ -536,8 +531,8 @@ - - + + @@ -553,13 +548,13 @@ - - + + - - + + @@ -571,6 +566,10 @@ + + + + @@ -579,31 +578,31 @@ - - + + - - + + - + + - - + + - - + + - - + + - - + @@ -615,53 +614,35 @@ - - - - - - - - - - - - - - - + - + - + - - + + - + - + - + - - - - - + @@ -669,55 +650,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - + - + - + @@ -736,12 +681,6 @@ - - - - - - @@ -758,12 +697,10 @@ - + - - - @@ -772,77 +709,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + @@ -851,17 +747,16 @@ - - - - - - - - + + + + + + + + - @@ -869,9 +764,6 @@ - - - @@ -881,9 +773,6 @@ - - - @@ -895,9 +784,6 @@ - - - @@ -907,9 +793,6 @@ - - - @@ -919,9 +802,6 @@ - - - @@ -931,9 +811,6 @@ - - - @@ -944,9 +821,6 @@ - - - @@ -957,9 +831,6 @@ - - - diff --git a/audio/lynx/aidl_config/mixer_paths_factory.xml b/audio/lynx/aidl_config/mixer_paths_factory.xml deleted file mode 100644 index 4dfc826..0000000 --- a/audio/lynx/aidl_config/mixer_paths_factory.xml +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/audio/lynx/aidl_config/sound_trigger_configuration.xml b/audio/lynx/aidl_config/sound_trigger_configuration.xml deleted file mode 100644 index dbee090..0000000 --- a/audio/lynx/aidl_config/sound_trigger_configuration.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/audio/lynx/audio-tables.mk b/audio/lynx/audio-tables.mk index d5e0276..9e4d530 100644 --- a/audio/lynx/audio-tables.mk +++ b/audio/lynx/audio-tables.mk @@ -20,32 +20,31 @@ AUDIO_TABLE_FOLDER := lynx # BUILD_AUDIO_AIDL_VERSION := true ifeq ($(BUILD_AUDIO_AIDL_VERSION),true) -CONFIG_FOLDER := aidl_config PRODUCT_COPY_FILES += \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/mixer_paths_aidl.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_aidl.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_platform_configuration_aidl.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration_aidl.xml + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/aidl_config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/aidl_config/audio_platform_configuration_aidl.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration_aidl.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/aidl_config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/aidl_config/mixer_paths_aidl.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_aidl.xml else -CONFIG_FOLDER := config -endif - # Platform Configuration for AudioHAL / SoundTriggerHAL PRODUCT_COPY_FILES += \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_le_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_le_offload_disabled.xml \ frameworks/av/services/audiopolicy/config/bluetooth_with_le_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml # AudioEffectHAL Configuration PRODUCT_COPY_FILES += \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml # Mixer Path Configuration for AudioHAL PRODUCT_COPY_FILES += \ - device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/$(CONFIG_FOLDER)/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/config/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml +endif # Speaker firmware files SPK_FIRMWARE_PATH := $(AUDIO_TABLE_FOLDER)/cs35l41/fw -- cgit v1.2.3 From d131389e6bd5c202ad2324b2e4991e9903dc3e46 Mon Sep 17 00:00:00 2001 From: Liang Li Date: Mon, 13 Mar 2023 21:45:42 -0700 Subject: Enable adjusting link layer stats polling interval Enable the feature of adjusting link layer stats polling interval in Pixels. Bug: 237530606 Test: manual Change-Id: Ifb10f95d08e6e0b7223b9a1214b576b5a331a341 --- rro_overlays/WifiOverlay/res/values/config.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml index afb99c6..d864206 100644 --- a/rro_overlays/WifiOverlay/res/values/config.xml +++ b/rro_overlays/WifiOverlay/res/values/config.xml @@ -146,4 +146,8 @@ no telephony country code and driver country code is 00. This is applied only during the setup wizard --> true + + + true -- cgit v1.2.3 From 4581323719b3bbdd08f0835a7cf0ab397ad899a9 Mon Sep 17 00:00:00 2001 From: millerliang Date: Fri, 24 Feb 2023 20:22:07 +0800 Subject: audio:enable mmap and raw on BT AoC can support mmap on BT both playback and recording after gpar/322484. Bug: 232205959 Test: OboeTester Change-Id: I3f8eb8e83d95a1fb60e8f4c3ecc5ab442035aac7 Signed-off-by: millerliang --- audio/lynx/config/audio_policy_configuration.xml | 22 +++++++++++----------- ..._policy_configuration_a2dp_offload_disabled.xml | 10 +++++----- ...o_policy_configuration_bluetooth_legacy_hal.xml | 10 +++++----- ...io_policy_configuration_le_offload_disabled.xml | 16 ++++++++-------- audio/lynx/config/mixer_paths.xml | 17 +++++++++++++++++ 5 files changed, 46 insertions(+), 29 deletions(-) diff --git a/audio/lynx/config/audio_policy_configuration.xml b/audio/lynx/config/audio_policy_configuration.xml index 82bad3c..527b603 100644 --- a/audio/lynx/config/audio_policy_configuration.xml +++ b/audio/lynx/config/audio_policy_configuration.xml @@ -209,27 +209,27 @@ + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> @@ -240,9 +240,9 @@ + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic,BLE Headset Mic"/> diff --git a/audio/lynx/config/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/lynx/config/audio_policy_configuration_a2dp_offload_disabled.xml index 2f1812c..5c80141 100644 --- a/audio/lynx/config/audio_policy_configuration_a2dp_offload_disabled.xml +++ b/audio/lynx/config/audio_policy_configuration_a2dp_offload_disabled.xml @@ -181,11 +181,11 @@ + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> @@ -196,9 +196,9 @@ + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> diff --git a/audio/lynx/config/audio_policy_configuration_bluetooth_legacy_hal.xml b/audio/lynx/config/audio_policy_configuration_bluetooth_legacy_hal.xml index ce3be39..5ef0148 100644 --- a/audio/lynx/config/audio_policy_configuration_bluetooth_legacy_hal.xml +++ b/audio/lynx/config/audio_policy_configuration_bluetooth_legacy_hal.xml @@ -181,11 +181,11 @@ + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,voip_rx,compressed_offload,raw,mmap_no_irq_out"/> @@ -196,9 +196,9 @@ + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> diff --git a/audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml b/audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml index 9ec5992..846282e 100644 --- a/audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml +++ b/audio/lynx/config/audio_policy_configuration_le_offload_disabled.xml @@ -196,21 +196,21 @@ + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,immersive_out,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out"/> + sources="primary output,deep buffer,haptic,compressed_offload,voip_rx,raw,mmap_no_irq_out"/> @@ -221,9 +221,9 @@ + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> + sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/> diff --git a/audio/lynx/config/mixer_paths.xml b/audio/lynx/config/mixer_paths.xml index db18303..3f37f7a 100644 --- a/audio/lynx/config/mixer_paths.xml +++ b/audio/lynx/config/mixer_paths.xml @@ -162,6 +162,7 @@ + @@ -396,6 +397,10 @@ + + + + @@ -410,6 +415,10 @@ + + + + @@ -596,6 +605,10 @@ + + + + @@ -604,6 +617,10 @@ + + + + > -- cgit v1.2.3 From 237551895e15c2a32aa4bf89c31c303b16f54711 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Thu, 30 Mar 2023 14:35:11 +0800 Subject: create a wlan dump Bug: 22338832 Test: adb bugreport Change-Id: I78b81d5bf9f0646581de2a9df081ed657ad4a83f --- device-lynx.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device-lynx.mk b/device-lynx.mk index 7c9b576..5c8264a 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -30,6 +30,7 @@ include device/google/lynx/audio/lynx/audio-tables.mk include device/google/gs201/device-shipping-common.mk include hardware/google/pixel/vibrator/cs40l26/device.mk include device/google/gs-common/touch/gti/gti.mk +include device/google/gs-common/wlan/dump.mk # go/lyric-soong-variables $(call soong_config_set,lyric,camera_hardware,lynx) -- cgit v1.2.3 From 0fd4f57cff1a5a1171ec427496813400f8913eae Mon Sep 17 00:00:00 2001 From: Cyril Lee Date: Thu, 13 Apr 2023 10:02:12 +0000 Subject: [Quickstart] Turn off QS on legacy Pixels Bug: 277898824 Change-Id: I1b60c0e67be94d988df515876ec763b1bc08bb7a Test: manually test --- device-lynx.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/device-lynx.mk b/device-lynx.mk index 57e78fe..1ca11cd 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -278,8 +278,3 @@ PRODUCT_PACKAGES += \ SettingsOverlayG0DZQ \ SettingsOverlayGHL1X \ SettingsOverlayGWKK3 - -# Setup Wizard device-specific settings -PRODUCT_PRODUCT_PROPERTIES += \ - setupwizard.feature.enable_quick_start_flow_for_debug=true \ - -- cgit v1.2.3 From 6edfcfbcc81922ab7ce370fe289d6398381c8ce0 Mon Sep 17 00:00:00 2001 From: Cyril Lee Date: Fri, 14 Apr 2023 01:13:36 +0000 Subject: Revert "[Quickstart] Turn off QS on legacy Pixels" Revert submission 22606975-turn off qs Reason for revert: confirm with team that this CL submit too early and need to rollback then submit again at 4/19. Reverted changes: /q/submissionid:22606975-turn+off+qs Change-Id: Ib39c027b1b2fcf78ef68c0ecfdd2d0f6d774fdbd --- device-lynx.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index 1ca11cd..57e78fe 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -278,3 +278,8 @@ PRODUCT_PACKAGES += \ SettingsOverlayG0DZQ \ SettingsOverlayGHL1X \ SettingsOverlayGWKK3 + +# Setup Wizard device-specific settings +PRODUCT_PRODUCT_PROPERTIES += \ + setupwizard.feature.enable_quick_start_flow_for_debug=true \ + -- cgit v1.2.3 From a834cefdf13c2ced34b4bb54e909cbd7d69109b0 Mon Sep 17 00:00:00 2001 From: Shuibing Dai Date: Thu, 13 Apr 2023 17:25:13 -0700 Subject: Enable updating country code from scan results for generic case Bug: 271928725 Bug: 267944733 Test: manually test Change-Id: I6250533dc0d061a304d7640b3a548bbbb779e611 --- rro_overlays/WifiOverlay/res/values/config.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml index d864206..40f165f 100644 --- a/rro_overlays/WifiOverlay/res/values/config.xml +++ b/rro_overlays/WifiOverlay/res/values/config.xml @@ -150,4 +150,10 @@ true + + + true -- cgit v1.2.3 From 1c6bf15dfd6ee19bf6ac43367028accdcb2cc4c7 Mon Sep 17 00:00:00 2001 From: Jasmine Cha Date: Fri, 14 Apr 2023 14:13:25 +0800 Subject: audio: update table - move control Mic Spatial Module Enable to code. - add camcorder mic setting. - move definition of Waves instance id number to code. Bug: 206738075 Test: manual test/ host test vendor.google.whitechapel.audio.hal.audio.tuner_tests Change-Id: I795402e8c460b01a148ba9e3b032143fddacd3cb Signed-off-by: Jasmine Cha --- .../aidl_config/audio_platform_configuration_aidl.xml | 5 ++--- audio/lynx/aidl_config/mixer_paths_aidl.xml | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml b/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml index c1739fd..bc050e3 100644 --- a/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml +++ b/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml @@ -63,9 +63,8 @@ - - + + diff --git a/audio/lynx/aidl_config/mixer_paths_aidl.xml b/audio/lynx/aidl_config/mixer_paths_aidl.xml index 17c4660..894ef4e 100644 --- a/audio/lynx/aidl_config/mixer_paths_aidl.xml +++ b/audio/lynx/aidl_config/mixer_paths_aidl.xml @@ -254,7 +254,6 @@ - @@ -738,7 +737,6 @@ - @@ -757,8 +755,20 @@ + + + + + + + + + + + + + - -- cgit v1.2.3 From 407fc5eff535251b6fc97f52c3d084183a1946ef Mon Sep 17 00:00:00 2001 From: Poomarin Phloyphisut Date: Tue, 18 Apr 2023 13:04:13 +0000 Subject: [USB Audio] Enable 192k support sample rate to hifi usb related cl: ag/22549253 Test: Local Test. Bug: 198122814 Change-Id: I43e2ca3f17bd5e39f400dd86b33a7230db9574f5 --- audio/lynx/config/audio_platform_configuration.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/lynx/config/audio_platform_configuration.xml b/audio/lynx/config/audio_platform_configuration.xml index 1a3aba5..5443432 100644 --- a/audio/lynx/config/audio_platform_configuration.xml +++ b/audio/lynx/config/audio_platform_configuration.xml @@ -286,7 +286,7 @@ - + -- cgit v1.2.3 From 228e03b34d82d38abbf3e61ed88fa6585b924dde Mon Sep 17 00:00:00 2001 From: Cyril Lee Date: Tue, 18 Apr 2023 09:30:46 +0000 Subject: Revert^2 "[Quickstart] Turn off QS on legacy Pixels" 6edfcfbcc81922ab7ce370fe289d6398381c8ce0 Change-Id: Iebe3f7c73e20919f963bf58362e8f36ae6c1869d --- device-lynx.mk | 5 ----- 1 file changed, 5 deletions(-) diff --git a/device-lynx.mk b/device-lynx.mk index 57e78fe..1ca11cd 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -278,8 +278,3 @@ PRODUCT_PACKAGES += \ SettingsOverlayG0DZQ \ SettingsOverlayGHL1X \ SettingsOverlayGWKK3 - -# Setup Wizard device-specific settings -PRODUCT_PRODUCT_PROPERTIES += \ - setupwizard.feature.enable_quick_start_flow_for_debug=true \ - -- cgit v1.2.3 From b55d0a79335fd8413194c79f283458129f17e602 Mon Sep 17 00:00:00 2001 From: Jimmy Shiu Date: Wed, 12 Apr 2023 20:26:19 +0800 Subject: powerhint: Boost GPU(302000) by 1st frame Take ADPF_FIRST_FRAME hint to boost the GPU freq to 302000 Bug: 243025173 Test: Manual Change-Id: If9265845c3497e64f9fe944a24061ca21cbedd82 --- powerhint.json | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/powerhint.json b/powerhint.json index 8dc8832..127c21e 100644 --- a/powerhint.json +++ b/powerhint.json @@ -1,5 +1,18 @@ { "Nodes": [ + { + "Name": "GPUMinFreq", + "Path": "/sys/devices/platform/28000000.mali/hint_min_freq", + "Values": [ + "848000", + "762000", + "572000", + "471000", + "302000", + "202000" + ], + "ResetOnInit": true + }, { "Name": "MemFreq", "Path": "/sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/min_freq", @@ -104,19 +117,6 @@ ], "ResetOnInit": true }, - { - "Name": "GPUMinFreq", - "Path": "/sys/devices/platform/28000000.mali/hint_min_freq", - "Values": [ - "848000", - "762000", - "572000", - "471000", - "302000", - "202000" - ], - "ResetOnInit": true - }, { "Name": "ReducePreferIdle", "Path": "/proc/vendor_sched/reduce_prefer_idle", @@ -721,6 +721,12 @@ "Duration": 2000, "Value": "9999999" }, + { + "PowerHint": "CPU_LOAD_RESET", + "Node": "GPUMinFreq", + "Duration": 50, + "Value": "302000" + }, { "PowerHint": "CPU_LOAD_RESET", "Node": "MemFreq", @@ -1508,12 +1514,6 @@ "Duration": 0, "Value": "572000" }, - { - "PowerHint": "ADPF_FIRST_FRAME", - "Node": "GPUMinFreq", - "Duration": 50, - "Value": "302000" - }, { "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_LIGHT", "Node": "PMU_POLL", -- cgit v1.2.3 From 4ad1706d86b7dba56a31c5f9f230bd071b20ddd7 Mon Sep 17 00:00:00 2001 From: Patty Huang Date: Tue, 11 Apr 2023 19:32:59 +0800 Subject: Enable 32k audio config for LE Audio with condition Align the setting with other projects that only enable 32k audio config with condition * Remove the 32k support for two devices * Remove the 32k for encode only Bug: 271247229 Bug: 272597112 Test: Check the offload supported config Change-Id: I669dee84bec323437c8dbb0e45a675ac98c0d809 --- bluetooth/le_audio_codec_capabilities.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bluetooth/le_audio_codec_capabilities.xml b/bluetooth/le_audio_codec_capabilities.xml index 575e89d..d4404a8 100644 --- a/bluetooth/le_audio_codec_capabilities.xml +++ b/bluetooth/le_audio_codec_capabilities.xml @@ -32,9 +32,6 @@ - - - @@ -47,8 +44,6 @@ - - @@ -67,7 +62,6 @@ - -- cgit v1.2.3 From 404e87d2c5543c6941ba01994a101581409fa569 Mon Sep 17 00:00:00 2001 From: Jasmine Cha Date: Fri, 21 Apr 2023 10:17:07 +0800 Subject: audio: update aidl platform config - Add spatial_capture_conditions since this conditions will be different by each project. Bug: 267548143 Test: manual test Change-Id: I177e2179071570ba6a8ab713ea55f0f0b340ec72 Signed-off-by: Jasmine Cha --- audio/lynx/aidl_config/audio_platform_configuration_aidl.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml b/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml index bc050e3..912b4aa 100644 --- a/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml +++ b/audio/lynx/aidl_config/audio_platform_configuration_aidl.xml @@ -61,6 +61,12 @@ + + + + + + -- cgit v1.2.3 From b76dfb70ecacd7b9ad673e07325b722453defb6b Mon Sep 17 00:00:00 2001 From: Yung Ti Su Date: Tue, 18 Apr 2023 16:13:32 +0800 Subject: audio: Phase in fortemedia tuning tables Change List : Fortemedia: Handheld : Optimize long distance speech preserve on HHWB Sync TX setting to - Condor-Headphone/ TTY-VCO / BT-HAC (WB) Files from the latest attachment on b/278661101 Bug: 278661101 Test: verified by ntkuo@ Change-Id: I47764bbc65204339b9258d7dfbfab3e312a1f4bb --- audio/lynx/tuning/fortemedia/BLUETOOTH.dat | Bin 276978 -> 276978 bytes audio/lynx/tuning/fortemedia/BLUETOOTH.mods | 46 +++++++------- audio/lynx/tuning/fortemedia/HANDSFREE.dat | Bin 117198 -> 117198 bytes audio/lynx/tuning/fortemedia/HANDSFREE.mods | 40 ++++++------- audio/lynx/tuning/fortemedia/HEADSET.dat | Bin 426106 -> 426106 bytes audio/lynx/tuning/fortemedia/HEADSET.mods | 90 ++++++++++++++-------------- 6 files changed, 88 insertions(+), 88 deletions(-) diff --git a/audio/lynx/tuning/fortemedia/BLUETOOTH.dat b/audio/lynx/tuning/fortemedia/BLUETOOTH.dat index 93eeb03..4c24529 100644 Binary files a/audio/lynx/tuning/fortemedia/BLUETOOTH.dat and b/audio/lynx/tuning/fortemedia/BLUETOOTH.dat differ diff --git a/audio/lynx/tuning/fortemedia/BLUETOOTH.mods b/audio/lynx/tuning/fortemedia/BLUETOOTH.mods index 13ab499..06401da 100644 --- a/audio/lynx/tuning/fortemedia/BLUETOOTH.mods +++ b/audio/lynx/tuning/fortemedia/BLUETOOTH.mods @@ -1,7 +1,7 @@ #PLATFORM_NAME gChip #EXPORT_FLAG BLUETOOTH #SINGLE_API_VER 1.2.1 -#SAVE_TIME 2023-03-22 15:50:15 +#SAVE_TIME 2023-04-18 16:05:27 #CASE_NAME BLUETOOTH-BT_HAC-VOICE_GENERIC-NB #PARAM_MODE FULL @@ -2680,7 +2680,7 @@ #TX 0 0x0001 //TX_OPERATION_MODE_0 1 0x0001 //TX_OPERATION_MODE_1 -2 0x0073 //TX_PATCH_REG +2 0x00F3 //TX_PATCH_REG 3 0x6F7D //TX_SENDFUNC_MODE_0 4 0x0000 //TX_SENDFUNC_MODE_1 5 0x0002 //TX_NUM_MIC @@ -2875,10 +2875,10 @@ 194 0x0000 //TX_NORMENERTH 195 0x0000 //TX_NORMENERHIGHTH 196 0x0000 //TX_NORMENERHIGHTHL -197 0x7FF0 //TX_DTD_THR1_0 -198 0x7FF0 //TX_DTD_THR1_1 +197 0x7333 //TX_DTD_THR1_0 +198 0x7333 //TX_DTD_THR1_1 199 0x7FF0 //TX_DTD_THR1_2 -200 0x6D60 //TX_DTD_THR1_3 +200 0x7FF0 //TX_DTD_THR1_3 201 0x7FF0 //TX_DTD_THR1_4 202 0x7FF0 //TX_DTD_THR1_5 203 0x7FF0 //TX_DTD_THR1_6 @@ -2922,7 +2922,7 @@ 241 0x0000 //TX_DT_RESRV_9 242 0xF800 //TX_THR_SN_EST_0 243 0xFA00 //TX_THR_SN_EST_1 -244 0xFA00 //TX_THR_SN_EST_2 +244 0xFC00 //TX_THR_SN_EST_2 245 0xF200 //TX_THR_SN_EST_3 246 0xFA00 //TX_THR_SN_EST_4 247 0xFA00 //TX_THR_SN_EST_5 @@ -2931,7 +2931,7 @@ 250 0x0100 //TX_DELTA_THR_SN_EST_0 251 0x0100 //TX_DELTA_THR_SN_EST_1 252 0x0200 //TX_DELTA_THR_SN_EST_2 -253 0x0100 //TX_DELTA_THR_SN_EST_3 +253 0x0400 //TX_DELTA_THR_SN_EST_3 254 0x0100 //TX_DELTA_THR_SN_EST_4 255 0x0200 //TX_DELTA_THR_SN_EST_5 256 0x0200 //TX_DELTA_THR_SN_EST_6 @@ -2968,20 +2968,20 @@ 287 0x0014 //TX_NS_LVL_CTRL_6 288 0x0011 //TX_NS_LVL_CTRL_7 289 0x000F //TX_MIN_GAIN_S_0 -290 0x0010 //TX_MIN_GAIN_S_1 +290 0x0020 //TX_MIN_GAIN_S_1 291 0x0010 //TX_MIN_GAIN_S_2 292 0x0010 //TX_MIN_GAIN_S_3 293 0x0010 //TX_MIN_GAIN_S_4 294 0x0010 //TX_MIN_GAIN_S_5 295 0x0010 //TX_MIN_GAIN_S_6 296 0x000F //TX_MIN_GAIN_S_7 -297 0x6000 //TX_NMOS_SUP +297 0x2000 //TX_NMOS_SUP 298 0x0000 //TX_NS_MAX_PRI_SNR_TH 299 0x0000 //TX_NMOS_SUP_MENSA -300 0x7FFF //TX_SNRI_SUP_0 +300 0x4000 //TX_SNRI_SUP_0 301 0x2000 //TX_SNRI_SUP_1 302 0x2000 //TX_SNRI_SUP_2 -303 0x4000 //TX_SNRI_SUP_3 +303 0x2000 //TX_SNRI_SUP_3 304 0x4000 //TX_SNRI_SUP_4 305 0x50C0 //TX_SNRI_SUP_5 306 0x2000 //TX_SNRI_SUP_6 @@ -2995,15 +2995,15 @@ 314 0x5000 //TX_A_POST_FILT_S_0 315 0x4C00 //TX_A_POST_FILT_S_1 316 0x4000 //TX_A_POST_FILT_S_2 -317 0x2000 //TX_A_POST_FILT_S_3 +317 0x6000 //TX_A_POST_FILT_S_3 318 0x4000 //TX_A_POST_FILT_S_4 319 0x5000 //TX_A_POST_FILT_S_5 320 0x6000 //TX_A_POST_FILT_S_6 321 0x7000 //TX_A_POST_FILT_S_7 322 0x2000 //TX_B_POST_FILT_0 -323 0x2000 //TX_B_POST_FILT_1 +323 0x4000 //TX_B_POST_FILT_1 324 0x2000 //TX_B_POST_FILT_2 -325 0x2000 //TX_B_POST_FILT_3 +325 0x7FFF //TX_B_POST_FILT_3 326 0x4000 //TX_B_POST_FILT_4 327 0x1000 //TX_B_POST_FILT_5 328 0x1000 //TX_B_POST_FILT_6 @@ -3018,9 +3018,9 @@ 337 0x7FFF //TX_B_LESSCUT_RTO_S_7 338 0x7C00 //TX_LAMBDA_PFILT 339 0x7C00 //TX_LAMBDA_PFILT_S_0 -340 0x7C00 //TX_LAMBDA_PFILT_S_1 -341 0x7A00 //TX_LAMBDA_PFILT_S_2 -342 0x7800 //TX_LAMBDA_PFILT_S_3 +340 0x7E00 //TX_LAMBDA_PFILT_S_1 +341 0x7E00 //TX_LAMBDA_PFILT_S_2 +342 0x7D00 //TX_LAMBDA_PFILT_S_3 343 0x7C00 //TX_LAMBDA_PFILT_S_4 344 0x7C00 //TX_LAMBDA_PFILT_S_5 345 0x7C00 //TX_LAMBDA_PFILT_S_6 @@ -3045,12 +3045,12 @@ 364 0x0000 //TX_K_APT 365 0x0001 //TX_NOISEDET 366 0x0064 //TX_NDETCT -367 0x0032 //TX_NOISE_TH_0 +367 0x001E //TX_NOISE_TH_0 368 0x7FFF //TX_NOISE_TH_0_2 369 0x7FFF //TX_NOISE_TH_0_3 370 0x0320 //TX_NOISE_TH_1 -371 0x0230 //TX_NOISE_TH_2 -372 0x2CEC //TX_NOISE_TH_3 +371 0x0384 //TX_NOISE_TH_2 +372 0x2904 //TX_NOISE_TH_3 373 0x3E80 //TX_NOISE_TH_4 374 0x7FFF //TX_NOISE_TH_5 375 0x7FFF //TX_NOISE_TH_5_2 @@ -3084,7 +3084,7 @@ 403 0x4000 //TX_POST_MASK_SUP 404 0x7FFF //TX_POST_MASK_ADJUST 405 0x00C8 //TX_NS_ENOISE_MIC0_TH -406 0x0033 //TX_MINENOISE_MIC0_TH +406 0x001E //TX_MINENOISE_MIC0_TH 407 0x012C //TX_MINENOISE_MIC0_S_TH 408 0x7FFF //TX_MIN_G_CTRL_SSNS 409 0x0000 //TX_METAL_RTO_THR @@ -3622,8 +3622,8 @@ 941 0x0008 //TX_MIC1MUTE_CVG_TIME 942 0x0008 //TX_MIC1MUTE_RELEASE_TIME 943 0x0100 //TX_AMS_RESRV_01 -944 0xE4A8 //TX_AMS_RESRV_02 -945 0x7EF4 //TX_AMS_RESRV_03 +944 0xE0C0 //TX_AMS_RESRV_02 +945 0x2710 //TX_AMS_RESRV_03 946 0x0000 //TX_AMS_RESRV_04 947 0x0000 //TX_AMS_RESRV_05 948 0x0000 //TX_AMS_RESRV_06 diff --git a/audio/lynx/tuning/fortemedia/HANDSFREE.dat b/audio/lynx/tuning/fortemedia/HANDSFREE.dat index 9d15e8e..f6f5afb 100644 Binary files a/audio/lynx/tuning/fortemedia/HANDSFREE.dat and b/audio/lynx/tuning/fortemedia/HANDSFREE.dat differ diff --git a/audio/lynx/tuning/fortemedia/HANDSFREE.mods b/audio/lynx/tuning/fortemedia/HANDSFREE.mods index 39c21d1..dc42412 100644 --- a/audio/lynx/tuning/fortemedia/HANDSFREE.mods +++ b/audio/lynx/tuning/fortemedia/HANDSFREE.mods @@ -1,7 +1,7 @@ #PLATFORM_NAME gChip #EXPORT_FLAG HANDSFREE #SINGLE_API_VER 1.2.1 -#SAVE_TIME 2023-03-22 15:41:43 +#SAVE_TIME 2023-04-18 16:04:40 #CASE_NAME HANDSFREE-HANDSFREE-VOICE_GENERIC-NB #PARAM_MODE FULL @@ -2680,7 +2680,7 @@ #TX 0 0x0001 //TX_OPERATION_MODE_0 1 0x0001 //TX_OPERATION_MODE_1 -2 0x0073 //TX_PATCH_REG +2 0x00F3 //TX_PATCH_REG 3 0x6F7D //TX_SENDFUNC_MODE_0 4 0x0000 //TX_SENDFUNC_MODE_1 5 0x0002 //TX_NUM_MIC @@ -2875,8 +2875,8 @@ 194 0x0000 //TX_NORMENERTH 195 0x0000 //TX_NORMENERHIGHTH 196 0x0000 //TX_NORMENERHIGHTHL -197 0x7FD5 //TX_DTD_THR1_0 -198 0x7EF4 //TX_DTD_THR1_1 +197 0x7333 //TX_DTD_THR1_0 +198 0x7333 //TX_DTD_THR1_1 199 0x7FF0 //TX_DTD_THR1_2 200 0x7FF0 //TX_DTD_THR1_3 201 0x7FF0 //TX_DTD_THR1_4 @@ -2922,7 +2922,7 @@ 241 0x0000 //TX_DT_RESRV_9 242 0xF800 //TX_THR_SN_EST_0 243 0xFA00 //TX_THR_SN_EST_1 -244 0xFA00 //TX_THR_SN_EST_2 +244 0xFC00 //TX_THR_SN_EST_2 245 0xF200 //TX_THR_SN_EST_3 246 0xFA00 //TX_THR_SN_EST_4 247 0xFA00 //TX_THR_SN_EST_5 @@ -2931,7 +2931,7 @@ 250 0x0100 //TX_DELTA_THR_SN_EST_0 251 0x0100 //TX_DELTA_THR_SN_EST_1 252 0x0200 //TX_DELTA_THR_SN_EST_2 -253 0x0100 //TX_DELTA_THR_SN_EST_3 +253 0x0400 //TX_DELTA_THR_SN_EST_3 254 0x0100 //TX_DELTA_THR_SN_EST_4 255 0x0200 //TX_DELTA_THR_SN_EST_5 256 0x0200 //TX_DELTA_THR_SN_EST_6 @@ -2968,20 +2968,20 @@ 287 0x0014 //TX_NS_LVL_CTRL_6 288 0x0011 //TX_NS_LVL_CTRL_7 289 0x000F //TX_MIN_GAIN_S_0 -290 0x0010 //TX_MIN_GAIN_S_1 +290 0x0020 //TX_MIN_GAIN_S_1 291 0x0010 //TX_MIN_GAIN_S_2 292 0x0010 //TX_MIN_GAIN_S_3 293 0x0010 //TX_MIN_GAIN_S_4 294 0x0010 //TX_MIN_GAIN_S_5 295 0x0010 //TX_MIN_GAIN_S_6 296 0x000F //TX_MIN_GAIN_S_7 -297 0x6000 //TX_NMOS_SUP +297 0x2000 //TX_NMOS_SUP 298 0x0000 //TX_NS_MAX_PRI_SNR_TH 299 0x0000 //TX_NMOS_SUP_MENSA -300 0x7FFF //TX_SNRI_SUP_0 +300 0x4000 //TX_SNRI_SUP_0 301 0x2000 //TX_SNRI_SUP_1 302 0x2000 //TX_SNRI_SUP_2 -303 0x4000 //TX_SNRI_SUP_3 +303 0x2000 //TX_SNRI_SUP_3 304 0x4000 //TX_SNRI_SUP_4 305 0x50C0 //TX_SNRI_SUP_5 306 0x2000 //TX_SNRI_SUP_6 @@ -2995,15 +2995,15 @@ 314 0x5000 //TX_A_POST_FILT_S_0 315 0x4C00 //TX_A_POST_FILT_S_1 316 0x4000 //TX_A_POST_FILT_S_2 -317 0x2000 //TX_A_POST_FILT_S_3 +317 0x6000 //TX_A_POST_FILT_S_3 318 0x4000 //TX_A_POST_FILT_S_4 319 0x5000 //TX_A_POST_FILT_S_5 320 0x6000 //TX_A_POST_FILT_S_6 321 0x7000 //TX_A_POST_FILT_S_7 322 0x2000 //TX_B_POST_FILT_0 -323 0x2000 //TX_B_POST_FILT_1 +323 0x4000 //TX_B_POST_FILT_1 324 0x2000 //TX_B_POST_FILT_2 -325 0x2000 //TX_B_POST_FILT_3 +325 0x7FFF //TX_B_POST_FILT_3 326 0x4000 //TX_B_POST_FILT_4 327 0x1000 //TX_B_POST_FILT_5 328 0x1000 //TX_B_POST_FILT_6 @@ -3018,9 +3018,9 @@ 337 0x7FFF //TX_B_LESSCUT_RTO_S_7 338 0x7C00 //TX_LAMBDA_PFILT 339 0x7C00 //TX_LAMBDA_PFILT_S_0 -340 0x7C00 //TX_LAMBDA_PFILT_S_1 -341 0x7A00 //TX_LAMBDA_PFILT_S_2 -342 0x7800 //TX_LAMBDA_PFILT_S_3 +340 0x7E00 //TX_LAMBDA_PFILT_S_1 +341 0x7E00 //TX_LAMBDA_PFILT_S_2 +342 0x7D00 //TX_LAMBDA_PFILT_S_3 343 0x7C00 //TX_LAMBDA_PFILT_S_4 344 0x7C00 //TX_LAMBDA_PFILT_S_5 345 0x7C00 //TX_LAMBDA_PFILT_S_6 @@ -3045,12 +3045,12 @@ 364 0x0000 //TX_K_APT 365 0x0001 //TX_NOISEDET 366 0x0064 //TX_NDETCT -367 0x0032 //TX_NOISE_TH_0 +367 0x001E //TX_NOISE_TH_0 368 0x7FFF //TX_NOISE_TH_0_2 369 0x7FFF //TX_NOISE_TH_0_3 370 0x0320 //TX_NOISE_TH_1 -371 0x0230 //TX_NOISE_TH_2 -372 0x2CEC //TX_NOISE_TH_3 +371 0x0384 //TX_NOISE_TH_2 +372 0x2904 //TX_NOISE_TH_3 373 0x3E80 //TX_NOISE_TH_4 374 0x7FFF //TX_NOISE_TH_5 375 0x7FFF //TX_NOISE_TH_5_2 @@ -3084,7 +3084,7 @@ 403 0x4000 //TX_POST_MASK_SUP 404 0x7FFF //TX_POST_MASK_ADJUST 405 0x00C8 //TX_NS_ENOISE_MIC0_TH -406 0x0033 //TX_MINENOISE_MIC0_TH +406 0x001E //TX_MINENOISE_MIC0_TH 407 0x012C //TX_MINENOISE_MIC0_S_TH 408 0x7FFF //TX_MIN_G_CTRL_SSNS 409 0x0000 //TX_METAL_RTO_THR diff --git a/audio/lynx/tuning/fortemedia/HEADSET.dat b/audio/lynx/tuning/fortemedia/HEADSET.dat index 3f64c37..5ff7a8e 100644 Binary files a/audio/lynx/tuning/fortemedia/HEADSET.dat and b/audio/lynx/tuning/fortemedia/HEADSET.dat differ diff --git a/audio/lynx/tuning/fortemedia/HEADSET.mods b/audio/lynx/tuning/fortemedia/HEADSET.mods index b953e9e..7ce97f0 100644 --- a/audio/lynx/tuning/fortemedia/HEADSET.mods +++ b/audio/lynx/tuning/fortemedia/HEADSET.mods @@ -1,7 +1,7 @@ #PLATFORM_NAME gChip #EXPORT_FLAG HEADSET #SINGLE_API_VER 1.2.1 -#SAVE_TIME 2023-03-22 15:50:48 +#SAVE_TIME 2023-04-18 16:05:05 #CASE_NAME HEADSET-USB_BLACKBIRD-VOICE_GENERIC-NB #PARAM_MODE FULL @@ -29380,7 +29380,7 @@ #TX 0 0x0001 //TX_OPERATION_MODE_0 1 0x0001 //TX_OPERATION_MODE_1 -2 0x0073 //TX_PATCH_REG +2 0x00F3 //TX_PATCH_REG 3 0x6F7D //TX_SENDFUNC_MODE_0 4 0x0000 //TX_SENDFUNC_MODE_1 5 0x0002 //TX_NUM_MIC @@ -29575,10 +29575,10 @@ 194 0x0000 //TX_NORMENERTH 195 0x0000 //TX_NORMENERHIGHTH 196 0x0000 //TX_NORMENERHIGHTHL -197 0x7FF0 //TX_DTD_THR1_0 -198 0x7FF0 //TX_DTD_THR1_1 +197 0x7333 //TX_DTD_THR1_0 +198 0x7333 //TX_DTD_THR1_1 199 0x7FF0 //TX_DTD_THR1_2 -200 0x6D60 //TX_DTD_THR1_3 +200 0x7FF0 //TX_DTD_THR1_3 201 0x7FF0 //TX_DTD_THR1_4 202 0x7FF0 //TX_DTD_THR1_5 203 0x7FF0 //TX_DTD_THR1_6 @@ -29622,7 +29622,7 @@ 241 0x0000 //TX_DT_RESRV_9 242 0xF800 //TX_THR_SN_EST_0 243 0xFA00 //TX_THR_SN_EST_1 -244 0xFA00 //TX_THR_SN_EST_2 +244 0xFC00 //TX_THR_SN_EST_2 245 0xF200 //TX_THR_SN_EST_3 246 0xFA00 //TX_THR_SN_EST_4 247 0xFA00 //TX_THR_SN_EST_5 @@ -29631,7 +29631,7 @@ 250 0x0100 //TX_DELTA_THR_SN_EST_0 251 0x0100 //TX_DELTA_THR_SN_EST_1 252 0x0200 //TX_DELTA_THR_SN_EST_2 -253 0x0100 //TX_DELTA_THR_SN_EST_3 +253 0x0400 //TX_DELTA_THR_SN_EST_3 254 0x0100 //TX_DELTA_THR_SN_EST_4 255 0x0200 //TX_DELTA_THR_SN_EST_5 256 0x0200 //TX_DELTA_THR_SN_EST_6 @@ -29668,20 +29668,20 @@ 287 0x0014 //TX_NS_LVL_CTRL_6 288 0x0011 //TX_NS_LVL_CTRL_7 289 0x000F //TX_MIN_GAIN_S_0 -290 0x0010 //TX_MIN_GAIN_S_1 +290 0x0020 //TX_MIN_GAIN_S_1 291 0x0010 //TX_MIN_GAIN_S_2 292 0x0010 //TX_MIN_GAIN_S_3 293 0x0010 //TX_MIN_GAIN_S_4 294 0x0010 //TX_MIN_GAIN_S_5 295 0x0010 //TX_MIN_GAIN_S_6 296 0x000F //TX_MIN_GAIN_S_7 -297 0x6000 //TX_NMOS_SUP +297 0x2000 //TX_NMOS_SUP 298 0x0000 //TX_NS_MAX_PRI_SNR_TH 299 0x0000 //TX_NMOS_SUP_MENSA -300 0x7FFF //TX_SNRI_SUP_0 +300 0x4000 //TX_SNRI_SUP_0 301 0x2000 //TX_SNRI_SUP_1 302 0x2000 //TX_SNRI_SUP_2 -303 0x4000 //TX_SNRI_SUP_3 +303 0x2000 //TX_SNRI_SUP_3 304 0x4000 //TX_SNRI_SUP_4 305 0x50C0 //TX_SNRI_SUP_5 306 0x2000 //TX_SNRI_SUP_6 @@ -29695,15 +29695,15 @@ 314 0x5000 //TX_A_POST_FILT_S_0 315 0x4C00 //TX_A_POST_FILT_S_1 316 0x4000 //TX_A_POST_FILT_S_2 -317 0x2000 //TX_A_POST_FILT_S_3 +317 0x6000 //TX_A_POST_FILT_S_3 318 0x4000 //TX_A_POST_FILT_S_4 319 0x5000 //TX_A_POST_FILT_S_5 320 0x6000 //TX_A_POST_FILT_S_6 321 0x7000 //TX_A_POST_FILT_S_7 322 0x2000 //TX_B_POST_FILT_0 -323 0x2000 //TX_B_POST_FILT_1 +323 0x4000 //TX_B_POST_FILT_1 324 0x2000 //TX_B_POST_FILT_2 -325 0x2000 //TX_B_POST_FILT_3 +325 0x7FFF //TX_B_POST_FILT_3 326 0x4000 //TX_B_POST_FILT_4 327 0x1000 //TX_B_POST_FILT_5 328 0x1000 //TX_B_POST_FILT_6 @@ -29718,9 +29718,9 @@ 337 0x7FFF //TX_B_LESSCUT_RTO_S_7 338 0x7C00 //TX_LAMBDA_PFILT 339 0x7C00 //TX_LAMBDA_PFILT_S_0 -340 0x7C00 //TX_LAMBDA_PFILT_S_1 -341 0x7A00 //TX_LAMBDA_PFILT_S_2 -342 0x7800 //TX_LAMBDA_PFILT_S_3 +340 0x7E00 //TX_LAMBDA_PFILT_S_1 +341 0x7E00 //TX_LAMBDA_PFILT_S_2 +342 0x7D00 //TX_LAMBDA_PFILT_S_3 343 0x7C00 //TX_LAMBDA_PFILT_S_4 344 0x7C00 //TX_LAMBDA_PFILT_S_5 345 0x7C00 //TX_LAMBDA_PFILT_S_6 @@ -29745,12 +29745,12 @@ 364 0x0000 //TX_K_APT 365 0x0001 //TX_NOISEDET 366 0x0064 //TX_NDETCT -367 0x0032 //TX_NOISE_TH_0 +367 0x001E //TX_NOISE_TH_0 368 0x7FFF //TX_NOISE_TH_0_2 369 0x7FFF //TX_NOISE_TH_0_3 370 0x0320 //TX_NOISE_TH_1 -371 0x0230 //TX_NOISE_TH_2 -372 0x2CEC //TX_NOISE_TH_3 +371 0x0384 //TX_NOISE_TH_2 +372 0x2904 //TX_NOISE_TH_3 373 0x3E80 //TX_NOISE_TH_4 374 0x7FFF //TX_NOISE_TH_5 375 0x7FFF //TX_NOISE_TH_5_2 @@ -29784,7 +29784,7 @@ 403 0x4000 //TX_POST_MASK_SUP 404 0x7FFF //TX_POST_MASK_ADJUST 405 0x00C8 //TX_NS_ENOISE_MIC0_TH -406 0x0033 //TX_MINENOISE_MIC0_TH +406 0x001E //TX_MINENOISE_MIC0_TH 407 0x012C //TX_MINENOISE_MIC0_S_TH 408 0x7FFF //TX_MIN_G_CTRL_SSNS 409 0x0000 //TX_METAL_RTO_THR @@ -30322,8 +30322,8 @@ 941 0x0008 //TX_MIC1MUTE_CVG_TIME 942 0x0008 //TX_MIC1MUTE_RELEASE_TIME 943 0x0100 //TX_AMS_RESRV_01 -944 0xE4A8 //TX_AMS_RESRV_02 -945 0x7EF4 //TX_AMS_RESRV_03 +944 0xE0C0 //TX_AMS_RESRV_02 +945 0x2710 //TX_AMS_RESRV_03 946 0x0000 //TX_AMS_RESRV_04 947 0x0000 //TX_AMS_RESRV_05 948 0x0000 //TX_AMS_RESRV_06 @@ -69430,7 +69430,7 @@ #TX 0 0x0001 //TX_OPERATION_MODE_0 1 0x0001 //TX_OPERATION_MODE_1 -2 0x0073 //TX_PATCH_REG +2 0x00F3 //TX_PATCH_REG 3 0x6F7D //TX_SENDFUNC_MODE_0 4 0x0000 //TX_SENDFUNC_MODE_1 5 0x0002 //TX_NUM_MIC @@ -69625,10 +69625,10 @@ 194 0x0000 //TX_NORMENERTH 195 0x0000 //TX_NORMENERHIGHTH 196 0x0000 //TX_NORMENERHIGHTHL -197 0x7FF0 //TX_DTD_THR1_0 -198 0x7FF0 //TX_DTD_THR1_1 +197 0x7333 //TX_DTD_THR1_0 +198 0x7333 //TX_DTD_THR1_1 199 0x7FF0 //TX_DTD_THR1_2 -200 0x6D60 //TX_DTD_THR1_3 +200 0x7FF0 //TX_DTD_THR1_3 201 0x7FF0 //TX_DTD_THR1_4 202 0x7FF0 //TX_DTD_THR1_5 203 0x7FF0 //TX_DTD_THR1_6 @@ -69672,7 +69672,7 @@ 241 0x0000 //TX_DT_RESRV_9 242 0xF800 //TX_THR_SN_EST_0 243 0xFA00 //TX_THR_SN_EST_1 -244 0xFA00 //TX_THR_SN_EST_2 +244 0xFC00 //TX_THR_SN_EST_2 245 0xF200 //TX_THR_SN_EST_3 246 0xFA00 //TX_THR_SN_EST_4 247 0xFA00 //TX_THR_SN_EST_5 @@ -69681,7 +69681,7 @@ 250 0x0100 //TX_DELTA_THR_SN_EST_0 251 0x0100 //TX_DELTA_THR_SN_EST_1 252 0x0200 //TX_DELTA_THR_SN_EST_2 -253 0x0100 //TX_DELTA_THR_SN_EST_3 +253 0x0400 //TX_DELTA_THR_SN_EST_3 254 0x0100 //TX_DELTA_THR_SN_EST_4 255 0x0200 //TX_DELTA_THR_SN_EST_5 256 0x0200 //TX_DELTA_THR_SN_EST_6 @@ -69718,20 +69718,20 @@ 287 0x0014 //TX_NS_LVL_CTRL_6 288 0x0011 //TX_NS_LVL_CTRL_7 289 0x000F //TX_MIN_GAIN_S_0 -290 0x0010 //TX_MIN_GAIN_S_1 +290 0x0020 //TX_MIN_GAIN_S_1 291 0x0010 //TX_MIN_GAIN_S_2 292 0x0010 //TX_MIN_GAIN_S_3 293 0x0010 //TX_MIN_GAIN_S_4 294 0x0010 //TX_MIN_GAIN_S_5 295 0x0010 //TX_MIN_GAIN_S_6 296 0x000F //TX_MIN_GAIN_S_7 -297 0x6000 //TX_NMOS_SUP +297 0x2000 //TX_NMOS_SUP 298 0x0000 //TX_NS_MAX_PRI_SNR_TH 299 0x0000 //TX_NMOS_SUP_MENSA -300 0x7FFF //TX_SNRI_SUP_0 +300 0x4000 //TX_SNRI_SUP_0 301 0x2000 //TX_SNRI_SUP_1 302 0x2000 //TX_SNRI_SUP_2 -303 0x4000 //TX_SNRI_SUP_3 +303 0x2000 //TX_SNRI_SUP_3 304 0x4000 //TX_SNRI_SUP_4 305 0x50C0 //TX_SNRI_SUP_5 306 0x2000 //TX_SNRI_SUP_6 @@ -69745,15 +69745,15 @@ 314 0x5000 //TX_A_POST_FILT_S_0 315 0x4C00 //TX_A_POST_FILT_S_1 316 0x4000 //TX_A_POST_FILT_S_2 -317 0x2000 //TX_A_POST_FILT_S_3 +317 0x6000 //TX_A_POST_FILT_S_3 318 0x4000 //TX_A_POST_FILT_S_4 319 0x5000 //TX_A_POST_FILT_S_5 320 0x6000 //TX_A_POST_FILT_S_6 321 0x7000 //TX_A_POST_FILT_S_7 322 0x2000 //TX_B_POST_FILT_0 -323 0x2000 //TX_B_POST_FILT_1 +323 0x4000 //TX_B_POST_FILT_1 324 0x2000 //TX_B_POST_FILT_2 -325 0x2000 //TX_B_POST_FILT_3 +325 0x7FFF //TX_B_POST_FILT_3 326 0x4000 //TX_B_POST_FILT_4 327 0x1000 //TX_B_POST_FILT_5 328 0x1000 //TX_B_POST_FILT_6 @@ -69768,9 +69768,9 @@ 337 0x7FFF //TX_B_LESSCUT_RTO_S_7 338 0x7C00 //TX_LAMBDA_PFILT 339 0x7C00 //TX_LAMBDA_PFILT_S_0 -340 0x7C00 //TX_LAMBDA_PFILT_S_1 -341 0x7A00 //TX_LAMBDA_PFILT_S_2 -342 0x7800 //TX_LAMBDA_PFILT_S_3 +340 0x7E00 //TX_LAMBDA_PFILT_S_1 +341 0x7E00 //TX_LAMBDA_PFILT_S_2 +342 0x7D00 //TX_LAMBDA_PFILT_S_3 343 0x7C00 //TX_LAMBDA_PFILT_S_4 344 0x7C00 //TX_LAMBDA_PFILT_S_5 345 0x7C00 //TX_LAMBDA_PFILT_S_6 @@ -69795,12 +69795,12 @@ 364 0x0000 //TX_K_APT 365 0x0001 //TX_NOISEDET 366 0x0064 //TX_NDETCT -367 0x0032 //TX_NOISE_TH_0 +367 0x001E //TX_NOISE_TH_0 368 0x7FFF //TX_NOISE_TH_0_2 369 0x7FFF //TX_NOISE_TH_0_3 370 0x0320 //TX_NOISE_TH_1 -371 0x0230 //TX_NOISE_TH_2 -372 0x2CEC //TX_NOISE_TH_3 +371 0x0384 //TX_NOISE_TH_2 +372 0x2904 //TX_NOISE_TH_3 373 0x3E80 //TX_NOISE_TH_4 374 0x7FFF //TX_NOISE_TH_5 375 0x7FFF //TX_NOISE_TH_5_2 @@ -69834,7 +69834,7 @@ 403 0x4000 //TX_POST_MASK_SUP 404 0x7FFF //TX_POST_MASK_ADJUST 405 0x00C8 //TX_NS_ENOISE_MIC0_TH -406 0x0033 //TX_MINENOISE_MIC0_TH +406 0x001E //TX_MINENOISE_MIC0_TH 407 0x012C //TX_MINENOISE_MIC0_S_TH 408 0x7FFF //TX_MIN_G_CTRL_SSNS 409 0x0000 //TX_METAL_RTO_THR @@ -70372,8 +70372,8 @@ 941 0x0008 //TX_MIC1MUTE_CVG_TIME 942 0x0008 //TX_MIC1MUTE_RELEASE_TIME 943 0x0100 //TX_AMS_RESRV_01 -944 0xE4A8 //TX_AMS_RESRV_02 -945 0x7EF4 //TX_AMS_RESRV_03 +944 0xE0C0 //TX_AMS_RESRV_02 +945 0x2710 //TX_AMS_RESRV_03 946 0x0000 //TX_AMS_RESRV_04 947 0x0000 //TX_AMS_RESRV_05 948 0x0000 //TX_AMS_RESRV_06 -- cgit v1.2.3 From 5dc91ef201a9566839a4c50ba4afbcdbdd6fff37 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Tue, 28 Mar 2023 14:58:12 +0900 Subject: Add hardware/qcom/wlan namespace With libwifi-hal-qcom migrated to Android.bp with soong namespace the namespace should be added to PRODUCT_SOONG_NAMESPACES as well. Bug: 273376293 Test: m droid (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9d25d84fcc5b1bfdd53a064ac5b52e742c3f354c) Merged-In: I6fe0e5ce62982493c9ef58b1ce651f6b44d37a1b Change-Id: I6fe0e5ce62982493c9ef58b1ce651f6b44d37a1b --- device-lynx.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device-lynx.mk b/device-lynx.mk index 339f561..9ea655b 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -172,6 +172,9 @@ else device/google/lynx/location/scd_user.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf endif +# Wifi HAL +PRODUCT_SOONG_NAMESPACES += hardware/qcom/wlan/wcn6740 + # DCK properties based on target PRODUCT_PROPERTY_OVERRIDES += \ ro.gms.dck.eligible_wcc=2 -- cgit v1.2.3 From 7d96f2d75f7730e463b6ae989eeb7bf3197a80ac Mon Sep 17 00:00:00 2001 From: Cyan_Hsieh Date: Thu, 20 Apr 2023 18:43:34 +0800 Subject: Add device mk OWNERS Bug: 278167548 Change-Id: I4cb78bbb94fcfda984433636b24c95e7440297f2 --- OWNERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OWNERS b/OWNERS index 1451bd8..79003ba 100644 --- a/OWNERS +++ b/OWNERS @@ -1 +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:master:/OWNERS -- cgit v1.2.3 From c0f618e35659d69d67cbf3bbf76a07bbfad266c9 Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Mon, 27 Feb 2023 15:12:54 +0000 Subject: powerhint.json: Update uclamp_min hint to account for margin Upstream has fixed relationship between uclamp_min and margin which means uclamp_min value between 80-100% of capacity of the CPU is a valid value and will not cause upmigration. To keep the current hints in powerhint.json the same, we must update uclamp_min to be capacity_orig_of(medium_cpu) + 1. This change is dependent on uclamp vs fits margin in GKI, vendor modules. And an improvement in sched_pixel to ignore the 25% boost if the only reason to request the frequency is uclamp_min. To cater for the later - we multiply each uclamp_min value with 1.25 - except ones that look intentionally set around capacity boundaries. Bug: 261695590 Test: PtsUiBench Signed-off-by: Qais Yousef Change-Id: I4689a953734b6049da14ec13ef399c1c686b1024 --- powerhint.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/powerhint.json b/powerhint.json index 127c21e..b604a78 100644 --- a/powerhint.json +++ b/powerhint.json @@ -150,7 +150,7 @@ "Name": "CAMUClampBoost", "Path": "/proc/vendor_sched/cam_uclamp_min", "Values": [ - "612", + "764", "0" ], "ResetOnInit": true @@ -159,7 +159,7 @@ "Name": "TAUClampBoost", "Path": "/proc/vendor_sched/ta_uclamp_min", "Values": [ - "612", + "764", "1" ], "ResetOnInit": true @@ -177,8 +177,8 @@ "Name": "MLUclampBoost", "Path": "/proc/vendor_sched/nnapi_uclamp_min", "Values": [ - "180", - "650" + "225", + "813" ], "DefaultIndex": 0, "ResetOnInit": true @@ -654,7 +654,7 @@ "PowerHint": "LAUNCH", "Node": "TAUClampBoost", "Duration": 5000, - "Value": "612" + "Value": "764" }, { "PowerHint": "LAUNCH", @@ -779,7 +779,7 @@ "PowerHint": "CAMERA_LAUNCH", "Node": "CAMUClampBoost", "Duration": 1000, - "Value": "612" + "Value": "764" }, { "PowerHint": "CAMERA_LAUNCH", @@ -1986,7 +1986,7 @@ "PowerHint": "ML_ACC", "Node": "MLUclampBoost", "Duration": 2000, - "Value": "650" + "Value": "813" }, { "PowerHint": "ML_ACC", @@ -2008,8 +2008,8 @@ "PID_Do": 500.0, "PID_Du": 0.0, "UclampMin_On": true, - "UclampMin_Init": 185, - "UclampMin_High": 384, + "UclampMin_Init": 232, + "UclampMin_High": 480, "UclampMin_Low": 2, "SamplingWindow_P": 1, "SamplingWindow_I": 0, @@ -2032,8 +2032,8 @@ "PID_Do": 500.0, "PID_Du": 0.0, "UclampMin_On": true, - "UclampMin_Init": 129, - "UclampMin_High": 384, + "UclampMin_Init": 162, + "UclampMin_High": 480, "UclampMin_Low": 2, "SamplingWindow_P": 1, "SamplingWindow_I": 0, @@ -2056,8 +2056,8 @@ "PID_Do": 500.0, "PID_Du": 0.0, "UclampMin_On": true, - "UclampMin_Init": 129, - "UclampMin_High": 384, + "UclampMin_Init": 162, + "UclampMin_High": 480, "UclampMin_Low": 2, "SamplingWindow_P": 1, "SamplingWindow_I": 0, @@ -2083,9 +2083,9 @@ "SamplingWindow_I": 1, "SamplingWindow_D": 1, "UclampMin_On": true, - "UclampMin_Init": 200, - "UclampMin_High": 157, - "UclampMin_Low": 157, + "UclampMin_Init": 250, + "UclampMin_High": 197, + "UclampMin_Low": 197, "ReportingRateLimitNs": 1, "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, @@ -2107,9 +2107,9 @@ "SamplingWindow_I": 1, "SamplingWindow_D": 1, "UclampMin_On": true, - "UclampMin_Init": 200, - "UclampMin_High": 42, - "UclampMin_Low": 42, + "UclampMin_Init": 250, + "UclampMin_High": 53, + "UclampMin_Low": 53, "ReportingRateLimitNs": 1, "EarlyBoost_On": false, "EarlyBoost_TimeFactor": 0.0, @@ -2131,7 +2131,7 @@ "SamplingWindow_I": 1, "SamplingWindow_D": 1, "UclampMin_On": true, - "UclampMin_Init": 200, + "UclampMin_Init": 250, "UclampMin_High": 0, "UclampMin_Low": 0, "ReportingRateLimitNs": 1, -- cgit v1.2.3 From 378190d82fe3af22c903d94996f1f5fdd831b027 Mon Sep 17 00:00:00 2001 From: "Peter (YM)" Date: Fri, 21 Apr 2023 12:37:48 +0800 Subject: thermal: lower tj control temp during battery save Use LOW_POWER power hint to detect and lower the control temp for junction control loops. Bug: 266011718 Test: Build and boot on device. Check thermal control temperatures during battery save Change-Id: If2e0756b24913ed5d71e499e219f7b60b947baaa --- powerhint.json | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/powerhint.json b/powerhint.json index b604a78..3ac0c6e 100644 --- a/powerhint.json +++ b/powerhint.json @@ -1449,6 +1449,66 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "LOW_POWER", + "Node": "BigControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "MidControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "LittleControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "G3dControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "TpuControlTempSet", + "Duration": 0, + "Value": "80000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "BigSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "MidSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "LittleSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "G3dSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, + { + "PowerHint": "LOW_POWER", + "Node": "TpuSwitchOnTempSet", + "Duration": 0, + "Value": "60000" + }, { "PowerHint": "REFRESH_90FPS", "Node": "TAUClampBoost", -- cgit v1.2.3 From 1375d8428ba508251d699df5e61da8e33e0a9991 Mon Sep 17 00:00:00 2001 From: Rios Kao Date: Mon, 24 Apr 2023 06:22:46 +0000 Subject: audio: add smartfeature table for chre tuning note: add smartfeature.gstf that only used for Hotword pipeline in AoC which is sharing to chre usage too. On WHI_PRO CHRE PDM Gain(gain=158) CHRE AEC Gain(gain=-42) CHRE SRC AEC Timeout(timeout=0) This table also contains hotword gain control as Non Eraser gain (gain=220) Eraser Post Gain (gain=220) Test: end-to-end verify by CHRE using aoc_audio_cfg to query gain as below adb shell aoc_audio_cfg hotword_get_non_eraser_gain adb shell aoc_audio_cfg hotword_get_eraser_post_gain Bug: 271078701 Change-Id: I0091641ba689f04d24f53b898fd29399c48fd21a --- audio/lynx/audio-tables.mk | 1 + audio/lynx/tuning/bluenote/smartfeature.gstf | Bin 0 -> 236 bytes 2 files changed, 1 insertion(+) create mode 100644 audio/lynx/tuning/bluenote/smartfeature.gstf diff --git a/audio/lynx/audio-tables.mk b/audio/lynx/audio-tables.mk index 9e4d530..f8c1da5 100644 --- a/audio/lynx/audio-tables.mk +++ b/audio/lynx/audio-tables.mk @@ -55,6 +55,7 @@ PRODUCT_COPY_FILES += $(call copy-files,$(wildcard $(SPK_FIRMWARE_FULL_PATH)/*) # Audio tuning PRODUCT_COPY_FILES += \ device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/recording.gatf:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/recording.gatf \ + device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/smartfeature.gstf:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/smartfeature.gstf \ device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/BLUETOOTH.dat:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/BLUETOOTH.dat \ device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSFREE.dat:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSFREE.dat \ device/google/lynx/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSET.dat:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSET.dat \ diff --git a/audio/lynx/tuning/bluenote/smartfeature.gstf b/audio/lynx/tuning/bluenote/smartfeature.gstf new file mode 100644 index 0000000..d174ae3 Binary files /dev/null and b/audio/lynx/tuning/bluenote/smartfeature.gstf differ -- cgit v1.2.3 From 5f600515e75a4030bc9df1f4f2c8ee1c611e9e5b Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Tue, 2 May 2023 06:40:57 +0000 Subject: Remove background cpuset setting Already set in init.gs201.rc. Bug: 201260585 Test: build pass Change-Id: Ib1343e32a4133e09029b66f8747b3b43a45548b5 --- conf/init.lynx.rc | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index 1ff60a1..fd38456 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -99,9 +99,6 @@ on property:vendor.device.modules.ready=1 on property:sys.boot_completed=1 trigger override-sf-uclamp -on property:vendor.powerhal.init=* - write /dev/cpuset/background/cpus ${persist.device_config.vendor_system_native.background_cpuset:-0-3} - on override-sf-uclamp write /proc/vendor_sched/rt_uclamp_min 0 write /proc/vendor_sched/sf_uclamp_min 0 -- cgit v1.2.3 From c30c7c4ff600560c0b8ea557f2a844982e6e52a2 Mon Sep 17 00:00:00 2001 From: Suprabh Shukla Date: Tue, 2 May 2023 16:50:30 -0700 Subject: Add wakeup interrupt mapping Test: Manually inspect the output of: `dumpsys batterystats --wakeups` Bug: 271922941 Change-Id: Ic418b4fc02f8ada450b43a9a25e82ce37b0beb21 --- .../base/core/res/res/xml/irq_device_map.xml | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml diff --git a/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml b/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml new file mode 100644 index 0000000..b2047f3 --- /dev/null +++ b/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml @@ -0,0 +1,33 @@ + + + + + Alarm + + + Wifi + + + Cellular_data + + + Sensor + + + -- cgit v1.2.3 From 429d54744221266579ca20983019f0767bf4bafe Mon Sep 17 00:00:00 2001 From: Shuibing Dai Date: Tue, 2 May 2023 13:32:46 -0700 Subject: Remove overlay item: country code update during setup wizard The country code updating from scan results generic case can cover setup wizard case. Bug: 279625751 Test: manually verified generic case Change-Id: Id173adb1ac0f144b6b293ef707979025d4c358a9 --- rro_overlays/WifiOverlay/res/values/config.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml index 40f165f..2659754 100644 --- a/rro_overlays/WifiOverlay/res/values/config.xml +++ b/rro_overlays/WifiOverlay/res/values/config.xml @@ -142,11 +142,6 @@ is when the system is in the suspended mode --> true - - true - true -- cgit v1.2.3 From 837a22b1d1c70e5bd6b9fe955a853e6b5c588903 Mon Sep 17 00:00:00 2001 From: sashwinbalaji Date: Tue, 21 Feb 2023 09:42:32 +0800 Subject: thermal: Update config for stats Bug: 259903201 Test: local build and verify stats Change-Id: Ib24d17454e58cbdb305b146018deac66ee64f875 --- thermal_info_config_lynx.json | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/thermal_info_config_lynx.json b/thermal_info_config_lynx.json index 075a283..a72d137 100644 --- a/thermal_info_config_lynx.json +++ b/thermal_info_config_lynx.json @@ -866,5 +866,45 @@ "PowerSampleDelay":14000, "PowerSampleCount":5 } - ] + ], + "Stats": { + "Sensors": { + "RecordWithDefaultThreshold": ["VIRTUAL-SKIN", "VIRTUAL-SKIN-CHARGE-WLC"], + "RecordWithThreshold": [ + { + "Name": "VIRTUAL-NEU-QUT-SKIN1-SKIN2-USB-USB2-GNSS-1", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-QUT-SKIN2-USB-USB2-2", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-QUT-SKIN2-USB-GNSS-3", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-NEU-QUT-SKIN1-SKIN2-USB-USB2-GNSS-4", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-SKIN", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-SKIN-CHARGE-WLC", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Thresholds": [2.0] + } + ] + }, + "CoolingDevices": { + "RecordVotePerSensor": { + "DefaultThresholdEnableAll": true + } + } + } } -- cgit v1.2.3 From b9152eee7d8219a74e02475f12d83aec1dda5bc5 Mon Sep 17 00:00:00 2001 From: Wendly Li Date: Mon, 24 Apr 2023 15:58:06 +0000 Subject: touch: move the setup of gti ownership to gs-common Bug: 278023960 Test: adb bugreport Change-Id: Ifd57118d37261229f184a8098776423d96140239 Signed-off-by: Wendly Li --- conf/init.lynx.rc | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index fd38456..d986144 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -83,18 +83,6 @@ on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_complet on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1 write /sys/devices/virtual/goog_touch_interface/gti.0/screen_protector_mode_enabled 1 -# Touch -on property:vendor.device.modules.ready=1 - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/force_active - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/fw_ver - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_base - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_diff - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_raw - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/self_test - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_base - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_diff - chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_raw - # Override SF and RE uclamps to 0 on boot after being set elsewhere, for adpf cpu hints on property:sys.boot_completed=1 trigger override-sf-uclamp -- cgit v1.2.3 From 363a65f7c9a95b2e6c958c13935edccecc324133 Mon Sep 17 00:00:00 2001 From: Suprabh Shukla Date: Wed, 10 May 2023 16:03:20 -0700 Subject: Adding interrupt mapping for sound_trigger wakeups Test: Manually inspect the output of `dumpsys batterystats --wakeups` Bug: 271922941 Change-Id: If7e1e0a4153796c4836fced1500e27e84d379987 --- lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml b/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml index b2047f3..5ac1f57 100644 --- a/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml +++ b/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml @@ -26,6 +26,9 @@ Cellular_data + + Sound_trigger + Sensor -- cgit v1.2.3 From 19e09f99f856a3ae01862290e2695117de6d8447 Mon Sep 17 00:00:00 2001 From: Xin Li Date: Thu, 11 May 2023 13:36:32 -0700 Subject: Fix build for non-Lynx devices. radio.img should be target dependent and should not be used unconditionally. Test: ag/23177298 against aosp_barbet and aosp_bramble (L03400000960607158) Bug: 281935024 Change-Id: Ia436210a90dfcb477a19f44eae2412b5589d23fc --- self-extractors/google_devices/staging/Android.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/self-extractors/google_devices/staging/Android.mk b/self-extractors/google_devices/staging/Android.mk index c52fbf2..6142995 100644 --- a/self-extractors/google_devices/staging/Android.mk +++ b/self-extractors/google_devices/staging/Android.mk @@ -18,10 +18,9 @@ LOCAL_PATH := $(call my-dir) ifneq ($(filter lynx,$(TARGET_DEVICE)),) $(call add-radio-file,bootloader.img) + $(call add-radio-file,radio.img) endif -$(call add-radio-file-checked,radio.img,version-baseband) - ifneq ($(filter lynx,$(TARGET_DEVICE)),) include $(CLEAR_VARS) LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) -- cgit v1.2.3 From d57beb455c37fadec704b097f32f2e06d06f6f54 Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Wed, 10 May 2023 10:31:59 +0000 Subject: The dvfs headroom was split into its own knob. Update to use it. util_threshold only controls migration margin now. dvfs headroom has its own new knob. Bug: 261705301 Signed-off-by: Qais Yousef Change-Id: I48d330cb7d9d82d05ec0dfc4b38ea0d8a22409aa --- powerhint.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/powerhint.json b/powerhint.json index 3ac0c6e..6bf6da8 100644 --- a/powerhint.json +++ b/powerhint.json @@ -136,6 +136,16 @@ "DefaultIndex": 0, "ResetOnInit": true }, + { + "Name": "CPUDVFSHeadroom", + "Path": "/proc/vendor_sched/dvfs_headroom", + "Values": [ + "1280", + "1100 1078 1024" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "MIFTargetLoad", "Path": "/sys/class/devfreq/17000010.devfreq_mif/interactive/target_load", @@ -1129,6 +1139,12 @@ "Duration": 0, "Value": "1100 1078 1024" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CPUDVFSHeadroom", + "Duration": 0, + "Value": "1100 1078 1024" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CDPreferHighCap", -- cgit v1.2.3 From 5afd78e4a5806eb43a55612a114bb2b8a84eea66 Mon Sep 17 00:00:00 2001 From: Steve Berbary Date: Sat, 13 May 2023 22:41:48 +0000 Subject: Update lynx SVN to 7 Bug: 282371465 Change-Id: I17d48910cd87583118621a76b81c8023c2dfd39d --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 4a9e5ad..929d465 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -199,7 +199,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=6 + ro.vendor.build.svn=7 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 2a47a112fa9f128db5051512a644f2fff78beeac Mon Sep 17 00:00:00 2001 From: Richard Chang Date: Mon, 15 May 2023 02:40:03 +0000 Subject: lynx: remove customizedMaxCachedProcesses With project Snowbird in U, the MaxCachedProcesses is 1024 by default Bug: 278086134 Test: Build Change-Id: I3010e82a0424e20d71df9c9a8ff83f78731730fe --- lynx/overlay/frameworks/base/core/res/res/values/config.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/lynx/overlay/frameworks/base/core/res/res/values/config.xml b/lynx/overlay/frameworks/base/core/res/res/values/config.xml index eb9cf76..c122acf 100644 --- a/lynx/overlay/frameworks/base/core/res/res/values/config.xml +++ b/lynx/overlay/frameworks/base/core/res/res/values/config.xml @@ -187,9 +187,6 @@ 60 - - 64 - 2 3 -- cgit v1.2.3 From 095daf9794bde2b449f027d1a207dbb1c72b5cde Mon Sep 17 00:00:00 2001 From: Ted Wang Date: Thu, 18 May 2023 14:51:02 +0000 Subject: Bluetooth SAR table for hostpot mode scenario Bug: 283235997 Test: Manual Change-Id: I95c3110dbc43def30ec9272f9e011cabe3d707e0 --- bluetooth/bluetooth_power_limits_Lynx.csv | 70 +++++++++++----------- bluetooth/bluetooth_power_limits_Lynx_G0DZQ_CA.csv | 70 +++++++++++----------- bluetooth/bluetooth_power_limits_Lynx_G0DZQ_EU.csv | 70 +++++++++++----------- bluetooth/bluetooth_power_limits_Lynx_G0DZQ_JP.csv | 70 +++++++++++----------- bluetooth/bluetooth_power_limits_Lynx_G0DZQ_US.csv | 70 +++++++++++----------- bluetooth/bluetooth_power_limits_Lynx_G82U8_JP.csv | 70 +++++++++++----------- bluetooth/bluetooth_power_limits_Lynx_GHL1X_EU.csv | 70 +++++++++++----------- bluetooth/bluetooth_power_limits_Lynx_GWKK3_CA.csv | 70 +++++++++++----------- bluetooth/bluetooth_power_limits_Lynx_GWKK3_US.csv | 70 +++++++++++----------- 9 files changed, 324 insertions(+), 306 deletions(-) diff --git a/bluetooth/bluetooth_power_limits_Lynx.csv b/bluetooth/bluetooth_power_limits_Lynx.csv index 4dfb75f..c65ffad 100644 --- a/bluetooth/bluetooth_power_limits_Lynx.csv +++ b/bluetooth/bluetooth_power_limits_Lynx.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,off,off,off,on,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,off,off,on,off,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,off,off,on,on,on,54,66,28,54,66,28,54,66,28,54,66,28 -off,off,on,off,off,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,off,on,off,on,on,54,54,28,54,54,28,54,54,28,54,54,28 -off,off,on,on,off,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,off,on,on,on,on,54,54,28,54,54,28,54,54,28,54,54,28 -off,on,off,off,off,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,on,off,off,on,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,on,off,on,off,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,on,off,on,on,on,54,54,28,54,54,28,54,54,28,54,54,28 -off,on,on,off,off,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,on,on,off,on,on,54,54,28,54,54,28,54,54,28,54,54,28 -off,on,on,on,off,on,68,66,28,70,66,28,68,66,28,70,66,28 -off,on,on,on,on,on,54,54,28,54,54,28,54,54,28,54,54,28 -on,off,off,off,off,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,off,off,off,on,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,off,off,on,off,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,off,off,on,on,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,off,on,off,off,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,off,on,off,on,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,off,on,on,off,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,off,on,on,on,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,on,off,off,off,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,on,off,off,on,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,on,off,on,off,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,on,off,on,on,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,on,on,off,off,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,on,on,off,on,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,on,on,on,off,any,42,42,28,42,42,28,42,42,28,42,42,28 -on,on,on,on,on,any,42,42,28,42,42,28,42,42,28,42,42,28 -off,any,any,any,any,off,68,66,28,70,66,28,68,66,28,70,66,28 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,off,off,off,on,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,off,off,on,off,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,off,off,on,on,on,54,66,28,54,66,28,54,66,28,54,66,28 +off,off,on,off,off,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,off,on,off,on,on,54,54,28,54,54,28,54,54,28,54,54,28 +off,off,on,on,off,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,off,on,on,on,on,54,54,28,54,54,28,54,54,28,54,54,28 +off,on,off,off,off,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,on,off,off,on,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,on,off,on,off,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,on,off,on,on,on,54,54,28,54,54,28,54,54,28,54,54,28 +off,on,on,off,off,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,on,on,off,on,on,54,54,28,54,54,28,54,54,28,54,54,28 +off,on,on,on,off,on,68,66,28,70,66,28,68,66,28,70,66,28 +off,on,on,on,on,on,54,54,28,54,54,28,54,54,28,54,54,28 +on,off,off,off,off,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,off,off,off,on,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,off,off,on,off,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,off,off,on,on,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,off,on,off,off,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,off,on,off,on,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,off,on,on,off,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,off,on,on,on,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,on,off,off,off,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,on,off,off,on,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,on,off,on,off,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,on,off,on,on,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,on,on,off,off,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,on,on,off,on,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,on,on,on,off,any,42,42,28,42,42,28,42,42,28,42,42,28 +on,on,on,on,on,any,42,42,28,42,42,28,42,42,28,42,42,28 +off,off,any,off,any,off,68,66,28,70,66,28,68,66,28,70,66,28 +off,on,any,off,any,off,54,54,28,54,54,28,54,54,28,54,54,28 +off,off,any,on,any,off,54,54,28,54,54,28,54,54,28,54,54,28 diff --git a/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_CA.csv b/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_CA.csv index 81b050e..579c955 100644 --- a/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_CA.csv +++ b/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_CA.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,on,on,on,54,66,54,54,66,54,54,66,54,54,66,54 -off,off,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,off,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -on,off,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -off,any,any,any,any,off,74,66,74,74,66,74,74,66,74,74,66,74 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,on,on,on,54,66,54,54,66,54,54,66,54,54,66,54 +off,off,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,off,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +on,off,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +off,off,any,off,any,off,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,any,off,any,off,54,54,54,54,54,54,54,54,54,54,54,54 +off,off,any,on,any,off,54,54,54,54,54,54,54,54,54,54,54,54 diff --git a/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_EU.csv b/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_EU.csv index 40f70fd..0545553 100644 --- a/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_EU.csv +++ b/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_EU.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,off,off,off,on,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,off,off,on,off,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,off,off,on,on,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,off,on,off,off,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,off,on,off,on,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,off,on,on,off,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,off,on,on,on,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,on,off,off,off,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,on,off,off,on,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,on,off,on,off,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,on,off,on,on,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,on,on,off,off,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,on,on,off,on,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,on,on,on,off,on,74,66,28,70,66,28,74,66,28,70,66,28 -off,on,on,on,on,on,74,66,28,70,66,28,74,66,28,70,66,28 -on,off,off,off,off,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,off,off,off,on,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,off,off,on,off,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,off,off,on,on,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,off,on,off,off,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,off,on,off,on,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,off,on,on,off,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,off,on,on,on,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,on,off,off,off,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,on,off,off,on,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,on,off,on,off,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,on,off,on,on,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,on,on,off,off,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,on,on,off,on,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,on,on,on,off,any,74,66,28,70,66,28,74,66,28,70,66,28 -on,on,on,on,on,any,74,66,28,70,66,28,74,66,28,70,66,28 -off,any,any,any,any,off,74,66,28,70,66,28,74,66,28,70,66,28 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,off,off,on,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,off,on,off,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,off,on,on,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,on,off,off,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,on,off,on,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,on,on,off,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,on,on,on,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,off,off,off,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,off,off,on,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,off,on,off,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,off,on,on,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,on,off,off,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,on,off,on,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,on,on,off,on,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,on,on,on,on,74,66,28,70,66,28,74,66,28,70,66,28 +on,off,off,off,off,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,off,off,off,on,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,off,off,on,off,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,off,off,on,on,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,off,on,off,off,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,off,on,off,on,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,off,on,on,off,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,off,on,on,on,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,on,off,off,off,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,on,off,off,on,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,on,off,on,off,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,on,off,on,on,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,on,on,off,off,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,on,on,off,on,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,on,on,on,off,any,74,66,28,70,66,28,74,66,28,70,66,28 +on,on,on,on,on,any,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,any,off,any,off,74,66,28,70,66,28,74,66,28,70,66,28 +off,on,any,off,any,off,74,66,28,70,66,28,74,66,28,70,66,28 +off,off,any,on,any,off,74,66,28,70,66,28,74,66,28,70,66,28 diff --git a/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_JP.csv b/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_JP.csv index 3ec5bc3..1f725dc 100644 --- a/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_JP.csv +++ b/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_JP.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,off,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,off,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,off,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,on,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,on,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,on,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,on,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,off,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,off,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,off,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,off,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,on,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,on,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,on,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,on,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,off,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,off,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,off,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,off,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,on,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,on,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,on,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,on,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,off,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,off,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,off,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,off,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,on,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,on,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,on,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,on,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -off,any,any,any,any,off,68,66,38,72,66,38,68,66,38,72,66,38 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,off,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,off,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,off,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,on,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,on,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,on,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,on,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,off,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,off,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,off,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,off,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,on,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,on,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,on,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,on,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,off,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,off,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,off,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,off,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,on,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,on,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,on,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,on,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,off,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,off,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,off,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,off,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,on,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,on,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,on,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,on,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,any,off,any,off,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,any,off,any,off,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,any,on,any,off,68,66,38,72,66,38,68,66,38,72,66,38 diff --git a/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_US.csv b/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_US.csv index 81b050e..579c955 100644 --- a/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_US.csv +++ b/bluetooth/bluetooth_power_limits_Lynx_G0DZQ_US.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,on,on,on,54,66,54,54,66,54,54,66,54,54,66,54 -off,off,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,off,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -on,off,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -off,any,any,any,any,off,74,66,74,74,66,74,74,66,74,74,66,74 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,on,on,on,54,66,54,54,66,54,54,66,54,54,66,54 +off,off,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,off,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +on,off,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +off,off,any,off,any,off,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,any,off,any,off,54,54,54,54,54,54,54,54,54,54,54,54 +off,off,any,on,any,off,54,54,54,54,54,54,54,54,54,54,54,54 diff --git a/bluetooth/bluetooth_power_limits_Lynx_G82U8_JP.csv b/bluetooth/bluetooth_power_limits_Lynx_G82U8_JP.csv index 3ec5bc3..1f725dc 100644 --- a/bluetooth/bluetooth_power_limits_Lynx_G82U8_JP.csv +++ b/bluetooth/bluetooth_power_limits_Lynx_G82U8_JP.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,off,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,off,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,off,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,on,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,on,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,on,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,off,on,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,off,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,off,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,off,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,off,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,on,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,on,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,on,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 -off,on,on,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,off,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,off,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,off,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,off,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,on,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,on,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,on,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,off,on,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,off,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,off,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,off,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,off,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,on,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,on,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,on,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 -on,on,on,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 -off,any,any,any,any,off,68,66,38,72,66,38,68,66,38,72,66,38 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,off,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,off,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,off,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,on,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,on,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,on,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,on,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,off,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,off,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,off,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,off,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,on,off,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,on,off,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,on,on,off,on,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,on,on,on,on,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,off,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,off,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,off,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,off,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,on,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,on,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,on,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,off,on,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,off,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,off,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,off,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,off,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,on,off,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,on,off,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,on,on,off,any,68,66,38,72,66,38,68,66,38,72,66,38 +on,on,on,on,on,any,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,any,off,any,off,68,66,38,72,66,38,68,66,38,72,66,38 +off,on,any,off,any,off,68,66,38,72,66,38,68,66,38,72,66,38 +off,off,any,on,any,off,68,66,38,72,66,38,68,66,38,72,66,38 diff --git a/bluetooth/bluetooth_power_limits_Lynx_GHL1X_EU.csv b/bluetooth/bluetooth_power_limits_Lynx_GHL1X_EU.csv index 54928f5..9f7153a 100644 --- a/bluetooth/bluetooth_power_limits_Lynx_GHL1X_EU.csv +++ b/bluetooth/bluetooth_power_limits_Lynx_GHL1X_EU.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,74,66,34,70,66,28,74,66,34,70,66,28 -off,off,off,off,on,on,74,66,34,70,66,28,74,66,34,70,66,28 -off,off,off,on,off,on,74,66,34,70,66,28,74,66,34,70,66,28 -off,off,off,on,on,on,62,62,34,62,62,28,62,62,34,62,62,28 -off,off,on,off,off,on,74,66,34,70,66,28,74,66,34,70,66,28 -off,off,on,off,on,on,62,62,34,62,62,28,62,62,34,62,62,28 -off,off,on,on,off,on,70,66,34,70,66,28,70,66,34,70,66,28 -off,off,on,on,on,on,62,62,34,62,62,28,62,62,34,62,62,28 -off,on,off,off,off,on,70,66,34,70,66,28,70,66,34,70,66,28 -off,on,off,off,on,on,70,66,34,70,66,28,70,66,34,70,66,28 -off,on,off,on,off,on,70,66,34,70,66,28,70,66,34,70,66,28 -off,on,off,on,on,on,62,62,34,62,62,28,62,62,34,62,62,28 -off,on,on,off,off,on,70,66,34,70,66,28,70,66,34,70,66,28 -off,on,on,off,on,on,62,62,34,62,62,28,62,62,34,62,62,28 -off,on,on,on,off,on,70,66,34,70,66,28,70,66,34,70,66,28 -off,on,on,on,on,on,62,62,34,62,62,28,62,62,34,62,62,28 -on,off,off,off,off,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,off,off,off,on,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,off,off,on,off,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,off,off,on,on,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,off,on,off,off,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,off,on,off,on,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,off,on,on,off,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,off,on,on,on,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,on,off,off,off,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,on,off,off,on,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,on,off,on,off,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,on,off,on,on,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,on,on,off,off,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,on,on,off,on,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,on,on,on,off,any,62,62,34,62,62,28,62,62,34,62,62,28 -on,on,on,on,on,any,62,62,34,62,62,28,62,62,34,62,62,28 -off,any,any,any,any,off,74,66,34,70,66,28,74,66,34,70,66,28 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,74,66,34,70,66,28,74,66,34,70,66,28 +off,off,off,off,on,on,74,66,34,70,66,28,74,66,34,70,66,28 +off,off,off,on,off,on,74,66,34,70,66,28,74,66,34,70,66,28 +off,off,off,on,on,on,62,62,34,62,62,28,62,62,34,62,62,28 +off,off,on,off,off,on,74,66,34,70,66,28,74,66,34,70,66,28 +off,off,on,off,on,on,62,62,34,62,62,28,62,62,34,62,62,28 +off,off,on,on,off,on,70,66,34,70,66,28,70,66,34,70,66,28 +off,off,on,on,on,on,62,62,34,62,62,28,62,62,34,62,62,28 +off,on,off,off,off,on,70,66,34,70,66,28,70,66,34,70,66,28 +off,on,off,off,on,on,70,66,34,70,66,28,70,66,34,70,66,28 +off,on,off,on,off,on,70,66,34,70,66,28,70,66,34,70,66,28 +off,on,off,on,on,on,62,62,34,62,62,28,62,62,34,62,62,28 +off,on,on,off,off,on,70,66,34,70,66,28,70,66,34,70,66,28 +off,on,on,off,on,on,62,62,34,62,62,28,62,62,34,62,62,28 +off,on,on,on,off,on,70,66,34,70,66,28,70,66,34,70,66,28 +off,on,on,on,on,on,62,62,34,62,62,28,62,62,34,62,62,28 +on,off,off,off,off,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,off,off,off,on,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,off,off,on,off,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,off,off,on,on,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,off,on,off,off,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,off,on,off,on,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,off,on,on,off,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,off,on,on,on,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,on,off,off,off,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,on,off,off,on,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,on,off,on,off,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,on,off,on,on,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,on,on,off,off,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,on,on,off,on,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,on,on,on,off,any,62,62,34,62,62,28,62,62,34,62,62,28 +on,on,on,on,on,any,62,62,34,62,62,28,62,62,34,62,62,28 +off,off,any,off,any,off,74,66,34,70,66,28,74,66,34,70,66,28 +off,on,any,off,any,off,62,62,34,62,62,28,62,62,34,62,62,28 +off,off,any,on,any,off,62,62,34,62,62,28,62,62,34,62,62,28 diff --git a/bluetooth/bluetooth_power_limits_Lynx_GWKK3_CA.csv b/bluetooth/bluetooth_power_limits_Lynx_GWKK3_CA.csv index 81b050e..579c955 100644 --- a/bluetooth/bluetooth_power_limits_Lynx_GWKK3_CA.csv +++ b/bluetooth/bluetooth_power_limits_Lynx_GWKK3_CA.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,on,on,on,54,66,54,54,66,54,54,66,54,54,66,54 -off,off,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,off,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -on,off,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -off,any,any,any,any,off,74,66,74,74,66,74,74,66,74,74,66,74 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,on,on,on,54,66,54,54,66,54,54,66,54,54,66,54 +off,off,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,off,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +on,off,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +off,off,any,off,any,off,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,any,off,any,off,54,54,54,54,54,54,54,54,54,54,54,54 +off,off,any,on,any,off,54,54,54,54,54,54,54,54,54,54,54,54 diff --git a/bluetooth/bluetooth_power_limits_Lynx_GWKK3_US.csv b/bluetooth/bluetooth_power_limits_Lynx_GWKK3_US.csv index 81b050e..579c955 100644 --- a/bluetooth/bluetooth_power_limits_Lynx_GWKK3_US.csv +++ b/bluetooth/bluetooth_power_limits_Lynx_GWKK3_US.csv @@ -1,34 +1,36 @@ -Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 -off,off,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,off,on,on,on,54,66,54,54,66,54,54,66,54,54,66,54 -off,off,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,off,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,off,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,off,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -off,on,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 -off,on,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 -on,off,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,off,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 -on,on,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 -off,any,any,any,any,off,74,66,74,74,66,74,74,66,74,74,66,74 +Head,BTHotspot,WIFI5Ghz,HotspotVoice,Cell,IMU,BDR_Single_Chain_0,EDR_Single_Chain_0,BLE_Single_Chain_0,BDR_Single_Chain_1,EDR_Single_Chain_1,BLE_Single_Chain_1,BDR_Dual_Chain_0,EDR_Dual_Chain_0,BLE_Dual_Chain_0,BDR_Dual_Chain_1,EDR_Dual_Chain_1,BLE_Dual_Chain_1 +off,off,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,off,on,on,on,54,66,54,54,66,54,54,66,54,54,66,54 +off,off,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,off,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,off,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,off,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,off,on,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,off,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,on,off,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,on,off,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +off,on,on,on,off,on,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,on,on,on,on,54,54,54,54,54,54,54,54,54,54,54,54 +on,off,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,off,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,off,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,off,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,off,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,on,off,any,42,42,42,42,42,42,42,42,42,42,42,42 +on,on,on,on,on,any,42,42,42,42,42,42,42,42,42,42,42,42 +off,off,any,off,any,off,74,66,74,74,66,74,74,66,74,74,66,74 +off,on,any,off,any,off,54,54,54,54,54,54,54,54,54,54,54,54 +off,off,any,on,any,off,54,54,54,54,54,54,54,54,54,54,54,54 -- cgit v1.2.3 From 40e7950a68642e5f7fb2d4b4c79a140d7dbe4b21 Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Thu, 25 May 2023 18:20:11 +0000 Subject: Update lynx SVN to 8 Bug: 282371465 Change-Id: I247e1b42d7224cb9deec7da374654827bb2adc52 --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 929d465..8870ffe 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -199,7 +199,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=7 + ro.vendor.build.svn=8 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From b1270a03429b875b33f16fc902246275c515894e Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Fri, 26 May 2023 19:26:20 +0000 Subject: Update lynx SVN to 9 Bug: 282371465 Change-Id: I2bc487cf92477db51bdc31868a8482a070af9453 --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 8870ffe..cfdd323 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -199,7 +199,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=8 + ro.vendor.build.svn=9 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From fe9c0c01401b33ddf11391614885350453660530 Mon Sep 17 00:00:00 2001 From: Suprabh Shukla Date: Fri, 26 May 2023 13:11:29 -0700 Subject: Update Sound_trigger interrupt mapping Test: Manually verify the output of `dumpsys batterystats --wakeups` Bug: 284405919 Change-Id: I23d49e39ae3d694a7131ed18fbf8a7b3ec6053c9 --- lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml b/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml index 5ac1f57..8304044 100644 --- a/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml +++ b/lynx/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml @@ -26,7 +26,7 @@ Cellular_data - + Sound_trigger -- cgit v1.2.3 From a87896836f3f39ff04a92a72a6daec33709192fe Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Tue, 16 May 2023 17:37:49 +0800 Subject: Update cs40l26 modprobe modules Bug: 278018625 Test: Driver probed and checked lsmod. Change-Id: Ie59677b09eab1ca4b65f151bc05bcf99ad6bca4a --- init.insmod.lynx.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.insmod.lynx.cfg b/init.insmod.lynx.cfg index e4eecf5..1b88597 100644 --- a/init.insmod.lynx.cfg +++ b/init.insmod.lynx.cfg @@ -9,8 +9,7 @@ modprobe|snd-soc-cs35l41-spi.ko modprobe|goodix_brl_touch.ko modprobe|focal_touch.ko -modprobe|cl_dsp.ko -modprobe|input-cs40l26-i2c.ko +modprobe|cs40l26-i2c.ko modprobe|snd-soc-cs40l26.ko # All device specific modules loaded -- cgit v1.2.3 From 6caaf75506187b20954afe088f6de52f53727050 Mon Sep 17 00:00:00 2001 From: Tai Kuo Date: Tue, 16 May 2023 16:10:46 +0800 Subject: Revert "haptics: update hapitcs sink and slot setting" This reverts commit c3a27cae536ad0d61e662d0429b04f5055e443da. Bug: 278018625 Test: Check audio coupled haptics at the sound preview app. Change-Id: I8c0b30e2ad44841d1d7ca6bb81f3f54db59176bf --- audio/lynx/config/mixer_paths.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/lynx/config/mixer_paths.xml b/audio/lynx/config/mixer_paths.xml index 3f37f7a..bec5b6e 100644 --- a/audio/lynx/config/mixer_paths.xml +++ b/audio/lynx/config/mixer_paths.xml @@ -42,7 +42,7 @@ - + -- cgit v1.2.3 From 4eadc8cf16b5af4029843fcc40b2f7182c3602a3 Mon Sep 17 00:00:00 2001 From: Jeffrey Carlyle Date: Fri, 17 Feb 2023 15:02:53 -0800 Subject: dck: add SE capability property Bug: 285390995 Test: boot cheetah; check logs to see that SE property is used Change-Id: Ie6eaa03fa56da7516d5d2aa09cf411ef4de6b02f Signed-off-by: Jeffrey Carlyle --- device-lynx.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 84b69e2..8919f71 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -182,7 +182,8 @@ endif # DCK properties based on target PRODUCT_PROPERTY_OVERRIDES += \ - ro.gms.dck.eligible_wcc=2 + ro.gms.dck.eligible_wcc=2 \ + ro.gms.dck.se_capability=1 # WIFI COEX PRODUCT_COPY_FILES += \ -- cgit v1.2.3 From 58841ff9b847874eb1bb0da312afde8a15880ecd Mon Sep 17 00:00:00 2001 From: Matt Buckley Date: Thu, 1 Jun 2023 20:52:41 +0000 Subject: Remove rt_uclamp_min and sf_uclamp_min rt_uclamp_min and sf_uclamp_min have been made redundant in Pixel by ADPF for sf, so we are just going to remove them outright rather than worrying about overriding them later Bug: 285248880 Test: manual Change-Id: I8935e0ba342dcaa3131cec75a2d15d229d0c31a4 --- conf/init.lynx.rc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/conf/init.lynx.rc b/conf/init.lynx.rc index d986144..c116f92 100644 --- a/conf/init.lynx.rc +++ b/conf/init.lynx.rc @@ -83,14 +83,6 @@ on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_complet on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1 write /sys/devices/virtual/goog_touch_interface/gti.0/screen_protector_mode_enabled 1 -# Override SF and RE uclamps to 0 on boot after being set elsewhere, for adpf cpu hints -on property:sys.boot_completed=1 - trigger override-sf-uclamp - -on override-sf-uclamp - write /proc/vendor_sched/rt_uclamp_min 0 - write /proc/vendor_sched/sf_uclamp_min 0 - # For Japan sku, always enforce camera shutter sound # Since this property is read by the audio server in system service, # it should be written by the system init. -- cgit v1.2.3 From 16ebc19c67b478c776cbafd299e94f9e1db6fea3 Mon Sep 17 00:00:00 2001 From: Bill Yi Date: Thu, 1 Jun 2023 16:16:10 -0700 Subject: Update vendor blobs for u BUG: 285414611 Change-Id: I4be382a80463348137d8cb8f52a37f2c415f24ad --- self-extractors/extract-lists.txt | 2 +- self-extractors/google_devices/staging/Android.mk | 2 +- self-extractors/google_devices/staging/device-partial.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/self-extractors/extract-lists.txt b/self-extractors/extract-lists.txt index e09731b..63655a4 100644 --- a/self-extractors/extract-lists.txt +++ b/self-extractors/extract-lists.txt @@ -10,7 +10,7 @@ system_ext/lib64/libmediaadaptor.so \ system_ext/priv-app/ShannonRcs/ShannonRcs.apk \ system_ext/priv-app/ShannonIms/ShannonIms.apk \ - system_ext/priv-app/QualifiedNetworksService/QualifiedNetworksService.apk \ + system_ext/priv-app/PixelQualifiedNetworksService/PixelQualifiedNetworksService.apk \ " ;; diff --git a/self-extractors/google_devices/staging/Android.mk b/self-extractors/google_devices/staging/Android.mk index 6142995..a720400 100644 --- a/self-extractors/google_devices/staging/Android.mk +++ b/self-extractors/google_devices/staging/Android.mk @@ -24,7 +24,7 @@ endif ifneq ($(filter lynx,$(TARGET_DEVICE)),) include $(CLEAR_VARS) LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX) -LOCAL_MODULE := QualifiedNetworksService +LOCAL_MODULE := PixelQualifiedNetworksService LOCAL_MODULE_TAGS := optional LOCAL_BUILT_MODULE_STEM := package.apk LOCAL_SYSTEM_EXT_MODULE := true diff --git a/self-extractors/google_devices/staging/device-partial.mk b/self-extractors/google_devices/staging/device-partial.mk index 7f1e7e3..d4e5924 100644 --- a/self-extractors/google_devices/staging/device-partial.mk +++ b/self-extractors/google_devices/staging/device-partial.mk @@ -17,7 +17,7 @@ PRODUCT_SOONG_NAMESPACES += \ # AOSP packages required by the blobs PRODUCT_PACKAGES := \ - QualifiedNetworksService \ + PixelQualifiedNetworksService \ ShannonIms \ ShannonRcs \ -- cgit v1.2.3 From 7e6ec4cb7b3b011669289e9030a568f4cca0b39e Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Sun, 4 Jun 2023 02:34:39 +0000 Subject: Update lynx SVN to 10 Bug: 285692955 Change-Id: Ie807b68b6de7c7c007ff5e2ba0cf7e8ad71d61d4 --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index cfdd323..2a43665 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -199,7 +199,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=9 + ro.vendor.build.svn=10 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 31c933523c946e25642d0bd0d6e122454e7da301 Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Sun, 4 Jun 2023 02:35:08 +0000 Subject: Update lynx SVN to 11 Bug: 285692955 Change-Id: I5838083d9824bedf1988bf2d5b6ddc32315b52da --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 2a43665..84cefcb 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -199,7 +199,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=10 + ro.vendor.build.svn=11 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 599c4d1bd84905fb177f00b4380cb57e71946e13 Mon Sep 17 00:00:00 2001 From: paulsu Date: Mon, 5 Jun 2023 04:20:41 +0000 Subject: Create group throttle powerhint Test: Local test Bug: 280258727 Change-Id: I1e767f78b85a04cde8f048885af2d129a01321a8 Signed-off-by: paulsu --- powerhint.json | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/powerhint.json b/powerhint.json index 6bf6da8..fb56bb1 100644 --- a/powerhint.json +++ b/powerhint.json @@ -603,6 +603,26 @@ "0,1,2,3,4,5,6,7" ], "Type": "Property" + }, + { + "Name": "Dex2oatGroup", + "Path": "/proc/vendor_sched/dex2oat_ug", + "Values": [ + "1", + "0" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "UgBgGroupThrottle", + "Path": "/proc/vendor_sched/ug_bg_group_throttle", + "Values": [ + "512", + "308" + ], + "DefaultIndex": 0, + "ResetOnInit": true } ], "Actions": [ @@ -1668,6 +1688,12 @@ "Duration": 0, "Value": "0,1,2,3" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_LIGHT", + "Node": "Dex2oatGroup", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_MODERATE", "Node": "PMU_POLL", @@ -1746,6 +1772,12 @@ "Duration": 0, "Value": "0,1,2,3" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_MODERATE", + "Node": "Dex2oatGroup", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_SEVERE", "Node": "PMU_POLL", @@ -1824,6 +1856,12 @@ "Duration": 0, "Value": "0,1,2,3" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_SEVERE", + "Node": "Dex2oatGroup", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_CRITICAL", "Node": "PMU_POLL", @@ -1902,6 +1940,12 @@ "Duration": 0, "Value": "0,1,2,3" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_CRITICAL", + "Node": "Dex2oatGroup", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_EMERGENCY", "Node": "PMU_POLL", @@ -1998,6 +2042,12 @@ "Duration": 0, "Value": "0,1,2,3" }, + { + "PowerHint": "THERMAL_VIRTUAL-SKIN-HINT_EMERGENCY", + "Node": "Dex2oatGroup", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "FACE_UNLOCK_BOOST", "Node": "CPU_LITTLE_TSKIN_BYPASS", -- cgit v1.2.3 From f02a020ea138855fd996e13b4fff5062a6ff7b3a Mon Sep 17 00:00:00 2001 From: David Li Date: Thu, 8 Jun 2023 16:19:07 +0800 Subject: audio: enable offloaded DPE Bug: 286353167 Test: n/a Change-Id: Ie448325dd8043a3f4e6537183085f636cd959386 --- audio/lynx/config/audio_effects.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audio/lynx/config/audio_effects.xml b/audio/lynx/config/audio_effects.xml index 1718057..9c2ba29 100644 --- a/audio/lynx/config/audio_effects.xml +++ b/audio/lynx/config/audio_effects.xml @@ -5,7 +5,7 @@ - + @@ -45,12 +45,15 @@ + + + + - -- cgit v1.2.3 From 3eb0dc523fe5c9d61c1c501bf97529b5f532c690 Mon Sep 17 00:00:00 2001 From: paulsu Date: Wed, 14 Jun 2023 05:19:42 +0000 Subject: Remove UgBgGroupThrottle node to keep ug_bg_group_throttle 308 by default Bug: 280258727 Test: Found regression in b/286002292, local test. Change-Id: Ief3d1bded3add877b23b4c2b211cef6d5a9eaf57 Signed-off-by: paulsu --- powerhint.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/powerhint.json b/powerhint.json index fb56bb1..5a7b1f9 100644 --- a/powerhint.json +++ b/powerhint.json @@ -613,16 +613,6 @@ ], "DefaultIndex": 0, "ResetOnInit": true - }, - { - "Name": "UgBgGroupThrottle", - "Path": "/proc/vendor_sched/ug_bg_group_throttle", - "Values": [ - "512", - "308" - ], - "DefaultIndex": 0, - "ResetOnInit": true } ], "Actions": [ -- cgit v1.2.3 From 4766ddbc2b2021e9a7607fade3fc1f7c85a068d8 Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Thu, 29 Jun 2023 20:57:10 +0000 Subject: Update lynx SVN to 12 Bug: 289414927 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6cf45075996b2ba74664880a40100fcad35bbf8a) Merged-In: Id1c1deb4b83db651e2bbeea318bb6f968b6e31dd Change-Id: Id1c1deb4b83db651e2bbeea318bb6f968b6e31dd --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 1e3e4d2..5e9a850 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=11 + ro.vendor.build.svn=12 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 6f4f9bf95ea40d28cf86f3d8f42ce2cc7307b228 Mon Sep 17 00:00:00 2001 From: Bassem Khalife Date: Sat, 5 Aug 2023 12:59:15 +0000 Subject: Update lynx SVN to 13 Bug: 289414927 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6f660f6b03225acdfd9774549d9ab6102ca14028) Merged-In: I237e43527c64121f830753e113c26dbab51ff47a Change-Id: I237e43527c64121f830753e113c26dbab51ff47a --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 5e9a850..b63fa81 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=12 + ro.vendor.build.svn=13 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 2fba189428095d0943fc10ede5671be013fae2d0 Mon Sep 17 00:00:00 2001 From: Bassem Khalife Date: Sat, 5 Aug 2023 12:59:15 +0000 Subject: Update lynx SVN to 13 Bug: 289414927 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6f660f6b03225acdfd9774549d9ab6102ca14028) Merged-In: I237e43527c64121f830753e113c26dbab51ff47a Change-Id: I237e43527c64121f830753e113c26dbab51ff47a --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 5e9a850..b63fa81 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=12 + ro.vendor.build.svn=13 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 8713880edf17436eb8195cb878b311668b44c243 Mon Sep 17 00:00:00 2001 From: Bassem Khalife Date: Sat, 5 Aug 2023 12:59:15 +0000 Subject: Update lynx SVN to 13 Bug: 289414927 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6f660f6b03225acdfd9774549d9ab6102ca14028) Merged-In: I237e43527c64121f830753e113c26dbab51ff47a Change-Id: I237e43527c64121f830753e113c26dbab51ff47a --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 5e9a850..b63fa81 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=12 + ro.vendor.build.svn=13 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From c632b3404575b9c9980b7719f513de77fd8b6f5e Mon Sep 17 00:00:00 2001 From: Bassem Khalife Date: Wed, 9 Aug 2023 18:11:16 +0000 Subject: Update lynx SVN to 14 Bug: 289414927 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fcb876920cd88f13dd3232f8226e48fda15189c2) Merged-In: Id791daa1eb536dbc913662b5ce143c617eab92f1 Change-Id: Id791daa1eb536dbc913662b5ce143c617eab92f1 --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index b63fa81..f065078 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=13 + ro.vendor.build.svn=14 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From a09cd830e1c5d3f6bad9b3cff6fd77f81c7a45e5 Mon Sep 17 00:00:00 2001 From: Bassem Khalife Date: Thu, 10 Aug 2023 19:57:59 +0000 Subject: Update lynx SVN to 15 Bug: 289414927 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:298ba980a2bfcc3b0628cee69670f2c3e35f626b) Merged-In: I8981f42c3b0b8ba9e5246c0aaedaafc5d7bfe71a Change-Id: I8981f42c3b0b8ba9e5246c0aaedaafc5d7bfe71a --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index f065078..7b87027 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=14 + ro.vendor.build.svn=15 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 1f4d52a4ab5769b167bd9f093fc9fef675e45ce4 Mon Sep 17 00:00:00 2001 From: Bassem Khalife Date: Thu, 10 Aug 2023 19:57:59 +0000 Subject: Update lynx SVN to 15 Bug: 289414927 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:298ba980a2bfcc3b0628cee69670f2c3e35f626b) Merged-In: I8981f42c3b0b8ba9e5246c0aaedaafc5d7bfe71a Change-Id: I8981f42c3b0b8ba9e5246c0aaedaafc5d7bfe71a --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index f065078..7b87027 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=14 + ro.vendor.build.svn=15 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 926a265425c541edb9b1ff09d9e9be71f5c6c3fc Mon Sep 17 00:00:00 2001 From: Bassem Khalife Date: Thu, 10 Aug 2023 19:57:59 +0000 Subject: Update lynx SVN to 15 Bug: 289414927 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:298ba980a2bfcc3b0628cee69670f2c3e35f626b) Merged-In: I8981f42c3b0b8ba9e5246c0aaedaafc5d7bfe71a Change-Id: I8981f42c3b0b8ba9e5246c0aaedaafc5d7bfe71a --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index f065078..7b87027 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=14 + ro.vendor.build.svn=15 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 65490d791d5da1277ed92f769b95c48787d85211 Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Tue, 15 Aug 2023 00:11:37 +0000 Subject: Update lynx SVN to 16 Bug: 295937899 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cd45a63aaffa3c0dc714b9d51d1727cca682dbc6) Merged-In: Icb163819116e61292429a2c1c362d40649a6f7e8 Change-Id: Icb163819116e61292429a2c1c362d40649a6f7e8 --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 7b87027..003748e 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=15 + ro.vendor.build.svn=16 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 17bb9133e004b99c57ef3bcfc44f821d8cc90cf1 Mon Sep 17 00:00:00 2001 From: Edwin Tung Date: Thu, 27 Jul 2023 13:45:33 +0800 Subject: gps: Disable Vzw SUPL OTDOA Bug: 293213801 Test: OTDOA disabled (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7a3b1491fe6cf7d70a641d3f0e4fb7e7f816e22f) Merged-In: If504f67da0640634ff30379a14af4e15f062fefa Change-Id: If504f67da0640634ff30379a14af4e15f062fefa --- location/gps.xml.l10 | 2 +- location/gps_user.xml.l10 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/location/gps.xml.l10 b/location/gps.xml.l10 index 3463633..c51fd4d 100644 --- a/location/gps.xml.l10 +++ b/location/gps.xml.l10 @@ -35,7 +35,7 @@ SuplVersion="2" SuplMinorVersion="0" SuplOtdoaCapable="true" - SuplOtdoaCapable2="true" + SuplOtdoaCapable2="false" SuplGlonassCapable = "true" SuplGalileoCapable = "true" SuplBdsCapable = "true" diff --git a/location/gps_user.xml.l10 b/location/gps_user.xml.l10 index f877c95..b996bf0 100644 --- a/location/gps_user.xml.l10 +++ b/location/gps_user.xml.l10 @@ -34,7 +34,7 @@ SuplVersion="2" SuplMinorVersion="0" SuplOtdoaCapable="true" - SuplOtdoaCapable2="true" + SuplOtdoaCapable2="false" SuplGlonassCapable = "true" SuplGalileoCapable = "true" SuplBdsCapable = "true" -- cgit v1.2.3 From 9f9b5e4b402e6b21a1352a96f50aeb2f2dc1740b Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Wed, 16 Aug 2023 05:39:32 +0000 Subject: Update lynx SVN to 17 Bug: 295937899 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:75f1a483a673e7946fdeda74700feb74a771669e) Merged-In: Iffadfd1f436b5ce27c2332a68f6d8d7c5b76507e Change-Id: Iffadfd1f436b5ce27c2332a68f6d8d7c5b76507e --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 003748e..c33a12c 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=16 + ro.vendor.build.svn=17 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From e62accf52118ebd1e203980a18aff04724454ce7 Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Wed, 16 Aug 2023 05:39:32 +0000 Subject: Update lynx SVN to 17 Bug: 295937899 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:75f1a483a673e7946fdeda74700feb74a771669e) Merged-In: Iffadfd1f436b5ce27c2332a68f6d8d7c5b76507e Change-Id: Iffadfd1f436b5ce27c2332a68f6d8d7c5b76507e --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 003748e..c33a12c 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=16 + ro.vendor.build.svn=17 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 2c87b60f23bc53a893e875429cd5b2811e050967 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Mon, 28 Aug 2023 13:06:44 -0700 Subject: Add aosp_lynx_hwasan Bug: 297918380 Change-Id: I0dfd9d498a0a989355ca76d561fa267d41e1cd3b --- AndroidProducts.mk | 1 + aosp_lynx_hwasan.mk | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 aosp_lynx_hwasan.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 2a82dde..c6046a3 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -16,6 +16,7 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/aosp_lynx.mk \ + $(LOCAL_DIR)/aosp_lynx_hwasan.mk \ $(LOCAL_DIR)/factory_lynx.mk COMMON_LUNCH_CHOICES := \ diff --git a/aosp_lynx_hwasan.mk b/aosp_lynx_hwasan.mk new file mode 100644 index 0000000..d0845b6 --- /dev/null +++ b/aosp_lynx_hwasan.mk @@ -0,0 +1,23 @@ +# +# Copyright 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +$(call inherit-product, device/google/lynx/aosp_lynx.mk) +PRODUCT_NAME := aosp_lynx_hwasan + +# Add "hwaddress" as a global sanitizer if it's missing. +ifeq ($(filter hwaddress,$(SANITIZE_TARGET)),) + SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) hwaddress) +endif -- cgit v1.2.3 From bff662971bc2adb9d9d2544d0c1b36008792580b Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Wed, 16 Aug 2023 05:39:32 +0000 Subject: Update lynx SVN to 17 Bug: 295937899 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:75f1a483a673e7946fdeda74700feb74a771669e) Merged-In: Iffadfd1f436b5ce27c2332a68f6d8d7c5b76507e Change-Id: Iffadfd1f436b5ce27c2332a68f6d8d7c5b76507e --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 003748e..c33a12c 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=16 + ro.vendor.build.svn=17 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From f34a8693061f0516ccd97c3621bae94d21519dd1 Mon Sep 17 00:00:00 2001 From: Lokesh Kumar Goel Date: Wed, 16 Aug 2023 05:39:32 +0000 Subject: Update lynx SVN to 17 Bug: 295937899 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:75f1a483a673e7946fdeda74700feb74a771669e) Merged-In: Iffadfd1f436b5ce27c2332a68f6d8d7c5b76507e Change-Id: Iffadfd1f436b5ce27c2332a68f6d8d7c5b76507e --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 003748e..c33a12c 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -203,7 +203,7 @@ PRODUCT_VENDOR_PROPERTIES += \ # Increment the SVN for any official public releases PRODUCT_VENDOR_PROPERTIES += \ - ro.vendor.build.svn=16 + ro.vendor.build.svn=17 # Set support hide display cutout feature PRODUCT_PRODUCT_PROPERTIES += \ -- cgit v1.2.3 From 22ea3c2b4e1a7b050bb5b0eddbb1239526a9eae8 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Mon, 9 Oct 2023 12:45:59 -0700 Subject: lynx: Replace NFC app with NFC apex Bug: 303286040 Test: Compiles Merged-In: Id85d62a10589765dffa293770bca9d0906eb2973 Change-Id: Id85d62a10589765dffa293770bca9d0906eb2973 --- device-lynx.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device-lynx.mk b/device-lynx.mk index 254f99c..5bc4abd 100644 --- a/device-lynx.mk +++ b/device-lynx.mk @@ -76,7 +76,7 @@ PRODUCT_COPY_FILES += \ device/google/lynx/nfc/libnfc-nci-lynx.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf PRODUCT_PACKAGES += \ - NfcNci \ + com.android.nfcservices \ Tag \ android.hardware.nfc-service.st -- cgit v1.2.3