projects/WeTek_Play: add a patch to allow use of WeTek Pro Remote simultaneously with the stock remote

This commit is contained in:
Alex Deryskyba 2018-04-09 17:57:25 +03:00
parent da19c99313
commit a9aebc1fe1

View File

@ -0,0 +1,22 @@
diff --git a/drivers/amlogic/input/remote/am_remote.c b/drivers/amlogic/input/remote/am_remote.c
index c824efb2fe7..3ccb16975c2 100755
--- a/drivers/amlogic/input/remote/am_remote.c
+++ b/drivers/amlogic/input/remote/am_remote.c
@@ -352,7 +352,7 @@ static inline int remote_hw_reprot_key(struct remote *remote_data)
key_hold = -1;
if (scan_code) { //key first press
last_custom_code = scan_code & 0xffff;
- if (remote_data->custom_code != last_custom_code) {
+ if (remote_data->custom_code != last_custom_code && last_custom_code != 0xfe01) {
input_dbg("Wrong custom code is 0x%08x\n", scan_code);
return -1;
}
@@ -385,7 +385,7 @@ static inline int remote_hw_reprot_key(struct remote *remote_data)
} else if (scan_code == 0 && status & 0x1) { //repeate key
scan_code = last_scan_code;
- if (remote_data->custom_code != last_custom_code) {
+ if (remote_data->custom_code != last_custom_code && last_custom_code != 0xfe01) {
return -1;
}
#ifdef CONFIG_AML_HDMI_TX