diff options
author | James Meyer <james.meyer@operamail.com> | 2010-08-30 22:24:02 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2010-08-30 22:24:02 (GMT) |
commit | c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc (patch) | |
tree | f4e4f7a91e1d9d90033fd99d89e5e26a2c144528 /abs/core/lirc | |
parent | 0e7b327a1ae444233f1308a95420f70540ad74a3 (diff) | |
download | linhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.zip linhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.tar.gz linhes_pkgbuild-c4bd4457b5d640e1c8f5afbca7cd54c53691e5fc.tar.bz2 |
RSYNC CORE:
resync core-testing -> core
Signed-off-by: James Meyer <james.meyer@operamail.com>
Diffstat (limited to 'abs/core/lirc')
-rw-r--r-- | abs/core/lirc/lirc_mod_mce.patch | 98 |
1 files changed, 94 insertions, 4 deletions
diff --git a/abs/core/lirc/lirc_mod_mce.patch b/abs/core/lirc/lirc_mod_mce.patch index 314f2d7..1dc6644 100644 --- a/abs/core/lirc/lirc_mod_mce.patch +++ b/abs/core/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); |