summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/lirc
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-11-25 18:40:21 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-11-25 18:40:21 (GMT)
commitf9d8baf1e8d94e1252cbd90999d9f2382cff8a57 (patch)
tree1424c8c8b9ac2cc086ce7376ec85446ff48919fc /abs/core-testing/lirc
parentb0fcb5694aa74b1098dc1647fa272c157d24b856 (diff)
parent1e4ef029d3646f3e86bc2a725cbed7ac1e3e6613 (diff)
downloadlinhes_pkgbuild-f9d8baf1e8d94e1252cbd90999d9f2382cff8a57.zip
linhes_pkgbuild-f9d8baf1e8d94e1252cbd90999d9f2382cff8a57.tar.gz
linhes_pkgbuild-f9d8baf1e8d94e1252cbd90999d9f2382cff8a57.tar.bz2
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/lirc')
-rw-r--r--abs/core-testing/lirc/PKGBUILD4
-rw-r--r--abs/core-testing/lirc/lirc_mod_mce.patch98
2 files changed, 96 insertions, 6 deletions
diff --git a/abs/core-testing/lirc/PKGBUILD b/abs/core-testing/lirc/PKGBUILD
index d15cf1d..12dc3b4 100644
--- a/abs/core-testing/lirc/PKGBUILD
+++ b/abs/core-testing/lirc/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=lirc
pkgver=0.8.5CVS
-pkgrel=15
+pkgrel=17
_kernver=2.6.28-LinHES
pkgdesc="Linux Infrared Remote Control kernel modules for stock arch kernel"
arch=(i686 x86_64)
@@ -79,7 +79,7 @@ md5sums=('b96dae91b566143b3af433fa2714ec9a'
'6f151eb4e81fc7776a06c9063e6ad9a5'
'7eccd7826ab99e5cf1b9154171c8b927'
'21ce358809105f005e888e3b138c59e6'
- 'd299b696b007fc9b663a73cc1758a1ef'
+ 'b5d52566a9dae8d76e24e8753f33abef'
'f059f4030afc682c9539a03bf837c1cf'
'4e698654cc44fc6c4163814acda5a7ee'
'9a3a6dc03647ee6674a166dfb884ddd6'
diff --git a/abs/core-testing/lirc/lirc_mod_mce.patch b/abs/core-testing/lirc/lirc_mod_mce.patch
index 314f2d7..1dc6644 100644
--- a/abs/core-testing/lirc/lirc_mod_mce.patch
+++ b/abs/core-testing/lirc/lirc_mod_mce.patch
@@ -1,6 +1,6 @@
-diff -Naru lirc_mod_mce.orig/lirc_mod_mce.c lirc_mod_mce/lirc_mod_mce.c
---- lirc_mod_mce.orig/lirc_mod_mce.c 2008-04-18 02:12:28.000000000 +0930
-+++ lirc_mod_mce/lirc_mod_mce.c 2009-05-28 07:53:10.000000000 +0930
+diff -Naru lirc_mod_mce/lirc_mod_mce.c lirc_mod_mce_new/lirc_mod_mce.c
+--- lirc_mod_mce/lirc_mod_mce.c 2008-04-18 02:12:28.000000000 +0930
++++ lirc_mod_mce_new/lirc_mod_mce.c 2009-11-22 18:45:24.000000000 +1030
@@ -171,17 +171,76 @@
#define VENDOR_TATUNG 0x1460
#define VENDOR_GATEWAY 0x107b
@@ -86,7 +86,97 @@ diff -Naru lirc_mod_mce.orig/lirc_mod_mce.c lirc_mod_mce/lirc_mod_mce.c
};
static unsigned char usb_kbd_keycode[256] = {
-@@ -1108,7 +1167,7 @@
+@@ -252,6 +311,8 @@
+ struct semaphore lock;
+ char name[NAME_BUFSIZE];
+ char phys[NAME_BUFSIZE];
++
++ unsigned int carrier_freq;
+ };
+
+ /* init strings */
+@@ -889,6 +950,51 @@
+ }
+ }
+
++/* Sets the send carrier frequency */
++static int set_send_carrier(struct irctl *ir, int carrier)
++{
++ int clk = 10000000;
++ int prescaler = 0, divisor = 0;
++ unsigned char cmdbuf[] = { 0x9F, 0x06, 0x01, 0x80 };
++
++ /* Carrier is changed */
++ if (ir->carrier_freq != carrier) {
++
++ if (carrier <= 0) {
++ ir->carrier_freq = carrier;
++ dprintk(DRIVER_NAME "[%d]: SET_CARRIER disabling "
++ "carrier modulation\n", ir->devnum);
++ request_packet_async(ir, ir->usb_ep_out,
++ cmdbuf, sizeof(cmdbuf),
++ PHILUSB_OUTBOUND);
++ return carrier;
++ }
++
++ for (prescaler = 0; prescaler < 4; ++prescaler) {
++ divisor = (clk >> (2 * prescaler)) / carrier;
++ if (divisor <= 0xFF) {
++ ir->carrier_freq = carrier;
++ cmdbuf[2] = prescaler;
++ cmdbuf[3] = divisor;
++ dprintk(DRIVER_NAME "[%d]: SET_CARRIER "
++ "requesting %d Hz\n",
++ ir->devnum, carrier);
++
++ /* Transmit new carrier to mce device */
++ request_packet_async(ir, ir->usb_ep_out,
++ cmdbuf, sizeof(cmdbuf),
++ PHILUSB_OUTBOUND);
++ return carrier;
++ }
++ }
++
++ return -EINVAL;
++
++ }
++
++ return carrier;
++}
++
+ static int input_open(struct input_dev *id)
+ {
+ return 0;
+@@ -945,6 +1051,18 @@
+ if(lvalue!=(LIRC_MODE_PULSE&LIRC_CAN_SEND_MASK)) return -EINVAL;
+ break;
+
++ case LIRC_SET_SEND_CARRIER:
++ /* Retrieve lirc_plugin data for the device */
++ ir=lirc_get_pdata(filep);
++ if (!ir && !ir->usb_ep_out) return -EFAULT;
++
++ result = get_user(ivalue, (unsigned int *) arg);
++ if (result)
++ return result;
++
++ set_send_carrier(ir, ivalue);
++ break;
++
+ default:
+ return -ENOIOCTLCMD;
+ }
+@@ -1047,7 +1165,8 @@
+ plugin->minor = -1;
+ plugin->features = LIRC_CAN_SEND_PULSE |
+ LIRC_CAN_SET_TRANSMITTER_MASK |
+- LIRC_CAN_REC_MODE2;
++ LIRC_CAN_REC_MODE2 |
++ LIRC_CAN_SET_SEND_CARRIER;
+ plugin->data = ir;
+ plugin->rbuf = rbuf;
+ plugin->set_use_inc = &set_use_inc;
+@@ -1108,7 +1227,7 @@
input_dev->name = ir->name;
input_dev->phys = ir->phys;
usb_to_input_id(dev, &input_dev->id);