summaryrefslogtreecommitdiff
authorXindong Xu <xindong.xu@amlogic.com>2017-11-30 05:07:03 (GMT)
committer Xindong Xu <xindong.xu@amlogic.com>2017-11-30 11:26:00 (GMT)
commit80457cbc0847ff5a2733c4d3cf0dd2d436604f37 (patch)
treeb1b7ee083b9be9a4f560de0ef86a3b2f4079a931
parent8140a329ab969744fcccc3d39b4d1e1a914a2199 (diff)
downloadframeworks-80457cbc0847ff5a2733c4d3cf0dd2d436604f37.zip
frameworks-80457cbc0847ff5a2733c4d3cf0dd2d436604f37.tar.gz
frameworks-80457cbc0847ff5a2733c4d3cf0dd2d436604f37.tar.bz2
frameworks: remove remoteconf code here [5/6]
PD# 155856 remove remoteconf code here, use linux/amlogic/ir_tools Change-Id: Id8446a64cb1c1db92fe9b3a13c689b1d44dfba51
Diffstat
-rw-r--r--services/remoteconf/Android.mk36
-rw-r--r--services/remoteconf/config.c91
-rw-r--r--services/remoteconf/factory_remote.conf35
-rw-r--r--services/remoteconf/irkey.c80
-rw-r--r--services/remoteconf/irremote.c168
-rw-r--r--services/remoteconf/keydefine.h529
-rw-r--r--services/remoteconf/parsefile.c356
-rw-r--r--services/remoteconf/rc5.conf41
-rw-r--r--services/remoteconf/remote.conf62
-rw-r--r--services/remoteconf/remote_config.h199
-rw-r--r--services/remoteconf/remote_init.c145
-rw-r--r--services/remoteconf/remotercmm.conf56
12 files changed, 0 insertions, 1798 deletions
diff --git a/services/remoteconf/Android.mk b/services/remoteconf/Android.mk
deleted file mode 100644
index 1d48e53..0000000
--- a/services/remoteconf/Android.mk
+++ b/dev/null
@@ -1,36 +0,0 @@
-ifneq ($(TARGET_SIMULATOR),true)
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= irremote.c config.c parsefile.c
-LOCAL_MODULE := remotecfg
-LOCAL_MODULE_TAGS := optional
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_STATIC_LIBRARIES := libcutils libc liblog
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
-LOCAL_PROPRIETARY_MODULE := true
-endif
-include $(BUILD_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= remote_init.c config.c parsefile.c
-LOCAL_MODULE := libremotecfg_static
-LOCAL_MODULE_TAGS := optional
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_STATIC_LIBRARIES := libcutils libc liblog
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
-LOCAL_PROPRIETARY_MODULE := true
-endif
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES:= irkey.c
-LOCAL_MODULE := keytest
-LOCAL_MODULE_TAGS := optional
-ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26 && echo OK),OK)
-LOCAL_PROPRIETARY_MODULE := true
-endif
-include $(BUILD_EXECUTABLE)
-
-endif # TARGET_SIMULATOR != true
diff --git a/services/remoteconf/config.c b/services/remoteconf/config.c
deleted file mode 100644
index 84e4bd2..0000000
--- a/services/remoteconf/config.c
+++ b/dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * @author Tellen Yu
- * @version 2.0
- * @date 2015/06/01
- * @par function description:
- * - 1 IR remote config set config to kernel driver
- */
-
-#define LOG_TAG "remotecfg"
-#define LOG_NDEBUG 0
-
-#include <stdio.h>
-#include <fcntl.h>
-#include <utils/Log.h>
-#include "remote_config.h"
-#include "keydefine.h"
-
-#define DEVICE_NAME "/dev/amremote"
-
-int set_config(remote_config_t *remote)
-{
- unsigned int i, val;
- unsigned int *para = (unsigned int*)&remote->factory_infcode;
- int device_fd = open(DEVICE_NAME, O_RDWR);
- if (device_fd <= 0) {
- ALOGE("Can't open %s .\n", DEVICE_NAME);
- return -1;
- }
- remote->factory_code >>= 16;
-
- for (i = 0; i < ARRAY_SIZE(config_item); i++) {
- if (para[i] != 0xffffffff) {
- switch (i) {
- case 4:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- ALOGV("%20s = 0x%x\n", config_item[i], para[i]);
- break;
- default:
- ALOGV("%20s = %d\n", config_item[i], para[i]);
- break;
- }
-
- ioctl(device_fd, remote_ioc_table[i], &para[i]);
- }
- }
- ioctl(device_fd, REMOTE_IOC_RESET_KEY_MAPPING, NULL);
-
- for (i = 0; i < 256; i++)
- if (remote->key_map[i] != KEY_RESERVED) {
- val = (i<<16) | remote->key_map[i];
- ioctl(device_fd, REMOTE_IOC_SET_KEY_MAPPING, &val);
- }
-
- for (i = 0; i < 256; i++)
- if (remote->repeat_key_map[i] != KEY_RESERVED ) {
- val = (i<<16) | remote->repeat_key_map[i];
- ioctl(device_fd, REMOTE_IOC_SET_REPEAT_KEY_MAPPING, &val);
- }
-
- for (i = 0; i < 4; i++)
- if (remote->mouse_map[i] != 0xffff) {
- val = (i<<16) | remote->mouse_map[i];
- ioctl(device_fd, REMOTE_IOC_SET_MOUSE_MAPPING, &val);
- }
-
- close(device_fd);
-
- return 0;
-}
diff --git a/services/remoteconf/factory_remote.conf b/services/remoteconf/factory_remote.conf
deleted file mode 100644
index 5a7b424..0000000
--- a/services/remoteconf/factory_remote.conf
+++ b/dev/null
@@ -1,35 +0,0 @@
-#*********************************************************************************************************
-#this file is configuration for each factory remote device
-# work_mode 0 :software mode 1 :hardware mode
-# repeat_enable 0 :disable repeat 1 :enable repeat
-#
-# factory_code each device has it's unique factory code.
-# pattern:custom_code(16bit)+index_code(16bit)
-# examble: 0xff000001 = 0xff00(custom cod) 0001 (index)
-#
-# release_delay unit:ms.release will report from kernel to user layer after this period of time
-# from press or repeat triggered.
-#
-# debug_enable 0 :debug disable 1 :debug disable
-#
-# SW MODE:
-# bit_count how many bits in each frame
-# tw_leader_act time window for leader active
-# tw_bit0 time window for bit0 time.
-# tw_bit1 time window for bit1 time
-# tw_repeat_leader time window for repeat leader1
-# REG
-# reg_base_gen set value for PREG_IR_DEC_BASE_GEN
-# reg_control set value for PREG_IR_DEC_CONTROL
-# reg_leader_act set value for PREG_IR_DEC_LEADER_ACTIVE
-# reg_leader_idle set value for PREG_IR_DEC_LEADER_IDLE
-# reg_repeat_leader set value for PREG_IR_DEC_REPEAT_IDLE
-# reg_bit0_time set value for PREG_IR_DEC_BIT0_TIME
-#*************************************************************************************************************
-#amlogic NEC remote
-factory_infcode = 0
-factory_code = 0x40400001
-key_begin
- 0x03 4
- 0x55 221
-key_end
diff --git a/services/remoteconf/irkey.c b/services/remoteconf/irkey.c
deleted file mode 100644
index 6130e9c..0000000
--- a/services/remoteconf/irkey.c
+++ b/dev/null
@@ -1,80 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-#include <linux/fb.h>
-#include <fcntl.h>
-#include <dlfcn.h>
-#include <time.h>
-#include <sys/queue.h>
-#include <pthread.h>
-#include <sys/syscall.h>
-#include <sys/wait.h>
-#include <linux/input.h>
-
-
-
-static unsigned int
-translate_event( const struct input_event *levt)
-{
-
- switch (levt->type) {
- case EV_KEY:
- return levt->code;
-
- case EV_REL:
- case EV_ABS:
- default:
- break ;
- ;
- }
-
- return -1;
-}
-
-int main(int argc, char* argv[])
-{
- int intput_fd=-1;
- fd_set rfds,wfds;
- struct timeval tv;
- int retval ;
- int exit_enable=0;
- int lace=0x1000;
- unsigned int i,readlen;
-
- struct input_event levt[64];
- if(argc > 1)
- intput_fd=open(argv[1],O_RDWR);//如果设备节点创建在/dev/input目录下,就是/dev/input/event0
- else
- intput_fd=open("/dev/input/event0",O_RDWR);
- if(intput_fd < 0)
- printf("can not open event device....\n");
- else
- printf("open event success\n");
-
- while(!exit_enable)
- {
- tv.tv_sec = 1;
- tv.tv_usec = 10;
- FD_ZERO(&rfds);
- FD_SET(intput_fd, &rfds);
- retval = select(intput_fd+1, &rfds, NULL, NULL, &tv); //wait demux data
- if(retval==-1)
- {
- exit_enable=1;
- }
- else if(retval)
- {
- if(FD_ISSET(intput_fd,&rfds))
- {
- readlen =read(intput_fd,levt, sizeof(levt));
- for (i=0; i<readlen / sizeof(levt[0]); i++) {
- printf("----type = %d, code = 0x%x, value = %d-------------\n", levt[i].type, levt[i].code, levt[i].value);
- }
- }
- }
- }
-
- return 0;
-}
-
diff --git a/services/remoteconf/irremote.c b/services/remoteconf/irremote.c
deleted file mode 100644
index 699e7ae..0000000
--- a/services/remoteconf/irremote.c
+++ b/dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * @author Tellen Yu
- * @version 2.0
- * @date 2015/06/01
- * @par function description:
- * - 1 IR remote
- */
-
-#define LOG_TAG "remotecfg"
-//#define LOG_NDEBUG 0
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <memory.h>
-#include <utils/Log.h>
-#include "remote_config.h"
-#include "keydefine.h"
-
-#define FACTCUSTCODE_MAX 20
-#define DEVICE_NAME "/dev/amremote"
-#define DEVICE_KP "/dev/am_adc_kpd"
-
-unsigned short key_map[256], repeat_key_map[256], mouse_map[4];
-unsigned int factory_customercode_map[FACTCUSTCODE_MAX];
-
-unsigned short default_key_map[256] = {
-KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, /*0~7*/
-KEY_8, KEY_9, KEY_BACK, KEY_UP, KEY_BACKSPACE, KEY_ENTER, KEY_DOWN, KEY_MENU, /*8~f*/
-KEY_LEFT, KEY_RIGHT, KEY_R, KEY_S, KEY_U, KEY_G, KEY_K, KEY_L, /*10~17*/
-KEY_M, KEY_N, KEY_D, KEY_T, KEY_H, KEY_B, KEY_I, KEY_J, /*18~1f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*20~27*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*28~2f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*30~37*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*38~3f*/
-
-KEY_C, KEY_F, KEY_E, KEY_P, KEY_V, KEY_A, KEY_Q, KEY_O, /*40~47*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*48~4f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_W, KEY_Z, KEY_RESERVED, KEY_RESERVED, KEY_Y, /*50~57*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_X, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*58~5f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*60~67*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*68~6f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*70~77*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*78~7f*/
-
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*80~87*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*88~8f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*90~97*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*98~9f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*a0~a7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*a8~af*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*b0~b7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*b8~bf*/
-
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*c0~c7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*c8~cf*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*d0~d7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*d8~df*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*e0~e7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*e8~ef*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*f0~f7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED /*f8~ff*/
-};
-
-unsigned short default_mouse_map[4] = {
- //0x10, 0x11, 0x0b, 0x0e
- 0xffff, 0xffff, 0xffff, 0xffff
-};
-
-unsigned short adc_map[2] ={0xffff, 0xffff};//left,right
-unsigned int adc_move_enable = 0;
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
-int main(int argc, char* argv[])
-{
- int i;
- unsigned int val;
- remote_config_t *remote = NULL;
- int device_kp_fd = -1;
- int ret = 0;
-
- for (i = 0; i < argc; i++)
- ALOGI("remotecfg parameter[%d] %s \n", i, argv[i]);
-
- for (i = 0; i < 256; i++)
- key_map[i] = KEY_RESERVED;
- for (i = 0; i < 256; i++)
- repeat_key_map[i] = KEY_RESERVED;
- for (i = 0; i < 4; i++)
- mouse_map[i] = 0xffff;
- remote = (remote_config_t *)malloc(sizeof(remote_config_t));
- if (!remote) {
- ALOGE("out of memory !\n");
- ret = -1;
- goto exit;
- }
- memset((unsigned char*)remote, 0xff, sizeof(remote_config_t));
- remote->key_map = key_map;
- remote->repeat_key_map = repeat_key_map;
- remote->mouse_map = mouse_map;
- remote->factory_customercode_map = factory_customercode_map;
-
- if (argc < 2) {
- remote->factory_code = 0x40400001;
- remote->work_mode = 1;
- remote->repeat_enable = 1;
- remote->release_delay = 150;
- remote->debug_enable = 1;
- remote->reg_control = 0xfbe40;
- remote->repeat_delay = 250;
- remote->repeat_peroid = 33;
- memcpy(key_map, default_key_map, sizeof(key_map));
- memcpy(mouse_map, default_mouse_map, sizeof(mouse_map));
- memset(factory_customercode_map, 0, FACTCUSTCODE_MAX);
- }
- else if (argv[1][0] == '-') {
- ALOGI("Usage : %s configfile\n", argv[0]);
- ret = -3;
- goto exit;
- }
- else{
- FILE *fp = fopen(argv[1], "r");
- if (!fp) {
- ALOGE("Open file %s is failed!!!\n", argv[1]);
- ret = -4;
- goto exit;
- }
- parse_and_set_config_from_file(fp, remote);
- fclose(fp);
- }
-
- device_kp_fd = open(DEVICE_KP, O_RDWR);
- if (device_kp_fd > 0) {
- if (adc_move_enable != 0) {
- for (i = 0; i < (int)ARRAY_SIZE(adc_map); i++) {
- if (adc_map[i] != 0xffff) {
- val = (i << 16) | adc_map[i];
- ioctl(device_kp_fd, KEY_IOC_SET_MOVE_MAP, &val);
- ALOGI("adc_map[%d] = %d ,val = %d \n", i, adc_map[i], val);
- }
- }
- }
-
- ioctl(device_kp_fd, KEY_IOC_SET_MOVE_ENABLE, &adc_move_enable);
- ALOGI("adc_move_enable = %d \n", adc_move_enable);
- close(device_kp_fd);
- }
-
-exit:
- if (NULL != remote)
- free(remote);
-
- return ret;
-}
diff --git a/services/remoteconf/keydefine.h b/services/remoteconf/keydefine.h
deleted file mode 100644
index 378dcf2..0000000
--- a/services/remoteconf/keydefine.h
+++ b/dev/null
@@ -1,529 +0,0 @@
-#ifndef _KEY_DEFINE_H
-#define _KEY_DEFINE_H
-
-#define KEY_RESERVED 0
-#define KEY_ESC 1
-#define KEY_1 2
-#define KEY_2 3
-#define KEY_3 4
-#define KEY_4 5
-#define KEY_5 6
-#define KEY_6 7
-#define KEY_7 8
-#define KEY_8 9
-#define KEY_9 10
-#define KEY_0 11
-#define KEY_MINUS 12
-#define KEY_EQUAL 13
-#define KEY_BACKSPACE 14
-#define KEY_TAB 15
-#define KEY_Q 16
-#define KEY_W 17
-#define KEY_E 18
-#define KEY_R 19
-#define KEY_T 20
-#define KEY_Y 21
-#define KEY_U 22
-#define KEY_I 23
-#define KEY_O 24
-#define KEY_P 25
-#define KEY_LEFTBRACE 26
-#define KEY_RIGHTBRACE 27
-#define KEY_ENTER 28
-#define KEY_LEFTCTRL 29
-#define KEY_A 30
-#define KEY_S 31
-#define KEY_D 32
-#define KEY_F 33
-#define KEY_G 34
-#define KEY_H 35
-#define KEY_J 36
-#define KEY_K 37
-#define KEY_L 38
-#define KEY_SEMICOLON 39
-#define KEY_APOSTROPHE 40
-#define KEY_GRAVE 41
-#define KEY_LEFTSHIFT 42
-#define KEY_BACKSLASH 43
-#define KEY_Z 44
-#define KEY_X 45
-#define KEY_C 46
-#define KEY_V 47
-#define KEY_B 48
-#define KEY_N 49
-#define KEY_M 50
-#define KEY_COMMA 51
-#define KEY_DOT 52
-#define KEY_SLASH 53
-#define KEY_RIGHTSHIFT 54
-#define KEY_KPASTERISK 55
-#define KEY_LEFTALT 56
-#define KEY_SPACE 57
-#define KEY_CAPSLOCK 58
-#define KEY_F1 59
-#define KEY_F2 60
-#define KEY_F3 61
-#define KEY_F4 62
-#define KEY_F5 63
-#define KEY_F6 64
-#define KEY_F7 65
-#define KEY_F8 66
-#define KEY_F9 67
-#define KEY_F10 68
-#define KEY_NUMLOCK 69
-#define KEY_SCROLLLOCK 70
-#define KEY_KP7 71
-#define KEY_KP8 72
-#define KEY_KP9 73
-#define KEY_KPMINUS 74
-#define KEY_KP4 75
-#define KEY_KP5 76
-#define KEY_KP6 77
-#define KEY_KPPLUS 78
-#define KEY_KP1 79
-#define KEY_KP2 80
-#define KEY_KP3 81
-#define KEY_KP0 82
-#define KEY_KPDOT 83
-
-#define KEY_ZENKAKUHANKAKU 85
-#define KEY_102ND 86
-#define KEY_F11 87
-#define KEY_F12 88
-#define KEY_RO 89
-#define KEY_KATAKANA 90
-#define KEY_HIRAGANA 91
-#define KEY_HENKAN 92
-#define KEY_KATAKANAHIRAGANA 93
-#define KEY_MUHENKAN 94
-#define KEY_KPJPCOMMA 95
-#define KEY_KPENTER 96
-#define KEY_RIGHTCTRL 97
-#define KEY_KPSLASH 98
-#define KEY_SYSRQ 99
-#define KEY_RIGHTALT 100
-#define KEY_LINEFEED 101
-#define KEY_HOME 102
-#define KEY_UP 103
-#define KEY_PAGEUP 104
-#define KEY_LEFT 105
-#define KEY_RIGHT 106
-#define KEY_END 107
-#define KEY_DOWN 108
-#define KEY_PAGEDOWN 109
-#define KEY_INSERT 110
-#define KEY_DELETE 111
-#define KEY_MACRO 112
-#define KEY_MUTE 113
-#define KEY_VOLUMEDOWN 114
-#define KEY_VOLUMEUP 115
-#define KEY_POWER 116 /* SC System Power Down */
-#define KEY_KPEQUAL 117
-#define KEY_KPPLUSMINUS 118
-#define KEY_PAUSE 119
-#define KEY_SCALE 120 /* AL Compiz Scale (Expose) */
-
-#define KEY_KPCOMMA 121
-#define KEY_HANGEUL 122
-#define KEY_HANGUEL KEY_HANGEUL
-#define KEY_HANJA 123
-#define KEY_YEN 124
-#define KEY_LEFTMETA 125
-#define KEY_RIGHTMETA 126
-#define KEY_COMPOSE 127
-
-#define KEY_STOP 128 /* AC Stop */
-#define KEY_AGAIN 129
-#define KEY_PROPS 130 /* AC Properties */
-#define KEY_UNDO 131 /* AC Undo */
-#define KEY_FRONT 132
-#define KEY_COPY 133 /* AC Copy */
-#define KEY_OPEN 134 /* AC Open */
-#define KEY_PASTE 135 /* AC Paste */
-#define KEY_FIND 136 /* AC Search */
-#define KEY_CUT 137 /* AC Cut */
-#define KEY_HELP 138 /* AL Integrated Help Center */
-#define KEY_MENU 139 /* Menu (show menu) */
-#define KEY_CALC 140 /* AL Calculator */
-#define KEY_SETUP 141
-#define KEY_SLEEP 142 /* SC System Sleep */
-#define KEY_WAKEUP 143 /* System Wake Up */
-#define KEY_FILE 144 /* AL Local Machine Browser */
-#define KEY_SENDFILE 145
-#define KEY_DELETEFILE 146
-#define KEY_XFER 147
-#define KEY_PROG1 148
-#define KEY_PROG2 149
-#define KEY_WWW 150 /* AL Internet Browser */
-#define KEY_MSDOS 151
-#define KEY_COFFEE 152 /* AL Terminal Lock/Screensaver */
-#define KEY_SCREENLOCK KEY_COFFEE
-#define KEY_DIRECTION 153
-#define KEY_CYCLEWINDOWS 154
-#define KEY_MAIL 155
-#define KEY_BOOKMARKS 156 /* AC Bookmarks */
-#define KEY_COMPUTER 157
-#define KEY_BACK 158 /* AC Back */
-#define KEY_FORWARD 159 /* AC Forward */
-#define KEY_CLOSECD 160
-#define KEY_EJECTCD 161
-#define KEY_EJECTCLOSECD 162
-#define KEY_NEXTSONG 163
-#define KEY_PLAYPAUSE 164
-#define KEY_PREVIOUSSONG 165
-#define KEY_STOPCD 166
-#define KEY_RECORD 167
-#define KEY_REWIND 168
-#define KEY_PHONE 169 /* Media Select Telephone */
-#define KEY_ISO 170
-#define KEY_CONFIG 171 /* AL Consumer Control Configuration */
-#define KEY_HOMEPAGE 172 /* AC Home */
-#define KEY_REFRESH 173 /* AC Refresh */
-#define KEY_EXIT 174 /* AC Exit */
-#define KEY_MOVE 175
-#define KEY_EDIT 176
-#define KEY_SCROLLUP 177
-#define KEY_SCROLLDOWN 178
-#define KEY_KPLEFTPAREN 179
-#define KEY_KPRIGHTPAREN 180
-#define KEY_NEW 181 /* AC New */
-#define KEY_REDO 182 /* AC Redo/Repeat */
-
-#define KEY_F13 183
-#define KEY_F14 184
-#define KEY_F15 185
-#define KEY_F16 186
-#define KEY_F17 187
-#define KEY_F18 188
-#define KEY_F19 189
-#define KEY_F20 190
-#define KEY_F21 191
-#define KEY_F22 192
-#define KEY_F23 193
-#define KEY_F24 194
-
-#define KEY_PLAYCD 200
-#define KEY_PAUSECD 201
-#define KEY_PROG3 202
-#define KEY_PROG4 203
-#define KEY_DASHBOARD 204 /* AL Dashboard */
-#define KEY_SUSPEND 205
-#define KEY_CLOSE 206 /* AC Close */
-#define KEY_PLAY 207
-#define KEY_FASTFORWARD 208
-#define KEY_BASSBOOST 209
-#define KEY_PRINT 210 /* AC Print */
-#define KEY_HP 211
-#define KEY_CAMERA 212
-#define KEY_SOUND 213
-#define KEY_QUESTION 214
-#define KEY_EMAIL 215
-#define KEY_CHAT 216
-#define KEY_SEARCH 217
-#define KEY_CONNECT 218
-#define KEY_FINANCE 219 /* AL Checkbook/Finance */
-#define KEY_SPORT 220
-#define KEY_SHOP 221
-#define KEY_ALTERASE 222
-#define KEY_CANCEL 223 /* AC Cancel */
-#define KEY_BRIGHTNESSDOWN 224
-#define KEY_BRIGHTNESSUP 225
-#define KEY_MEDIA 226
-
-#define KEY_SWITCHVIDEOMODE 227 /* Cycle between available video
- outputs (Monitor/LCD/TV-out/etc) */
-#define KEY_KBDILLUMTOGGLE 228
-#define KEY_KBDILLUMDOWN 229
-#define KEY_KBDILLUMUP 230
-
-#define KEY_SEND 231 /* AC Send */
-#define KEY_REPLY 232 /* AC Reply */
-#define KEY_FORWARDMAIL 233 /* AC Forward Msg */
-#define KEY_SAVE 234 /* AC Save */
-#define KEY_DOCUMENTS 235
-
-#define KEY_BATTERY 236
-
-#define KEY_BLUETOOTH 237
-#define KEY_WLAN 238
-#define KEY_UWB 239
-
-#define KEY_UNKNOWN 240
-
-#define KEY_VIDEO_NEXT 241 /* drive next video source */
-#define KEY_VIDEO_PREV 242 /* drive previous video source */
-#define KEY_BRIGHTNESS_CYCLE 243 /* brightness up, after max is min */
-#define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */
-#define KEY_DISPLAY_OFF 245 /* display device to off state */
-
-#define KEY_WIMAX 246
-#define KEY_RFKILL 247 /* Key that controls all radios */
-
-/* Code 255 is reserved for special needs of AT keyboard driver */
-
-#define BTN_MISC 0x100
-#define BTN_0 0x100
-#define BTN_1 0x101
-#define BTN_2 0x102
-#define BTN_3 0x103
-#define BTN_4 0x104
-#define BTN_5 0x105
-#define BTN_6 0x106
-#define BTN_7 0x107
-#define BTN_8 0x108
-#define BTN_9 0x109
-
-#define BTN_MOUSE 0x110
-#define BTN_LEFT 0x110
-#define BTN_RIGHT 0x111
-#define BTN_MIDDLE 0x112
-#define BTN_SIDE 0x113
-#define BTN_EXTRA 0x114
-#define BTN_FORWARD 0x115
-#define BTN_BACK 0x116
-#define BTN_TASK 0x117
-
-#define BTN_JOYSTICK 0x120
-#define BTN_TRIGGER 0x120
-#define BTN_THUMB 0x121
-#define BTN_THUMB2 0x122
-#define BTN_TOP 0x123
-#define BTN_TOP2 0x124
-#define BTN_PINKIE 0x125
-#define BTN_BASE 0x126
-#define BTN_BASE2 0x127
-#define BTN_BASE3 0x128
-#define BTN_BASE4 0x129
-#define BTN_BASE5 0x12a
-#define BTN_BASE6 0x12b
-#define BTN_DEAD 0x12f
-
-#define BTN_GAMEPAD 0x130
-#define BTN_A 0x130
-#define BTN_B 0x131
-#define BTN_C 0x132
-#define BTN_X 0x133
-#define BTN_Y 0x134
-#define BTN_Z 0x135
-#define BTN_TL 0x136
-#define BTN_TR 0x137
-#define BTN_TL2 0x138
-#define BTN_TR2 0x139
-#define BTN_SELECT 0x13a
-#define BTN_START 0x13b
-#define BTN_MODE 0x13c
-#define BTN_THUMBL 0x13d
-#define BTN_THUMBR 0x13e
-
-#define BTN_DIGI 0x140
-#define BTN_TOOL_PEN 0x140
-#define BTN_TOOL_RUBBER 0x141
-#define BTN_TOOL_BRUSH 0x142
-#define BTN_TOOL_PENCIL 0x143
-#define BTN_TOOL_AIRBRUSH 0x144
-#define BTN_TOOL_FINGER 0x145
-#define BTN_TOOL_MOUSE 0x146
-#define BTN_TOOL_LENS 0x147
-#define BTN_TOUCH 0x14a
-#define BTN_STYLUS 0x14b
-#define BTN_STYLUS2 0x14c
-#define BTN_TOOL_DOUBLETAP 0x14d
-#define BTN_TOOL_TRIPLETAP 0x14e
-#define BTN_TOOL_QUADTAP 0x14f /* Four fingers on trackpad */
-
-#define BTN_WHEEL 0x150
-#define BTN_GEAR_DOWN 0x150
-#define BTN_GEAR_UP 0x151
-
-#define KEY_OK 0x160
-#define KEY_SELECT 0x161
-#define KEY_GOTO 0x162
-#define KEY_CLEAR 0x163
-#define KEY_POWER2 0x164
-#define KEY_OPTION 0x165
-#define KEY_INFO 0x166 /* AL OEM Features/Tips/Tutorial */
-#define KEY_TIME 0x167
-#define KEY_VENDOR 0x168
-#define KEY_ARCHIVE 0x169
-#define KEY_PROGRAM 0x16a /* Media Select Program Guide */
-#define KEY_CHANNEL 0x16b
-#define KEY_FAVORITES 0x16c
-#define KEY_EPG 0x16d
-#define KEY_PVR 0x16e /* Media Select Home */
-#define KEY_MHP 0x16f
-#define KEY_LANGUAGE 0x170
-#define KEY_TITLE 0x171
-#define KEY_SUBTITLE 0x172
-#define KEY_ANGLE 0x173
-#define KEY_ZOOM 0x174
-#define KEY_MODE 0x175
-#define KEY_KEYBOARD 0x176
-#define KEY_SCREEN 0x177
-#define KEY_PC 0x178 /* Media Select Computer */
-#define KEY_TV 0x179 /* Media Select TV */
-#define KEY_TV2 0x17a /* Media Select Cable */
-#define KEY_VCR 0x17b /* Media Select VCR */
-#define KEY_VCR2 0x17c /* VCR Plus */
-#define KEY_SAT 0x17d /* Media Select Satellite */
-#define KEY_SAT2 0x17e
-#define KEY_CD 0x17f /* Media Select CD */
-#define KEY_TAPE 0x180 /* Media Select Tape */
-#define KEY_RADIO 0x181
-#define KEY_TUNER 0x182 /* Media Select Tuner */
-#define KEY_PLAYER 0x183
-#define KEY_TEXT 0x184
-#define KEY_DVD 0x185 /* Media Select DVD */
-#define KEY_AUX 0x186
-#define KEY_MP3 0x187
-#define KEY_AUDIO 0x188
-#define KEY_VIDEO 0x189
-#define KEY_DIRECTORY 0x18a
-#define KEY_LIST 0x18b
-#define KEY_MEMO 0x18c /* Media Select Messages */
-#define KEY_CALENDAR 0x18d
-#define KEY_RED 0x18e
-#define KEY_GREEN 0x18f
-#define KEY_YELLOW 0x190
-#define KEY_BLUE 0x191
-#define KEY_CHANNELUP 0x192 /* Channel Increment */
-#define KEY_CHANNELDOWN 0x193 /* Channel Decrement */
-#define KEY_FIRST 0x194
-#define KEY_LAST 0x195 /* Recall Last */
-#define KEY_AB 0x196
-#define KEY_NEXT 0x197
-#define KEY_RESTART 0x198
-#define KEY_SLOW 0x199
-#define KEY_SHUFFLE 0x19a
-#define KEY_BREAK 0x19b
-#define KEY_PREVIOUS 0x19c
-#define KEY_DIGITS 0x19d
-#define KEY_TEEN 0x19e
-#define KEY_TWEN 0x19f
-#define KEY_VIDEOPHONE 0x1a0 /* Media Select Video Phone */
-#define KEY_GAMES 0x1a1 /* Media Select Games */
-#define KEY_ZOOMIN 0x1a2 /* AC Zoom In */
-#define KEY_ZOOMOUT 0x1a3 /* AC Zoom Out */
-#define KEY_ZOOMRESET 0x1a4 /* AC Zoom */
-#define KEY_WORDPROCESSOR 0x1a5 /* AL Word Processor */
-#define KEY_EDITOR 0x1a6 /* AL Text Editor */
-#define KEY_SPREADSHEET 0x1a7 /* AL Spreadsheet */
-#define KEY_GRAPHICSEDITOR 0x1a8 /* AL Graphics Editor */
-#define KEY_PRESENTATION 0x1a9 /* AL Presentation App */
-#define KEY_DATABASE 0x1aa /* AL Database App */
-#define KEY_NEWS 0x1ab /* AL Newsreader */
-#define KEY_VOICEMAIL 0x1ac /* AL Voicemail */
-#define KEY_ADDRESSBOOK 0x1ad /* AL Contacts/Address Book */
-#define KEY_MESSENGER 0x1ae /* AL Instant Messaging */
-#define KEY_DISPLAYTOGGLE 0x1af /* Turn display (LCD) on and off */
-#define KEY_SPELLCHECK 0x1b0 /* AL Spell Check */
-#define KEY_LOGOFF 0x1b1 /* AL Logoff */
-
-#define KEY_DOLLAR 0x1b2
-#define KEY_EURO 0x1b3
-
-#define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */
-#define KEY_FRAMEFORWARD 0x1b5
-#define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */
-#define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */
-
-#define KEY_DEL_EOL 0x1c0
-#define KEY_DEL_EOS 0x1c1
-#define KEY_INS_LINE 0x1c2
-#define KEY_DEL_LINE 0x1c3
-
-#define KEY_FN 0x1d0
-#define KEY_FN_ESC 0x1d1
-#define KEY_FN_F1 0x1d2
-#define KEY_FN_F2 0x1d3
-#define KEY_FN_F3 0x1d4
-#define KEY_FN_F4 0x1d5
-#define KEY_FN_F5 0x1d6
-#define KEY_FN_F6 0x1d7
-#define KEY_FN_F7 0x1d8
-#define KEY_FN_F8 0x1d9
-#define KEY_FN_F9 0x1da
-#define KEY_FN_F10 0x1db
-#define KEY_FN_F11 0x1dc
-#define KEY_FN_F12 0x1dd
-#define KEY_FN_1 0x1de
-#define KEY_FN_2 0x1df
-#define KEY_FN_D 0x1e0
-#define KEY_FN_E 0x1e1
-#define KEY_FN_F 0x1e2
-#define KEY_FN_S 0x1e3
-#define KEY_FN_B 0x1e4
-
-#define KEY_BRL_DOT1 0x1f1
-#define KEY_BRL_DOT2 0x1f2
-#define KEY_BRL_DOT3 0x1f3
-#define KEY_BRL_DOT4 0x1f4
-#define KEY_BRL_DOT5 0x1f5
-#define KEY_BRL_DOT6 0x1f6
-#define KEY_BRL_DOT7 0x1f7
-#define KEY_BRL_DOT8 0x1f8
-#define KEY_BRL_DOT9 0x1f9
-#define KEY_BRL_DOT10 0x1fa
-
-#define KEY_NUMERIC_0 0x200 /* used by phones, remote controls, */
-#define KEY_NUMERIC_1 0x201 /* and other keypads */
-#define KEY_NUMERIC_2 0x202
-#define KEY_NUMERIC_3 0x203
-#define KEY_NUMERIC_4 0x204
-#define KEY_NUMERIC_5 0x205
-#define KEY_NUMERIC_6 0x206
-#define KEY_NUMERIC_7 0x207
-#define KEY_NUMERIC_8 0x208
-#define KEY_NUMERIC_9 0x209
-#define KEY_NUMERIC_STAR 0x20a
-#define KEY_NUMERIC_POUND 0x20b
-
-#define KEY_CAMERA_FOCUS 0x210
-#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */
-
-#define BTN_TRIGGER_HAPPY 0x2c0
-#define BTN_TRIGGER_HAPPY1 0x2c0
-#define BTN_TRIGGER_HAPPY2 0x2c1
-#define BTN_TRIGGER_HAPPY3 0x2c2
-#define BTN_TRIGGER_HAPPY4 0x2c3
-#define BTN_TRIGGER_HAPPY5 0x2c4
-#define BTN_TRIGGER_HAPPY6 0x2c5
-#define BTN_TRIGGER_HAPPY7 0x2c6
-#define BTN_TRIGGER_HAPPY8 0x2c7
-#define BTN_TRIGGER_HAPPY9 0x2c8
-#define BTN_TRIGGER_HAPPY10 0x2c9
-#define BTN_TRIGGER_HAPPY11 0x2ca
-#define BTN_TRIGGER_HAPPY12 0x2cb
-#define BTN_TRIGGER_HAPPY13 0x2cc
-#define BTN_TRIGGER_HAPPY14 0x2cd
-#define BTN_TRIGGER_HAPPY15 0x2ce
-#define BTN_TRIGGER_HAPPY16 0x2cf
-#define BTN_TRIGGER_HAPPY17 0x2d0
-#define BTN_TRIGGER_HAPPY18 0x2d1
-#define BTN_TRIGGER_HAPPY19 0x2d2
-#define BTN_TRIGGER_HAPPY20 0x2d3
-#define BTN_TRIGGER_HAPPY21 0x2d4
-#define BTN_TRIGGER_HAPPY22 0x2d5
-#define BTN_TRIGGER_HAPPY23 0x2d6
-#define BTN_TRIGGER_HAPPY24 0x2d7
-#define BTN_TRIGGER_HAPPY25 0x2d8
-#define BTN_TRIGGER_HAPPY26 0x2d9
-#define BTN_TRIGGER_HAPPY27 0x2da
-#define BTN_TRIGGER_HAPPY28 0x2db
-#define BTN_TRIGGER_HAPPY29 0x2dc
-#define BTN_TRIGGER_HAPPY30 0x2dd
-#define BTN_TRIGGER_HAPPY31 0x2de
-#define BTN_TRIGGER_HAPPY32 0x2df
-#define BTN_TRIGGER_HAPPY33 0x2e0
-#define BTN_TRIGGER_HAPPY34 0x2e1
-#define BTN_TRIGGER_HAPPY35 0x2e2
-#define BTN_TRIGGER_HAPPY36 0x2e3
-#define BTN_TRIGGER_HAPPY37 0x2e4
-#define BTN_TRIGGER_HAPPY38 0x2e5
-#define BTN_TRIGGER_HAPPY39 0x2e6
-#define BTN_TRIGGER_HAPPY40 0x2e7
-
-/* We avoid low common keys in module aliases so they don't get huge. */
-#define KEY_MIN_INTERESTING KEY_MUTE
-#define KEY_MAX 0x2ff
-
-#endif
diff --git a/services/remoteconf/parsefile.c b/services/remoteconf/parsefile.c
deleted file mode 100644
index 9c03bf5..0000000
--- a/services/remoteconf/parsefile.c
+++ b/dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * @author Tellen Yu
- * @version 2.0
- * @date 2015/06/01
- * @par function description:
- * - 1 IR remote config parse file
- */
-
-#define LOG_TAG "remotecfg"
-#define LOG_NDEBUG 0
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <utils/Log.h>
-#include "remote_config.h"
-
-#define CC_MAX_LINE_LEN (400)
-
-enum {
- CONFIG_LEVEL,
- CUSTOM_LEVEL,
- KEYMAP_LEVEL,
- REPEATKEYMAP_LEVEL,
- MOUSEMAP_LEVEL,
- ADCMAP_LEVEL,
- FACTORYCUSTMAP_LEVEL
-};
-
-extern unsigned short adc_map[2];
-extern unsigned int adc_move_enable;
-
-static void str_trim(char **s) {
- int i;
- int len = strlen(*s);
-
- for (i = len - 1; i >= 0; i--) {
- if ((*s)[i] <= ' ') {
- (*s)[i] = 0;
- } else {
- break;
- }
- }
-
- while (**s) {
- if (**s <= ' ') {
- (*s)++;
- } else {
- return;
- }
- }
-}
-
-static void trim_line_data(char *line_data_buf) {
- char *tmp_ptr = NULL;
-
- if (line_data_buf == NULL) {
- return;
- }
-
- //trim comment string
- tmp_ptr = line_data_buf;
- while (*tmp_ptr && ((tmp_ptr - line_data_buf) <= CC_MAX_LINE_LEN)) {
- if (*tmp_ptr == '#' || *tmp_ptr == ';') {
- *tmp_ptr = '\0';
- break;
- }
-
- tmp_ptr++;
- }
-
- //trim other character
- tmp_ptr = line_data_buf;
- str_trim(&tmp_ptr);
- strncpy(line_data_buf, tmp_ptr, CC_MAX_LINE_LEN);
-}
-
-static int remote_config_set(char *name, char *value, remote_config_t *config) {
- unsigned int i;
- unsigned int *config_para = (unsigned int*) &config->factory_infcode;
-
- for (i = 0; i < ARRAY_SIZE(config_item); i++) {
- if (strcmp(config_item[i], name) == 0) {
- config_para[i] = strtoul(value, NULL, 0);
- ALOGV("curpara:%s %08x\n", name, config_para[i]);
- return 0;
- }
- }
- return -1;
-}
-
-int parse_and_set_config_from_file(FILE *fp, remote_config_t *remote) {
- char line_data_buf[CC_MAX_LINE_LEN];
- char *name = NULL;
- char *value;
- unsigned short ircode = 0, keycode = 0, adccode, index, custcode;
- unsigned char parse_flag = CONFIG_LEVEL;
- unsigned char last_flag = CONFIG_LEVEL;
- unsigned char has_custom_config = 0;
-
- while (fgets(line_data_buf, CC_MAX_LINE_LEN, fp)) {
- trim_line_data(line_data_buf);
-
- name = line_data_buf;
-
- switch (parse_flag) {
- case CONFIG_LEVEL:
- last_flag = CONFIG_LEVEL;
- if (strcasecmp(name, "custom_begin") == 0) {
- parse_flag = CUSTOM_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "key_begin") == 0) {
- parse_flag = KEYMAP_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "repeat_key_begin") == 0) {
- parse_flag = REPEATKEYMAP_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "mouse_begin") == 0) {
- parse_flag = MOUSEMAP_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "keyadc_begin") == 0) {
- parse_flag = ADCMAP_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "factorycust_begin") == 0) {
- parse_flag = FACTORYCUSTMAP_LEVEL;
- continue;
- }
-
- value = strchr(line_data_buf, '=');
- if (value) {
- *value++ = 0;
- str_trim(&value);
- }
-
- str_trim(&name);
- if (!*name) {
- continue;
- }
-
- if (remote_config_set(name, value, remote)) {
- ALOGE("config file has not supported parameter:%s=%s\r\n", name, value);
- }
- continue;
- case CUSTOM_LEVEL:
- last_flag = CUSTOM_LEVEL;
- if (strcasecmp(name, "custom_end") == 0) {
- parse_flag = CONFIG_LEVEL;
- has_custom_config = 1;
- set_config(remote);
- continue;
- }
-
- if (strcasecmp(name, "key_begin") == 0) {
- parse_flag = KEYMAP_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "repeat_key_begin") == 0) {
- parse_flag = REPEATKEYMAP_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "mouse_begin") == 0) {
- parse_flag = MOUSEMAP_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "keyadc_begin") == 0) {
- parse_flag = ADCMAP_LEVEL;
- continue;
- }
-
- if (strcasecmp(name, "factorycust_begin") == 0) {
- parse_flag = FACTORYCUSTMAP_LEVEL;
- continue;
- }
-
- value = strchr(line_data_buf, '=');
- if (value) {
- *value++ = 0;
- str_trim(&value);
- }
-
- str_trim(&name);
- if (!*name) {
- continue;
- }
-
- if (remote_config_set(name, value, remote)) {
- ALOGE("config file has not supported parameter:%s=%s\r\n", name, value);
- }
- continue;
- case KEYMAP_LEVEL:
- if (strcasecmp(name, "key_end") == 0) {
- parse_flag = last_flag;
- continue;
- }
-
- value = strchr(line_data_buf, ' ');
- if (value) {
- *value++ = 0;
- str_trim(&value);
- }
-
- str_trim(&name);
- if (!*name) {
- continue;
- }
- ircode = strtoul(name, NULL, 0);
- if (ircode > 0xff) {
- continue;
- }
-
- keycode = strtoul(value, NULL, 0) & 0xffff;
- if (keycode) {
- remote->key_map[ircode] = keycode;
- ALOGV("KEYMAP_LEVEL: ircode = 0x%x, keycode = %d\n", ircode, keycode);
- }
- continue;
- case REPEATKEYMAP_LEVEL:
- if (strcasecmp(name, "repeat_key_end") == 0) {
- parse_flag = last_flag;
- continue;
- }
-
- value = strchr(line_data_buf, ' ');
- if (value) {
- *value++ = 0;
- str_trim(&value);
- }
-
- str_trim(&name);
- if (!*name) {
- continue;
- }
- ircode = strtoul(name, NULL, 0);
- if (ircode > 0xff) {
- continue;
- }
-
- keycode = strtoul(value, NULL, 0) & 0xffff;
- if (keycode) {
- remote->repeat_key_map[ircode] = keycode;
- ALOGV("REPEATKEYMAP_LEVEL: ircode = 0x%x, keycode = %d\n", ircode, keycode);
- }
- continue;
- case MOUSEMAP_LEVEL:
- if (strcasecmp(name, "mouse_end") == 0) {
- parse_flag = last_flag;
- continue;
- }
-
- value = strchr(line_data_buf, ' ');
- if (value) {
- *value++ = 0;
- str_trim(&value);
- }
-
- str_trim(&name);
- if (!*name) {
- continue;
- }
- ircode = strtoul(name, NULL, 0);
- if (ircode > 3) {
- continue;
- }
-
- keycode = strtoul(value, NULL, 0) & 0xff;
- remote->mouse_map[ircode] = keycode;
- ALOGV("MOUSEMAP_LEVEL: ircode = 0x%x, keycode = %d\n", ircode, keycode);
- continue;
- case ADCMAP_LEVEL:
- if (strcasecmp(name, "keyadc_end") == 0) {
- parse_flag = last_flag;
- continue;
- }
-
- value = strchr(line_data_buf, ' ');
- if (value) {
- *value++ = 0;
- str_trim(&value);
- }
-
- str_trim(&name);
- if (!*name) {
- continue;
- }
-
- adccode = strtoul(name, NULL, 0);
- if (adccode > 3) {
- continue;
- }
- if (adc_move_enable == 0) {
- adc_move_enable = 1;
- }
-
- keycode = strtoul(value, NULL, 0) & 0xff;
- adc_map[adccode] = keycode;
- continue;
- case FACTORYCUSTMAP_LEVEL:
- if (strcasecmp(name, "factorycust_end") == 0) {
- parse_flag = last_flag;
- continue;
- }
-
- value = strchr(line_data_buf, ' ');
- if (value) {
- *value++ = 0;
- str_trim(&value);
- }
-
- str_trim(&name);
- if (!*name) {
- continue;
- }
- index = strtoul(name, NULL, 0);
- if (ircode > 0xff) {
- continue;
- }
-
- custcode = strtoul(value, NULL, 0) & 0xffff;
- if (keycode) {
- remote->factory_customercode_map[index] = custcode;
- ALOGV("FACTORYCUSTMAP_LEVEL: index = 0x%x, custcode = 0x%x\n", index, custcode);
- }
- continue;
- }
- }
- if (has_custom_config == 0) {
- set_config(remote);
- }
- return 0;
-}
diff --git a/services/remoteconf/rc5.conf b/services/remoteconf/rc5.conf
deleted file mode 100644
index a45d569..0000000
--- a/services/remoteconf/rc5.conf
+++ b/dev/null
@@ -1,41 +0,0 @@
-#*********************************************************************************************************
-#this file is configuration for each factory remote device
-# work_mode 0 :software mode 1 :hardware mode
-# repeat_enable 0 :disable repeat 1 :enable repeat
-#
-# factory_code each device has it's unique factory code.
-# pattern:custom_code(16bit)+index_code(16bit)
-# examble: 0xff000001 = 0xff00(custom cod) 0001 (index)
-#
-# release_delay unit:ms.release will report from kernel to user layer after this period of time
-# from press or repeat triggered.
-#
-# debug_enable 0 :debug disable 1 :debug disable
-#
-# SW MODE:
-# bit_count how many bits in each frame
-# tw_leader_act time window for leader active
-# tw_bit0 time window for bit0 time.
-# tw_bit1 time window for bit1 time
-# tw_repeat_leader time window for repeat leader
-# REG
-# reg_base_gen set value for PREG_IR_DEC_BASE_GEN
-# reg_control set value for PREG_IR_DEC_CONTROL
-# reg_leader_act set value for PREG_IR_DEC_LEADER_ACTIVE
-# reg_leader_idle set value for PREG_IR_DEC_LEADER_IDLE
-# reg_repeat_leader set value for PREG_IR_DEC_REPEAT_IDLE
-# reg_bit0_time set value for PREG_IR_DEC_BIT0_TIME
-#*************************************************************************************************************
-#CVT RC5 remote
-work_mode = 0x32
-repeat_enable = 0
-release_delay = 180
-debug_enable = 0
-tw_bit0 =0x0398035a
-reg_control =0x8574
-reg_base_gen =0
-bit_count =6
-
-key_begin
- 0x36 57
-key_end
diff --git a/services/remoteconf/remote.conf b/services/remoteconf/remote.conf
deleted file mode 100644
index 0bfe82c..0000000
--- a/services/remoteconf/remote.conf
+++ b/dev/null
@@ -1,62 +0,0 @@
-#*********************************************************************************************************
-#this file is configuration for each factory remote device
-# work_mode 0 :software mode 1 :hardware mode
-# repeat_enable 0 :disable repeat 1 :enable repeat
-#
-# factory_code each device has it's unique factory code.
-# pattern:custom_code(16bit)+index_code(16bit)
-# examble: 0xff000001 = 0xff00(custom cod) 0001 (index)
-#
-# release_delay unit:ms.release will report from kernel to user layer after this period of time
-# from press or repeat triggered.
-#
-# debug_enable 0 :debug disable 1 :debug disable
-#
-# SW MODE:
-# bit_count how many bits in each frame
-# tw_leader_act time window for leader active
-# tw_bit0 time window for bit0 time.
-# tw_bit1 time window for bit1 time
-# tw_repeat_leader time window for repeat leader
-# REG
-# reg_base_gen set value for PREG_IR_DEC_BASE_GEN
-# reg_control set value for PREG_IR_DEC_CONTROL
-# reg_leader_act set value for PREG_IR_DEC_LEADER_ACTIVE
-# reg_leader_idle set value for PREG_IR_DEC_LEADER_IDLE
-# reg_repeat_leader set value for PREG_IR_DEC_REPEAT_IDLE
-# reg_bit0_time set value for PREG_IR_DEC_BIT0_TIME
-#*************************************************************************************************************
-#amlogic NEC remote
-factory_code = 0x40400001
-work_mode = 1
-repeat_enable = 0
-release_delay = 150
-debug_enable = 1
-reg_control = 0xfbe40
-
-key_begin
- 0x00 11
- 0x01 2
- 0x02 3
- 0x03 4
- 0x04 5
- 0x05 6
- 0x06 7
- 0x07 8
- 0x08 9
- 0x09 10
- 0x0D 28
- 0x1D 158
- 0x45 14
- 0x0B 103
- 0x0E 108
- 0x10 105
- 0x11 106
- 0x5B 48
- 0x57 46
- 0x54 32
- 0x19 139
- 0x1F 115
- 0x1E 114
- 0x16 102
-key_end
diff --git a/services/remoteconf/remote_config.h b/services/remoteconf/remote_config.h
deleted file mode 100644
index d5d04d9..0000000
--- a/services/remoteconf/remote_config.h
+++ b/dev/null
@@ -1,199 +0,0 @@
-#ifndef _REMOTE_CONFIG_H
-#define _REMOTE_CONFIG_H
-
-#include <asm/ioctl.h>
-typedef unsigned int u32;
-
-#define REMOTE_IOC_UNFCODE_CONFIG _IOW('I',12, u32)
-#define REMOTE_IOC_INFCODE_CONFIG _IOW('I',13, u32)
-#define REMOTE_IOC_RESET_KEY_MAPPING _IOW('I',3,u32)
-#define REMOTE_IOC_SET_KEY_MAPPING _IOW('I',4,u32)
-#define REMOTE_IOC_SET_MOUSE_MAPPING _IOW('I',5,u32)
-#define REMOTE_IOC_SET_REPEAT_DELAY _IOW('I',6,u32)
-#define REMOTE_IOC_SET_REPEAT_PERIOD _IOW('I',7,u32)
-
-#define REMOTE_IOC_SET_REPEAT_ENABLE _IOW('I',8,u32)
-#define REMOTE_IOC_SET_DEBUG_ENABLE _IOW('I',9,u32)
-#define REMOTE_IOC_SET_MODE _IOW('I',10,u32)
-#define REMOTE_IOC_SET_MOUSE_SPEED _IOW('I',11,u32)
-
-#define REMOTE_IOC_SET_REPEAT_KEY_MAPPING _IOW('I',20,u32)
-#define REMOTE_IOC_SET_RELEASE_FDELAY _IOW('I',97,u32)
-#define REMOTE_IOC_SET_RELEASE_SDELAY _IOW('I',98,u32)
-#define REMOTE_IOC_SET_RELEASE_DELAY _IOW('I',99,u32)
-#define REMOTE_IOC_SET_CUSTOMCODE _IOW('I',100,u32)
-//reg
-#define REMOTE_IOC_SET_REG_BASE_GEN _IOW('I',101,u32)
-#define REMOTE_IOC_SET_REG_CONTROL _IOW('I',102,u32)
-#define REMOTE_IOC_SET_REG_LEADER_ACT _IOW('I',103,u32)
-#define REMOTE_IOC_SET_REG_LEADER_IDLE _IOW('I',104,u32)
-#define REMOTE_IOC_SET_REG_REPEAT_LEADER _IOW('I',105,u32)
-#define REMOTE_IOC_SET_REG_BIT0_TIME _IOW('I',106,u32)
-
-//sw
-#define REMOTE_IOC_SET_BIT_COUNT _IOW('I',107,u32)
-#define REMOTE_IOC_SET_TW_LEADER_ACT _IOW('I',108,u32)
-#define REMOTE_IOC_SET_TW_BIT0_TIME _IOW('I',109,u32)
-#define REMOTE_IOC_SET_TW_BIT1_TIME _IOW('I',110,u32)
-#define REMOTE_IOC_SET_TW_REPEATE_LEADER _IOW('I',111,u32)
-
-#define REMOTE_IOC_GET_TW_LEADER_ACT _IOR('I',112,u32)
-#define REMOTE_IOC_GET_TW_BIT0_TIME _IOR('I',113,u32)
-#define REMOTE_IOC_GET_TW_BIT1_TIME _IOR('I',114,u32)
-#define REMOTE_IOC_GET_TW_REPEATE_LEADER _IOR('I',115,u32)
-
-
-#define REMOTE_IOC_GET_REG_BASE_GEN _IOR('I',121,u32)
-#define REMOTE_IOC_GET_REG_CONTROL _IOR('I',122,u32)
-#define REMOTE_IOC_GET_REG_LEADER_ACT _IOR('I',123,u32)
-#define REMOTE_IOC_GET_REG_LEADER_IDLE _IOR('I',124,u32)
-#define REMOTE_IOC_GET_REG_REPEAT_LEADER _IOR('I',125,u32)
-#define REMOTE_IOC_GET_REG_BIT0_TIME _IOR('I',126,u32)
-#define REMOTE_IOC_GET_REG_FRAME_DATA _IOR('I',127,u32)
-#define REMOTE_IOC_GET_REG_FRAME_STATUS _IOR('I',128,u32)
-
-#define REMOTE_IOC_SET_FN_KEY_SCANCODE _IOW('I', 131, u32)
-#define REMOTE_IOC_SET_LEFT_KEY_SCANCODE _IOW('I', 132, u32)
-#define REMOTE_IOC_SET_RIGHT_KEY_SCANCODE _IOW('I', 133, u32)
-#define REMOTE_IOC_SET_UP_KEY_SCANCODE _IOW('I', 134, u32)
-#define REMOTE_IOC_SET_DOWN_KEY_SCANCODE _IOW('I', 135, u32)
-#define REMOTE_IOC_SET_OK_KEY_SCANCODE _IOW('I', 136, u32)
-#define REMOTE_IOC_SET_PAGEUP_KEY_SCANCODE _IOW('I', 137, u32)
-#define REMOTE_IOC_SET_PAGEDOWN_KEY_SCANCODE _IOW('I', 138, u32)
-
-#define REMOTE_IOC_SET_TW_BIT2_TIME _IOW('I',129,u32)
-#define REMOTE_IOC_SET_TW_BIT3_TIME _IOW('I',130,u32)
-#define REMOTE_IOC_SET_FACTORY_CUSTOMCODE _IOW('I',139,u32)
-#define ADC_KP_MAGIC 'P'
-#define KEY_IOC_SET_MOVE_MAP _IOW(ADC_KP_MAGIC,0X02,int)
-#define KEY_IOC_SET_MOVE_ENABLE _IOW(ADC_KP_MAGIC,0X03,int)
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
-typedef struct {
- unsigned short *key_map;
- unsigned short *repeat_key_map;
- unsigned short *mouse_map;
- unsigned int *factory_customercode_map;
- unsigned int factory_infcode;
- unsigned int repeat_delay;
- unsigned int repeat_peroid;
- unsigned int work_mode ;
- unsigned int mouse_speed;
- unsigned int repeat_enable;
- unsigned int factory_unfcode;
- unsigned int factory_code;
- unsigned int release_delay;
- unsigned int release_fdelay;
- unsigned int release_sdelay;
- unsigned int debug_enable;
- //sw
- unsigned int bit_count;
- unsigned int tw_leader_act;
- unsigned int tw_bit0;
- unsigned int tw_bit1;
- unsigned int tw_bit2;
- unsigned int tw_bit3;
- unsigned int tw_repeat_leader;
- //reg
- unsigned int reg_base_gen;
- unsigned int reg_control;
- unsigned int reg_leader_act;
- unsigned int reg_leader_idle;
- unsigned int reg_repeat_leader;
- unsigned int reg_bit0_time;
-
- unsigned int fn_key_scancode;
- unsigned int left_key_scancode;
- unsigned int right_key_scancode;
- unsigned int up_key_scancode;
- unsigned int down_key_scancode;
- unsigned int ok_key_scancode;
- unsigned int pageup_key_scancode;
- unsigned int pagedown_key_scancode;
-}remote_config_t;
-
-//these string must in this order and sync with struct remote_config_t
-static char* config_item[33]={
- "factory_infcode",
- "repeat_delay",
- "repeat_peroid",
- "work_mode",
- "mouse_speed",
- "repeat_enable",
- "factory_unfcode",
- "factory_code",
- "release_delay",
- "release_fdelay",
- "release_sdelay",
- "debug_enable",
-//sw
- "bit_count",
- "tw_leader_act",
- "tw_bit0",
- "tw_bit1",
- "tw_bit2",
- "tw_bit3",
- "tw_repeat_leader",
-//reg
- "reg_base_gen",
- "reg_control",
- "reg_leader_act",
- "reg_leader_idle",
- "reg_repeat_leader",
- "reg_bit0_time",
-
- "fn_key_scancode",
- "left_key_scancode",
- "right_key_scancode",
- "up_key_scancode",
- "down_key_scancode",
- "ok_key_scancode",
- "pageup_key_scancode",
- "pagedown_key_scancode",
-};
-
-static int remote_ioc_table[33]={
- REMOTE_IOC_INFCODE_CONFIG,
- REMOTE_IOC_SET_REPEAT_DELAY,
- REMOTE_IOC_SET_REPEAT_PERIOD,
- REMOTE_IOC_SET_MODE,
- REMOTE_IOC_SET_MOUSE_SPEED,
-
- REMOTE_IOC_SET_REPEAT_ENABLE,
- REMOTE_IOC_UNFCODE_CONFIG,
- REMOTE_IOC_SET_CUSTOMCODE,
- REMOTE_IOC_SET_RELEASE_DELAY,
- REMOTE_IOC_SET_RELEASE_FDELAY,
- REMOTE_IOC_SET_RELEASE_SDELAY,
- REMOTE_IOC_SET_DEBUG_ENABLE,
-//sw
- REMOTE_IOC_SET_BIT_COUNT,
- REMOTE_IOC_SET_TW_LEADER_ACT,
- REMOTE_IOC_SET_TW_BIT0_TIME,
- REMOTE_IOC_SET_TW_BIT1_TIME,
- REMOTE_IOC_SET_TW_BIT2_TIME,
- REMOTE_IOC_SET_TW_BIT3_TIME,
- REMOTE_IOC_SET_TW_REPEATE_LEADER,
-//reg
- REMOTE_IOC_SET_REG_BASE_GEN,
- REMOTE_IOC_SET_REG_CONTROL ,
- REMOTE_IOC_SET_REG_LEADER_ACT,
- REMOTE_IOC_SET_REG_LEADER_IDLE,
- REMOTE_IOC_SET_REG_REPEAT_LEADER,
- REMOTE_IOC_SET_REG_BIT0_TIME,
-
- REMOTE_IOC_SET_FN_KEY_SCANCODE,
- REMOTE_IOC_SET_LEFT_KEY_SCANCODE,
- REMOTE_IOC_SET_RIGHT_KEY_SCANCODE,
- REMOTE_IOC_SET_UP_KEY_SCANCODE,
- REMOTE_IOC_SET_DOWN_KEY_SCANCODE,
- REMOTE_IOC_SET_OK_KEY_SCANCODE,
- REMOTE_IOC_SET_PAGEUP_KEY_SCANCODE,
- REMOTE_IOC_SET_PAGEDOWN_KEY_SCANCODE,
-};
-
-extern int set_config(remote_config_t *remote);
-extern int parse_and_set_config_from_file(FILE *fp, remote_config_t *remote);
-
-#endif
diff --git a/services/remoteconf/remote_init.c b/services/remoteconf/remote_init.c
deleted file mode 100644
index 33016e8..0000000
--- a/services/remoteconf/remote_init.c
+++ b/dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * @author Tellen Yu
- * @version 2.0
- * @date 2015/06/01
- * @par function description:
- * - 1 IR remote
- */
-
-#define LOG_TAG "remotecfg"
-//#define LOG_NDEBUG 0
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <memory.h>
-#include <utils/Log.h>
-#include "remote_config.h"
-#include "keydefine.h"
-
-#define FACTCUSTCODE_MAX 20
-#define DEVICE_NAME "/dev/amremote"
-#define DEVICE_KP "/dev/am_adc_kpd"
-
-unsigned short key_map[256], repeat_key_map[256], mouse_map[4];
-unsigned int factory_customercode_map[FACTCUSTCODE_MAX];
-
-unsigned short default_key_map[256] = {
-KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, /*0~7*/
-KEY_8, KEY_9, KEY_BACK, KEY_UP, KEY_BACKSPACE, KEY_ENTER, KEY_DOWN, KEY_MENU, /*8~f*/
-KEY_LEFT, KEY_RIGHT, KEY_R, KEY_S, KEY_U, KEY_G, KEY_K, KEY_L, /*10~17*/
-KEY_M, KEY_N, KEY_D, KEY_T, KEY_H, KEY_B, KEY_I, KEY_J, /*18~1f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*20~27*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*28~2f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*30~37*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*38~3f*/
-
-KEY_C, KEY_F, KEY_E, KEY_P, KEY_V, KEY_A, KEY_Q, KEY_O, /*40~47*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*48~4f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_W, KEY_Z, KEY_RESERVED, KEY_RESERVED, KEY_Y, /*50~57*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_X, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*58~5f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*60~67*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*68~6f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*70~77*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*78~7f*/
-
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*80~87*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*88~8f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*90~97*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*98~9f*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*a0~a7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*a8~af*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*b0~b7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*b8~bf*/
-
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*c0~c7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*c8~cf*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*d0~d7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*d8~df*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*e0~e7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*e8~ef*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /*f0~f7*/
-KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED /*f8~ff*/
-};
-
-unsigned short default_mouse_map[4] = {
- //0x10, 0x11, 0x0b, 0x0e
- 0xffff, 0xffff, 0xffff, 0xffff
-};
-
-unsigned short adc_map[2] ={0xffff, 0xffff};//left,right
-unsigned int adc_move_enable = 0;
-
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
-int remoteinit(const char* path)
-{
- int i;
- unsigned int val;
- remote_config_t *remote = NULL;
- int device_kp_fd = -1;
- int ret = 0;
-
- for (i = 0; i < 256; i++)
- key_map[i] = KEY_RESERVED;
- for (i = 0; i < 256; i++)
- repeat_key_map[i] = KEY_RESERVED;
- for (i = 0; i < 4; i++)
- mouse_map[i] = 0xffff;
- remote = (remote_config_t *)malloc(sizeof(remote_config_t));
- if (!remote) {
- ALOGE("out of memory !\n");
- ret = -1;
- goto exit;
- }
- memset((unsigned char*)remote, 0xff, sizeof(remote_config_t));
- remote->key_map = key_map;
- remote->repeat_key_map = repeat_key_map;
- remote->mouse_map = mouse_map;
- remote->factory_customercode_map = factory_customercode_map;
-
- FILE *fp = fopen(path, "r");
- if (!fp) {
- ALOGE("Open file %s is failed!!!\n", path);
- ret = -3;
- goto exit;
- }
- parse_and_set_config_from_file(fp, remote);
- fclose(fp);
-
- device_kp_fd = open(DEVICE_KP, O_RDWR);
- if (device_kp_fd > 0) {
- if (adc_move_enable != 0) {
- for (i = 0; i < (int)ARRAY_SIZE(adc_map); i++) {
- if (adc_map[i] != 0xffff) {
- val = (i << 16) | adc_map[i];
- ioctl(device_kp_fd, KEY_IOC_SET_MOVE_MAP, &val);
- ALOGI("adc_map[%d] = %d ,val = %d \n", i, adc_map[i], val);
- }
- }
- }
-
- ioctl(device_kp_fd, KEY_IOC_SET_MOVE_ENABLE, &adc_move_enable);
- ALOGI("adc_move_enable = %d \n", adc_move_enable);
- close(device_kp_fd);
- }
-
-exit:
- if (NULL != remote)
- free(remote);
-
- return ret;
-}
diff --git a/services/remoteconf/remotercmm.conf b/services/remoteconf/remotercmm.conf
deleted file mode 100644
index 6688cfe..0000000
--- a/services/remoteconf/remotercmm.conf
+++ b/dev/null
@@ -1,56 +0,0 @@
-#*********************************************************************************************************
-#this file is configuration for each factory remote device
-# work_mode 0 :software mode 1 :hardware mode
-# repeat_enable 0 :disable repeat 1 :enable repeat
-#
-# factory_code each device has it's unique factory code.
-# pattern:custom_code(16bit)+index_code(16bit)
-# examble: 0xff000001 = 0xff00(custom cod) 0001 (index)
-#
-# release_delay unit:ms.release will report from kernel to user layer after this period of time
-# from press or repeat triggered.
-#
-# debug_enable 0 :debug disable 1 :debug disable
-#
-# SW MODE:
-# bit_count how many bits in each frame
-# tw_leader_act time window for leader active
-# tw_bit0 time window for bit0 time.
-# tw_bit1 time window for bit1 time
-# tw_repeat_leader time window for repeat leader1
-# REG
-# reg_base_gen set value for PREG_IR_DEC_BASE_GEN
-# reg_control set value for PREG_IR_DEC_CONTROL
-# reg_leader_act set value for PREG_IR_DEC_LEADER_ACTIVE
-# reg_leader_idle set value for PREG_IR_DEC_LEADER_IDLE
-# reg_repeat_leader set value for PREG_IR_DEC_REPEAT_IDLE
-# reg_bit0_time set value for PREG_IR_DEC_BIT0_TIME
-#*************************************************************************************************************
-#amlogic NEC remote
-factory_code = 0x00860001
-work_mode = 82
-repeat_enable = 0
-release_delay = 30
-debug_enable = 1
-bit_count = 20
-tw_leader_act = 0x0053004f
-tw_bit0 = 0x003d0036
-tw_bit1 = 0x004e0046
-tw_bit2 = 0x005d0054
-tw_bit3 = 0x006a0063
-reg_control = 0x8578
-key_begin
- 0x05 103
- 0x06 108
- 0x0b 105
- 0x0c 106
- 0x0d 28
- 0x08 102
- 0x07 158
- 0x04 139
- 0x0a 116
- 0x11 236
- 0x03 235
- 0x0e 115
- 0x0f 114
-key_end