diff --git a/audio/cheetah/config/mixer_paths.xml b/audio/cheetah/config/mixer_paths.xml index b268f0f..7cccf52 100644 --- a/audio/cheetah/config/mixer_paths.xml +++ b/audio/cheetah/config/mixer_paths.xml @@ -105,6 +105,12 @@ + + + + + + @@ -635,6 +641,14 @@ + + + + + + + + @@ -643,12 +657,21 @@ - - + + + + + + + + + - + + + @@ -656,6 +679,12 @@ + + + + + + diff --git a/audio/cheetah/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin b/audio/cheetah/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin index ed74bad..8d6fb23 100644 Binary files a/audio/cheetah/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin and b/audio/cheetah/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin differ diff --git a/audio/cheetah/cs35l41/fw/cs35l41-dsp1-spk-prot.bin b/audio/cheetah/cs35l41/fw/cs35l41-dsp1-spk-prot.bin index 75ebae3..e972b87 100644 Binary files a/audio/cheetah/cs35l41/fw/cs35l41-dsp1-spk-prot.bin and b/audio/cheetah/cs35l41/fw/cs35l41-dsp1-spk-prot.bin differ diff --git a/audio/cheetah/cs35l41/fw/fast_switch1.txt b/audio/cheetah/cs35l41/fw/fast_switch1.txt new file mode 100644 index 0000000..00d4d29 --- /dev/null +++ b/audio/cheetah/cs35l41/fw/fast_switch1.txt @@ -0,0 +1 @@ +11,4,768,1236,222608,131072,2167332,1,7,0,629947780 \ No newline at end of file diff --git a/audio/cheetah/cs35l41/fw/fast_switch2.txt b/audio/cheetah/cs35l41/fw/fast_switch2.txt new file mode 100644 index 0000000..1d7bd81 --- /dev/null +++ b/audio/cheetah/cs35l41/fw/fast_switch2.txt @@ -0,0 +1 @@ +11,4,768,1236,222608,135168,2167332,1,7,0,919471758 \ No newline at end of file diff --git a/audio/cheetah/cs35l41/fw/fast_switch3.txt b/audio/cheetah/cs35l41/fw/fast_switch3.txt new file mode 100644 index 0000000..671662e --- /dev/null +++ b/audio/cheetah/cs35l41/fw/fast_switch3.txt @@ -0,0 +1 @@ +11,4,768,1236,222608,131328,2167332,1,7,4194304,35123929 \ No newline at end of file diff --git a/audio/cheetah/cs35l41/fw/fast_switch4.txt b/audio/cheetah/cs35l41/fw/fast_switch4.txt new file mode 100644 index 0000000..61d8dca --- /dev/null +++ b/audio/cheetah/cs35l41/fw/fast_switch4.txt @@ -0,0 +1 @@ +11,4,768,1236,222608,135424,2167332,1,7,4194304,290834899 \ No newline at end of file diff --git a/audio/panther/config/mixer_paths.xml b/audio/panther/config/mixer_paths.xml index b268f0f..7cccf52 100644 --- a/audio/panther/config/mixer_paths.xml +++ b/audio/panther/config/mixer_paths.xml @@ -105,6 +105,12 @@ + + + + + + @@ -635,6 +641,14 @@ + + + + + + + + @@ -643,12 +657,21 @@ - - + + + + + + + + + - + + + @@ -656,6 +679,12 @@ + + + + + + diff --git a/audio/panther/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin b/audio/panther/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin index 797bfc5..0cb054e 100644 Binary files a/audio/panther/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin and b/audio/panther/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin differ diff --git a/audio/panther/cs35l41/fw/cs35l41-dsp1-spk-prot.bin b/audio/panther/cs35l41/fw/cs35l41-dsp1-spk-prot.bin index b688240..a29b144 100644 Binary files a/audio/panther/cs35l41/fw/cs35l41-dsp1-spk-prot.bin and b/audio/panther/cs35l41/fw/cs35l41-dsp1-spk-prot.bin differ diff --git a/audio/panther/cs35l41/fw/fast_switch1.txt b/audio/panther/cs35l41/fw/fast_switch1.txt new file mode 100644 index 0000000..d6a7551 --- /dev/null +++ b/audio/panther/cs35l41/fw/fast_switch1.txt @@ -0,0 +1 @@ +11,4,768,1236,157072,131072,2167332,1,7,0,849631556 \ No newline at end of file diff --git a/audio/panther/cs35l41/fw/fast_switch2.txt b/audio/panther/cs35l41/fw/fast_switch2.txt new file mode 100644 index 0000000..9ebe3be --- /dev/null +++ b/audio/panther/cs35l41/fw/fast_switch2.txt @@ -0,0 +1 @@ +11,4,768,1236,157072,135168,2167332,1,7,0,568746574 \ No newline at end of file diff --git a/audio/panther/cs35l41/fw/fast_switch3.txt b/audio/panther/cs35l41/fw/fast_switch3.txt new file mode 100644 index 0000000..97006ef --- /dev/null +++ b/audio/panther/cs35l41/fw/fast_switch3.txt @@ -0,0 +1 @@ +11,4,768,1236,157072,131328,2167332,1,7,4194304,356488729 \ No newline at end of file diff --git a/audio/panther/cs35l41/fw/fast_switch4.txt b/audio/panther/cs35l41/fw/fast_switch4.txt new file mode 100644 index 0000000..2bbc374 --- /dev/null +++ b/audio/panther/cs35l41/fw/fast_switch4.txt @@ -0,0 +1 @@ +11,4,768,1236,157072,135424,2167332,1,7,4194304,108899603 \ No newline at end of file diff --git a/conf/init.cheetah.rc b/conf/init.cheetah.rc index cf1af49..af53fa9 100644 --- a/conf/init.cheetah.rc +++ b/conf/init.cheetah.rc @@ -32,3 +32,9 @@ 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/class/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs/high_sensitivity 1 + +# 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. +on property:ro.boot.hardware.sku=GFE4J + setprop audio.camerasound.force true diff --git a/conf/init.panther.rc b/conf/init.panther.rc index b3cc621..8d2bf97 100644 --- a/conf/init.panther.rc +++ b/conf/init.panther.rc @@ -12,3 +12,9 @@ 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 /proc/focaltech_touch/high_sensitivity 1 + +# 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. +on property:ro.boot.hardware.sku=G03Z5 + setprop audio.camerasound.force true diff --git a/device-cheetah.mk b/device-cheetah.mk index cefd34e..dbe924c 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -39,6 +39,7 @@ $(call soong_config_set,lyric,tuning_product,cheetah) $(call soong_config_set,google3a_config,target_device,cheetah) PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.support_kernel_idle_timer=true +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.ignore_hdr_camera_layers=true # Init files PRODUCT_COPY_FILES += \ diff --git a/device-panther.mk b/device-panther.mk index 075f5ea..979ef35 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -175,6 +175,7 @@ endif # Display PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=1500 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.ignore_hdr_camera_layers=true # WiFi Overlay PRODUCT_PACKAGES += \ diff --git a/powerstats/cheetah/service.cpp b/powerstats/cheetah/service.cpp index a7b0824..2f9e715 100644 --- a/powerstats/cheetah/service.cpp +++ b/powerstats/cheetah/service.cpp @@ -27,6 +27,7 @@ #include #include #include +#include using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider; using aidl::android::hardware::power::stats::EnergyConsumerType; @@ -100,6 +101,8 @@ void addUwb(std::shared_ptr p) { } int main() { + struct stat buffer; + LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting."; // single thread @@ -110,8 +113,20 @@ int main() { addGs201CommonDataProviders(p); addDisplay(p); addUwb(p); - addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-4/i2c-st21nfc/power_stats"); + 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()); LOG_ALWAYS_FATAL_IF(status != STATUS_OK); diff --git a/powerstats/panther/service.cpp b/powerstats/panther/service.cpp index 094db17..ed76ca3 100644 --- a/powerstats/panther/service.cpp +++ b/powerstats/panther/service.cpp @@ -26,6 +26,7 @@ #include #include #include +#include using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider; using aidl::android::hardware::power::stats::EnergyConsumerType; @@ -57,6 +58,8 @@ void addDisplay(std::shared_ptr p) { } int main() { + struct stat buffer; + LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting."; // single thread @@ -66,8 +69,20 @@ int main() { addGs201CommonDataProviders(p); addDisplay(p); - addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-4/i2c-st21nfc/power_stats"); + 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()); LOG_ALWAYS_FATAL_IF(status != STATUS_OK); diff --git a/powerstats/ravenclaw/service.cpp b/powerstats/ravenclaw/service.cpp index e3196da..0f6db94 100644 --- a/powerstats/ravenclaw/service.cpp +++ b/powerstats/ravenclaw/service.cpp @@ -26,6 +26,7 @@ #include #include #include +#include using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider; using aidl::android::hardware::power::stats::EnergyConsumerType; @@ -61,6 +62,8 @@ void addDisplay(std::shared_ptr p) { } int main() { + struct stat buffer; + LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting."; // single thread @@ -70,8 +73,20 @@ int main() { addGs201CommonDataProviders(p); addDisplay(p); - addNFC(p, "/sys/devices/platform/10970000.hsi2c/i2c-4/i2c-st21nfc/power_stats"); + 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()); LOG_ALWAYS_FATAL_IF(status != STATUS_OK);