sm7250-common: libqti-perfd-client: return a dummy value

Return a positive integer for perf lock acquire and release so
that Goodix/FPC fingerprint sensor blobs will not complain.

Goodix:
E [goodixHAL][gf_hal_milan_f_series]: goodix_perf_lock_acquire: Failed to acquire perf lock, err: 0
E [goodixHAL][gf_hal_milan_f_series]: goodix_perf_lock_release: Perf lock release error 0

FPC:
E fpc_tac : fpc_perf_lock_acquire: Incorrect params, Failed to acquire perf lock, err
E fpc_tac : fpc_perf_lock_release: Perf lock release error 0

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
Change-Id: I861672e9a738c2204755d802670f4b28b662f286
This commit is contained in:
Chenyang Zhong 2021-05-13 03:05:45 -04:00 committed by xSylla
parent 53fe0183cd
commit 25e8b87a42
2 changed files with 19 additions and 2 deletions

View File

@ -11,6 +11,7 @@ cc_library_shared {
"-Wall",
],
shared_libs: [
"liblog",
"libutils",
],
}

View File

@ -1,8 +1,24 @@
#define LOG_TAG "libqti-perfd-client"
#include <stdint.h>
#include <log/log.h>
extern "C" void perf_get_feedback() {}
extern "C" void perf_hint() {}
extern "C" void perf_lock_acq() {}
extern "C" int perf_lock_acq(int handle, int duration, int arg3[], int arg4) {
ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d",
handle, duration, arg3[0], arg4);
if (handle > 0)
return handle;
return 233;
}
extern "C" void perf_lock_cmd() {}
extern "C" void perf_lock_rel() {}
extern "C" int perf_lock_rel(int handle) {
ALOGI("perf_lock_rel: handle: %d", handle);
if (handle > 0)
return handle;
return 233;
}
extern "C" void perf_lock_use_profile() {}