lirc: add some patches from fedora and minimyth

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-09-19 19:07:27 +02:00
parent 716be92fd3
commit d6465c97dd
6 changed files with 5259 additions and 0 deletions

View File

@ -14,6 +14,7 @@ export ac_cv_lib_util_forkpty=no
export MAKEFLAGS=-j1 export MAKEFLAGS=-j1
cd $PKG_BUILD cd $PKG_BUILD
$AUTORECONF
./configure --host=$TARGET_NAME \ ./configure --host=$TARGET_NAME \
--build=$HOST_NAME \ --build=$HOST_NAME \
--prefix=/usr \ --prefix=/usr \

View File

@ -0,0 +1,134 @@
Index: lirc-0.8.7pre2/remotes/atiusb/lircd.conf.atiusb
===================================================================
--- lirc-0.8.7pre2.orig/remotes/atiusb/lircd.conf.atiusb
+++ lirc-0.8.7pre2/remotes/atiusb/lircd.conf.atiusb
@@ -1865,7 +1865,7 @@ end remote
begin remote
- name Medion_X10
+ name Medion_X10_V2
bits 16
eps 30
aeps 100
@@ -1943,7 +1943,7 @@ end remote
begin remote
- name Medion_X10
+ name Medion_X10_V3
bits 16
eps 30
aeps 100
Index: lirc-0.8.7pre2/remotes/bestbuy/lircd.conf.bestbuy2
===================================================================
--- lirc-0.8.7pre2.orig/remotes/bestbuy/lircd.conf.bestbuy2
+++ lirc-0.8.7pre2/remotes/bestbuy/lircd.conf.bestbuy2
@@ -11,7 +11,7 @@
begin remote
- name BESTBUY
+ name BESTBUY2
bits 7
eps 30
aeps 100
Index: lirc-0.8.7pre2/remotes/dvico/lircd.conf.fusionHDTV
===================================================================
--- lirc-0.8.7pre2.orig/remotes/dvico/lircd.conf.fusionHDTV
+++ lirc-0.8.7pre2/remotes/dvico/lircd.conf.fusionHDTV
@@ -153,7 +153,7 @@ end remote
begin remote
- name DVICO_MCE
+ name DVICO_MCE2
bits 8
eps 30
aeps 100
Index: lirc-0.8.7pre2/remotes/generic/NEC-pulse.conf
===================================================================
--- lirc-0.8.7pre2.orig/remotes/generic/NEC-pulse.conf
+++ lirc-0.8.7pre2/remotes/generic/NEC-pulse.conf
@@ -7,7 +7,7 @@
begin remote
- name NEC
+ name NEC_PULSE
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
Index: lirc-0.8.7pre2/remotes/generic/NEC-short-pulse.conf
===================================================================
--- lirc-0.8.7pre2.orig/remotes/generic/NEC-short-pulse.conf
+++ lirc-0.8.7pre2/remotes/generic/NEC-short-pulse.conf
@@ -9,7 +9,7 @@
begin remote
- name NEC
+ name NEC_SHORT_PULSE
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
Index: lirc-0.8.7pre2/remotes/generic/SONY12.conf
===================================================================
--- lirc-0.8.7pre2.orig/remotes/generic/SONY12.conf
+++ lirc-0.8.7pre2/remotes/generic/SONY12.conf
@@ -6,7 +6,7 @@
begin remote
- name SONY
+ name SONY_12
bits 7
flags SPACE_ENC|CONST_LENGTH
eps 30
Index: lirc-0.8.7pre2/remotes/generic/SONY20.conf
===================================================================
--- lirc-0.8.7pre2.orig/remotes/generic/SONY20.conf
+++ lirc-0.8.7pre2/remotes/generic/SONY20.conf
@@ -6,7 +6,7 @@
begin remote
- name SONY
+ name SONY_20
bits 7
flags SPACE_ENC|CONST_LENGTH
eps 30
Index: lirc-0.8.7pre2/remotes/hauppauge/lircd.conf.hauppauge
===================================================================
--- lirc-0.8.7pre2.orig/remotes/hauppauge/lircd.conf.hauppauge
+++ lirc-0.8.7pre2/remotes/hauppauge/lircd.conf.hauppauge
@@ -278,14 +278,14 @@ end remote
#
# contributed by Matthew Wright
#
-# brand: Hauppauge (HRV-1600 RT Remote)
+# brand: Hauppauge (HVR-1600 RT Remote)
# model no. of remote control: A415-HPG-A
# devices being controlled by this remote:
#
begin remote
- name Hauppauge
+ name Hauppauge_HVR_1600
bits 13
flags RC5|CONST_LENGTH
eps 30
Index: lirc-0.8.7pre2/remotes/leadtek/lircd.conf.PVR2000
===================================================================
--- lirc-0.8.7pre2.orig/remotes/leadtek/lircd.conf.PVR2000
+++ lirc-0.8.7pre2/remotes/leadtek/lircd.conf.PVR2000
@@ -74,7 +74,7 @@ end remote
begin remote
- name PVR2000
+ name PVR2000_V2
bits 8
flags SHIFT_ENC
gap 120000

View File

@ -0,0 +1,175 @@
Index: lirc-0.8.7pre2/remotes/atiusb/lircd.conf.atiusb
===================================================================
--- lirc-0.8.7pre2.orig/remotes/atiusb/lircd.conf.atiusb
+++ lirc-0.8.7pre2/remotes/atiusb/lircd.conf.atiusb
@@ -2195,7 +2195,7 @@ end remote
# this config file was automatically generated
# using lirc-0.8.2(default) on Wed Feb 6 01:32:32 2008
#
-# contributed by
+# contributed by http://www.mythtv.org/wiki/Snapstream_Firefly
#
# brand: Snapstream Firefly
# model no. of remote control: R1000
@@ -2215,63 +2215,111 @@ begin remote
pre_data 0x14
post_data_bits 16
post_data 0x0
- gap 235978
+ gap 147992
+ min_repeat 5
toggle_bit_mask 0x80800000
begin codes
- maximize 0x81AC
- close 0xD702
- 1 0x628D
- 2 0xE30E
- 3 0x648F
- 4 0xE510
- 5 0x6691
- 6 0xE712
- 7 0x6893
- 8 0xE914
- 9 0x6A95
- 0 0xEC17
- back 0x6B96
- ent 0xED18
- volup 0x5E89
- voldown 0xDD08
- mute 0x5F8A
- chup 0xE00B
- chdown 0x618C
- firefly 0xD500
- info 0x83AE
- option 0x042F
- up 0x6F9A
- down 0xF722
- left 0x729D
- right 0xF41F
- ok 0x739E
- menu 0xF11C
- exit 0x75A0
- rec 0xFC27
- play 0x7AA5
- stop 0xFD28
- rew 0x79A4
- prev 0x002B
- pause 0x7EA9
- ffwd 0xFB26
- next 0x7FAA
- music 0xDB06
- photo 0x5A85
- dvd 0xD904
- tv 0x5883
- video 0xDC07
- help 0x5681
- mouse 0x022D
- a 0x6E99
- b 0xF01B
- c 0x76A1
- d 0xF823
+ KEY_MAX 0x812C
+ KEY_MAX 0x01AC
+ KEY_CLOSE 0x5702
+ KEY_CLOSE 0xD782
+ KEY_1 0x620D
+ KEY_1 0xE28D
+ KEY_2 0x630E
+ KEY_2 0xE38E
+ KEY_3 0x640F
+ KEY_3 0xE48F
+ KEY_4 0x6510
+ KEY_4 0xE590
+ KEY_5 0x6611
+ KEY_5 0xE691
+ KEY_6 0x6712
+ KEY_6 0xE792
+ KEY_7 0x6813
+ KEY_7 0xE893
+ KEY_8 0x6914
+ KEY_8 0xE994
+ KEY_9 0x6A15
+ KEY_9 0xEA95
+ KEY_0 0x6C17
+ KEY_0 0xEC97
+ KEY_BACK 0x6B16
+ KEY_BACK 0xEB96
+ KEY_ENTER 0x6D18
+ KEY_ENTER 0xED98
+ KEY_VOLUMEUP 0x5E09
+ KEY_VOLUMEUP 0xDE89
+ KEY_VOLUMEDOWN 0x5D08
+ KEY_VOLUMEDOWN 0xDD88
+ KEY_MUTE 0x5F0A
+ KEY_MUTE 0xDF8A
+ KEY_VENDOR 0x5500
+ KEY_VENDOR 0xD580
+ KEY_CHANNELUP 0x600B
+ KEY_CHANNELUP 0xE08B
+ KEY_CHANNELDOWN 0x610C
+ KEY_CHANNELDOWN 0xE18C
+ KEY_INFO 0x832E
+ KEY_INFO 0x03AE
+ KEY_OPTION 0x842F
+ KEY_OPTION 0x04AF
+ KEY_UP 0x6F1A
+ KEY_UP 0xEF9A
+ KEY_LEFT 0x721D
+ KEY_LEFT 0xF29D
+ KEY_DOWN 0x7722
+ KEY_DOWN 0xF7A2
+ KEY_RIGHT 0x741F
+ KEY_RIGHT 0xF49F
+ KEY_OK 0x731E
+ KEY_OK 0xF39E
+ KEY_MENU 0x711C
+ KEY_MENU 0xF19C
+ KEY_EXIT 0x7520
+ KEY_EXIT 0xF5A0
+ KEY_RECORD 0x7C27
+ KEY_RECORD 0xFCA7
+ KEY_PLAY 0x7A25
+ KEY_PLAY 0xFAA5
+ KEY_STOP 0x7D28
+ KEY_STOP 0xFDA8
+ KEY_REWIND 0x7924
+ KEY_REWIND 0xF9A4
+ KEY_FORWARD 0x7B26
+ KEY_FORWARD 0xFBA6
+ KEY_PREVIOUS 0x802B
+ KEY_PREVIOUS 0x00AB
+ KEY_PAUSE 0x7E29
+ KEY_PAUSE 0xFEA9
+ KEY_NEXT 0x7F2A
+ KEY_NEXT 0xFFAA
+ KEY_AUDIO 0x5B06
+ KEY_AUDIO 0xDB86
+ PHOTOS 0x5A05
+ PHOTOS 0xDA85
+ KEY_DVD 0x5904
+ KEY_DVD 0xD984
+ KEY_TV 0x5803
+ KEY_TV 0xD883
+ KEY_VIDEO 0x5C07
+ KEY_VIDEO 0xDC87
+ KEY_HELP 0x5601
+ KEY_HELP 0xD681
+ MOUSE 0x822D
+ MOUSE 0x02AD
+ KEY_A 0x6E19
+ KEY_A 0xEE99
+ KEY_B 0x701B
+ KEY_B 0xF09B
+ KEY_C 0x7621
+ KEY_C 0xF6A1
+ KEY_D 0x7823
+ KEY_D 0xF8A3
end codes
end remote
-
#
# this config file was automatically generated
# using lirc-0.8.2(default) on Thu Oct 4 17:42:33 2007

View File

@ -0,0 +1,69 @@
diff -Naur lirc-0.8.7-old/daemons/input_map.c lirc-0.8.7-new/daemons/input_map.c
--- lirc-0.8.7-old/daemons/input_map.c 2008-10-26 08:10:17.000000000 -0700
+++ lirc-0.8.7-new/daemons/input_map.c 2010-09-07 16:19:12.000000000 -0700
@@ -25,6 +25,21 @@
{NULL, 0}
};
+int get_input_code_by_index(int index, linux_input_code *code)
+{
+ int i;
+
+ for (i=0; input_map[i].name != NULL; i++)
+ {
+ if (i == index)
+ {
+ *code = input_map[i].code;
+ return i;
+ }
+ }
+ return -1;
+}
+
int get_input_code(const char *name, linux_input_code *code)
{
int i;
diff -Naur lirc-0.8.7-old/daemons/input_map.h lirc-0.8.7-new/daemons/input_map.h
--- lirc-0.8.7-old/daemons/input_map.h 2008-10-26 08:10:17.000000000 -0700
+++ lirc-0.8.7-new/daemons/input_map.h 2010-09-07 16:19:12.000000000 -0700
@@ -28,6 +28,7 @@
typedef unsigned short linux_input_code;
#endif
+int get_input_code_by_index(int index, linux_input_code *code);
int get_input_code(const char *name, linux_input_code *code);
void fprint_namespace(FILE *f);
int is_in_namespace(const char *name);
diff -Naur lirc-0.8.7-old/daemons/lircd.c lirc-0.8.7-new/daemons/lircd.c
--- lirc-0.8.7-old/daemons/lircd.c 2010-08-26 22:08:09.000000000 -0700
+++ lirc-0.8.7-new/daemons/lircd.c 2010-09-07 16:19:12.000000000 -0700
@@ -422,6 +422,8 @@
#if defined(__linux__)
int fd;
int key;
+ linux_input_code code;
+ int i;
struct uinput_user_dev dev;
fd = open("/dev/input/uinput", O_RDWR);
@@ -450,12 +452,16 @@
goto setup_error;
}
- for(key = KEY_RESERVED; key <= KEY_UNKNOWN; key++)
+ for(i = 0; get_input_code_by_index(i, &code) >= 0; i++)
{
- if(ioctl(fd, UI_SET_KEYBIT, key) != 0)
+ key = (int)code;
+ if ((key < BTN_MISC) || (key > BTN_GEAR_UP))
{
- goto setup_error;
- }
+ if(ioctl(fd, UI_SET_KEYBIT, key) != 0)
+ {
+ goto setup_error;
+ }
+ }
}
if(ioctl(fd, UI_DEV_CREATE) != 0)

View File

@ -0,0 +1,116 @@
Index: lirc-0.8.7pre2/drivers/lirc.h
===================================================================
--- lirc-0.8.7pre2.orig/drivers/lirc.h
+++ lirc-0.8.7pre2/drivers/lirc.h
@@ -11,6 +11,9 @@
#define __USE_LINUX_IOCTL_DEFS
#include <sys/ioctl.h>
#endif
+#include <stdint.h>
+
+typedef uint32_t __u32;
/* <obsolete> */
#define PULSE_BIT 0x01000000
@@ -95,60 +96,60 @@ typedef int lirc_t;
/*** IOCTL commands for lirc driver ***/
-#define LIRC_GET_FEATURES _IOR('i', 0x00000000, unsigned long)
+#define LIRC_GET_FEATURES _IOR('i', 0x00000000, __u32)
-#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, unsigned long)
-#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, unsigned long)
-#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, unsigned int)
-#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, unsigned int)
-#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, unsigned int)
-#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, unsigned int)
-#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, unsigned int)
-
-#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, lirc_t)
-#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, lirc_t)
-
-#define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, lirc_t)
-#define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, lirc_t)
-#define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, lirc_t)
-#define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, lirc_t)
+#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32)
+#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32)
+#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, __u32)
+#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, __u32)
+#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, __u32)
+#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, __u32)
+#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, __u32)
+
+#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, __u32)
+#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, __u32)
+
+#define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, __u32)
+#define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, __u32)
+#define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, __u32)
+#define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, __u32)
/* code length in bits, currently only for LIRC_MODE_LIRCCODE */
-#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, unsigned long)
+#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32)
/* all values set should be reset by the driver when the device is
reopened */
/* obsolete: drivers only support one mode */
-#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, unsigned long)
+#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, __u32)
/* obsolete: drivers only support one mode */
-#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, unsigned long)
+#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, __u32)
/* Note: these can reset the according pulse_width */
-#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, unsigned int)
-#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, unsigned int)
-#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, unsigned int)
-#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, unsigned int)
-#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, unsigned int)
+#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, __u32)
+#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, __u32)
+#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, __u32)
+#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, __u32)
+#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, __u32)
/* a value of 0 disables all hardware timeouts and data should be
reported as soon as possible */
-#define LIRC_SET_REC_TIMEOUT _IOW('i', 0x00000018, lirc_t)
+#define LIRC_SET_REC_TIMEOUT _IOW('i', 0x00000018, __u32)
/* 1 enables, 0 disables timeout reports in MODE2 */
-#define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, unsigned int)
+#define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, __u32)
/* pulses shorter than this are filtered out by hardware (software
emulation in lirc_dev/lircd?) */
-#define LIRC_SET_REC_FILTER_PULSE _IOW('i', 0x0000001a, lirc_t)
+#define LIRC_SET_REC_FILTER_PULSE _IOW('i', 0x0000001a, __u32)
/* spaces shorter than this are filtered out by hardware (software
emulation in lirc_dev/lircd?) */
-#define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, lirc_t)
+#define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32)
/* if filter cannot be set independently for pulse/space, this should
be used */
-#define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, lirc_t)
+#define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32)
/* if enabled from the next key press on the driver will send
LIRC_MODE2_FREQUENCY packets */
-#define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, unsigned int)
+#define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32)
/*
* to set a range use
@@ -157,8 +158,8 @@ typedef int lirc_t;
* LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound
*/
-#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, unsigned int)
-#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, unsigned int)
+#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, __u32)
+#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, __u32)
#define LIRC_NOTIFY_DECODE _IO('i', 0x00000020)