Skip to content

Commit

Permalink
Merge pull request #2642 from codesnake/wp1_pro_remote_fix
Browse files Browse the repository at this point in the history
[LE 8.2] WeTek_Play: Fix WeTek Pro Remote
  • Loading branch information
chewitt authored Apr 9, 2018
2 parents da19c99 + 57a1395 commit a5812da
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 82 deletions.
45 changes: 45 additions & 0 deletions packages/sysutils/amremote/config/libreelec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,51 @@ debug_enable = 1
reg_control = 0xfbe40

key_begin
# OpenELEC Box remote
0xdb 116 ;POWER

# WeTek Pro Remote
0x0c 116 # power
0x2a 398 # red
0x2b 399 # green
0x2c 400 # yellow
0x2d 401 # blue
0x11 168 # rewind
0x12 164 # play/pause
0x13 208 # fast forward
0x14 167 # record
0x17 139 # menu
0x1a 15 # app switch
0x29 102 # home
0x1d 158 # back
0x0f 370 # subtitles
0x27 113 # volume mute
0x10 388 # teletext
0x0b 366 # recordings
0x28 358 # info
0x0a 218 # share
0x22 103 # up
0x23 108 # down
0x24 105 # left
0x25 106 # right
0x26 28 # ok
0x1e 115 # volume up
0x1f 114 # volume down
0x20 104 # channel up
0x21 109 # channel down
0x01 2 # 1
0x02 3 # 2
0x03 4 # 3
0x04 5 # 4
0x05 6 # 5
0x06 7 # 6
0x07 8 # 7
0x08 9 # 8
0x09 10 # 9
0x00 11 # 0
0x4b 448 # factory red
0x4d 449 # factory green
0x50 450 # factory yellow
0x51 451 # factory blue
key_end

45 changes: 45 additions & 0 deletions packages/sysutils/amremote/config/wetek.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,50 @@ debug_enable = 1
reg_control = 0xfbe40

key_begin
# WeTek Play remote
0xca 116 ;POWER

# WeTek Pro Remote
0x0c 116 # power
0x2a 398 # red
0x2b 399 # green
0x2c 400 # yellow
0x2d 401 # blue
0x11 168 # rewind
0x12 164 # play/pause
0x13 208 # fast forward
0x14 167 # record
0x17 139 # menu
0x1a 15 # app switch
0x29 102 # home
0x1d 158 # back
0x0f 370 # subtitles
0x27 113 # volume mute
0x10 388 # teletext
0x0b 366 # recordings
0x28 358 # info
0x0a 218 # share
0x22 103 # up
0x23 108 # down
0x24 105 # left
0x25 106 # right
0x26 28 # ok
0x1e 115 # volume up
0x1f 114 # volume down
0x20 104 # channel up
0x21 109 # channel down
0x01 2 # 1
0x02 3 # 2
0x03 4 # 3
0x04 5 # 4
0x05 6 # 5
0x06 7 # 6
0x07 8 # 7
0x08 9 # 8
0x09 10 # 9
0x00 11 # 0
0x4b 448 # factory red
0x4d 449 # factory green
0x50 450 # factory yellow
0x51 451 # factory blue
key_end
82 changes: 0 additions & 82 deletions projects/WeTek_Play/filesystem/etc/amremote/remote1.conf

This file was deleted.

22 changes: 22 additions & 0 deletions projects/WeTek_Play/patches/linux/070-wetek-pro-remote.patch
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a5812da

Please sign in to comment.