void aml_set_audio_passthrough(bool passthrough) { if (aml_present()) { int raw = aml_get_cputype() < 3 ? 1:2; aml_set_sysfs_int("/sys/class/audiodsp/digital_raw", passthrough ? raw:0); } }
void aml_cpufreq_max(bool limit) { if (!aml_wired_present() && aml_get_cputype() > 3) { // this is a MX Stick, they cannot substain 1GHz // operation without overheating so limit them to 800MHz. int cpufreq = 1000000; if (limit) cpufreq = 800000; aml_set_sysfs_int("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", cpufreq); aml_set_sysfs_str("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", "ondemand"); } }
void aml_cpufreq_min(bool limit) { // do not touch scaling_min_freq on android #if !defined(TARGET_ANDROID) // only needed for m1/m3 SoCs if (aml_get_cputype() <= 3) { int cpufreq = 300000; if (limit) cpufreq = 600000; aml_set_sysfs_int("/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", cpufreq); } #endif }
CPivosPowerSyscall::CPivosPowerSyscall() { if (aml_get_cputype() == 1) { m_CanPowerdown = true; m_CanSuspend = false; } else { m_CanPowerdown = false; m_CanSuspend = true; } m_CanHibernate = false; m_CanReboot = true; m_OnResume = false; m_OnSuspend = false; }