diff --git a/aidl/mtkpower/Android.bp b/aidl/mtkpower/Android.bp new file mode 100644 index 0000000..d34ef83 --- /dev/null +++ b/aidl/mtkpower/Android.bp @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +aidl_interface { + name: "vendor.mediatek.hardware.mtkpower", + vendor_available: true, + srcs: ["vendor/mediatek/hardware/mtkpower/*.aidl"], + stability: "vintf", + owner: "mediatek", + + backend: { + cpp: { + enabled: true, + }, + java: { + sdk_version: "module_current", + }, + }, + versions_with_info: [ + { + version: "1", + imports: [], + }, + ], +} diff --git a/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/.hash b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/.hash new file mode 100644 index 0000000..efb4666 --- /dev/null +++ b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/.hash @@ -0,0 +1 @@ +467acd9434d0afec502dd4bb33140f0d98025d29 diff --git a/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl new file mode 100644 index 0000000..fd4df91 --- /dev/null +++ b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.mediatek.hardware.mtkpower; +@VintfStability +interface IMtkPerf { + int perfCusLockHint(in int hint, in int duration); + int perfLockAcquire(in int pl_handle, in int duration, in int[] boostsList, in int reserved); + oneway void perfLockRelease(in int pl_handle, in int reserved); + int perfLockReleaseSync(in int pl_handle, in int reserved); +} diff --git a/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl new file mode 100644 index 0000000..f5dd848 --- /dev/null +++ b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.mediatek.hardware.mtkpower; +@VintfStability +interface IMtkPowerCallback { + oneway void mtkPowerHint(in int hint, in int duration); + oneway void notifyAppState(in String pack, in String act, in int pid, in int state, + in int uid); + oneway void notifyScnUpdate(in int hint, in int data); +} diff --git a/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl new file mode 100644 index 0000000..016bc0c --- /dev/null +++ b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/1/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.mediatek.hardware.mtkpower; +import vendor.mediatek.hardware.mtkpower.IMtkPowerCallback; +@VintfStability +interface IMtkPowerService { + oneway void mtkCusPowerHint(in int hint, in int data); + oneway void mtkPowerHint(in int hint, in int data); + oneway void notifyAppState(in String pack, in String act, in int pid, in int state, + in int uid); + int querySysInfo(in int cmd, in int param); + int setMtkPowerCallback(in IMtkPowerCallback callback); + int setMtkScnUpdateCallback(in int hint, in IMtkPowerCallback callback); + int setSysInfo(in int type, in String data); + void setSysInfoAsync(in int type, in String data); +} diff --git a/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl new file mode 100644 index 0000000..313aeb0 --- /dev/null +++ b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.mediatek.hardware.mtkpower; +@VintfStability +interface IMtkPerf { + int perfCusLockHint(in int hint, in int duration); + int perfLockAcquire(in int pl_handle, in int duration, in int[] boostsList, in int reserved); + oneway void perfLockRelease(in int pl_handle, in int reserved); + int perfLockReleaseSync(in int pl_handle, in int reserved); +} diff --git a/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl new file mode 100644 index 0000000..9b3c26a --- /dev/null +++ b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.mediatek.hardware.mtkpower; +@VintfStability +interface IMtkPowerCallback { + oneway void mtkPowerHint(in int hint, in int duration); + oneway void notifyAppState(in String pack, in String act, in int pid, in int state, in int uid); + oneway void notifyScnUpdate(in int hint, in int data); +} diff --git a/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl new file mode 100644 index 0000000..bb52679 --- /dev/null +++ b/aidl/mtkpower/aidl_api/vendor.mediatek.hardware.mtkpower/current/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ +/////////////////////////////////////////////////////////////////////////////// +// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. // +/////////////////////////////////////////////////////////////////////////////// + +// This file is a snapshot of an AIDL file. Do not edit it manually. There are +// two cases: +// 1). this is a frozen version file - do not edit this in any case. +// 2). this is a 'current' file. If you make a backwards compatible change to +// the interface (from the latest frozen version), the build system will +// prompt you to update this file with `m -update-api`. +// +// You must not make a backward incompatible change to any AIDL file built +// with the aidl_interface module type with versions property set. The module +// type is used to build AIDL files in a way that they can be used across +// independently updatable components of the system. If a device is shipped +// with such a backward incompatible change, it has a high risk of breaking +// later when a module using the interface is updated, e.g., Mainline modules. + +package vendor.mediatek.hardware.mtkpower; +@VintfStability +interface IMtkPowerService { + oneway void mtkCusPowerHint(in int hint, in int data); + oneway void mtkPowerHint(in int hint, in int data); + oneway void notifyAppState(in String pack, in String act, in int pid, in int state, in int uid); + int querySysInfo(in int cmd, in int param); + int setMtkPowerCallback(in vendor.mediatek.hardware.mtkpower.IMtkPowerCallback callback); + int setMtkScnUpdateCallback(in int hint, in vendor.mediatek.hardware.mtkpower.IMtkPowerCallback callback); + int setSysInfo(in int type, in String data); + void setSysInfoAsync(in int type, in String data); +} diff --git a/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl b/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl new file mode 100644 index 0000000..9e231a1 --- /dev/null +++ b/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPerf.aidl @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +package vendor.mediatek.hardware.mtkpower; + +@VintfStability +interface IMtkPerf { + int perfCusLockHint(in int hint, in int duration); + int perfLockAcquire(in int pl_handle, in int duration, in int[] boostsList, in int reserved); + oneway void perfLockRelease(in int pl_handle, in int reserved); + int perfLockReleaseSync(in int pl_handle, in int reserved); +} diff --git a/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl b/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl new file mode 100644 index 0000000..91eafd7 --- /dev/null +++ b/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPowerCallback.aidl @@ -0,0 +1,15 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +package vendor.mediatek.hardware.mtkpower; + +@VintfStability +interface IMtkPowerCallback { + oneway void mtkPowerHint(in int hint, in int duration); + oneway void notifyAppState(in String pack, in String act, in int pid, in int state, + in int uid); + oneway void notifyScnUpdate(in int hint, in int data); +} diff --git a/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl b/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl new file mode 100644 index 0000000..ffcf3d3 --- /dev/null +++ b/aidl/mtkpower/vendor/mediatek/hardware/mtkpower/IMtkPowerService.aidl @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2024 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +package vendor.mediatek.hardware.mtkpower; + +import vendor.mediatek.hardware.mtkpower.IMtkPowerCallback; + +@VintfStability +interface IMtkPowerService { + oneway void mtkCusPowerHint(in int hint, in int data); + oneway void mtkPowerHint(in int hint, in int data); + oneway void notifyAppState(in String pack, in String act, in int pid, in int state, + in int uid); + int querySysInfo(in int cmd, in int param); + int setMtkPowerCallback(in IMtkPowerCallback callback); + int setMtkScnUpdateCallback(in int hint, in IMtkPowerCallback callback); + int setSysInfo(in int type, in String data); + void setSysInfoAsync(in int type, in String data); +}