diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 00:00:50 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2010-09-05 00:00:50 (GMT) |
commit | 525ff794ffbaa59414fdd94c9aa4dcfc6625fa2a (patch) | |
tree | cbc9c128d61641f4e47f24d0ad6259df476e376d /abs/core-testing/lirc_085/lirc_mod_mce.patch | |
parent | cc0046aa355811c343c144e4898194c8471ec07f (diff) | |
download | linhes_pkgbuild-525ff794ffbaa59414fdd94c9aa4dcfc6625fa2a.zip linhes_pkgbuild-525ff794ffbaa59414fdd94c9aa4dcfc6625fa2a.tar.gz linhes_pkgbuild-525ff794ffbaa59414fdd94c9aa4dcfc6625fa2a.tar.bz2 |
lirc_085:lirc package w/ pvr 150 support.
Diffstat (limited to 'abs/core-testing/lirc_085/lirc_mod_mce.patch')
-rw-r--r-- | abs/core-testing/lirc_085/lirc_mod_mce.patch | 187 |
1 files changed, 187 insertions, 0 deletions
diff --git a/abs/core-testing/lirc_085/lirc_mod_mce.patch b/abs/core-testing/lirc_085/lirc_mod_mce.patch new file mode 100644 index 0000000..1dc6644 --- /dev/null +++ b/abs/core-testing/lirc_085/lirc_mod_mce.patch @@ -0,0 +1,187 @@ +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 + #define VENDOR_SHUTTLE 0x1308 ++#define VENDOR_PHILIPS 0x0471 ++#define VENDOR_SMK 0x0609 ++#define VENDOR_TATUNG 0x1460 ++#define VENDOR_GATEWAY 0x107b ++#define VENDOR_SHUTTLE 0x1308 ++#define VENDOR_SHUTTLE2 0x051c ++#define VENDOR_MITSUMI 0x03ee ++#define VENDOR_TOPSEED 0x1784 ++#define VENDOR_RICAVISION 0x179d ++#define VENDOR_ITRON 0x195d ++#define VENDOR_FIC 0x1509 ++#define VENDOR_LG 0x043e ++#define VENDOR_MICROSOFT 0x045e ++#define VENDOR_FORMOSA 0x147a ++#define VENDOR_FINTEK 0x1934 + #define VENDOR_PINNACLE 0x2304 + +- + static struct usb_device_id usb_remote_table [] = { +- { USB_DEVICE(VENDOR_PHILIPS, 0x0815) }, /* Philips eHome Infrared Transciever */ +- { USB_DEVICE(VENDOR_SMK, 0x031d) }, /* SMK/Toshiba G83C0004D410 */ +- { USB_DEVICE(VENDOR_TATUNG, 0x9150) }, /* Tatung eHome Infrared Transceiver */ +- { USB_DEVICE(VENDOR_SHUTTLE, 0xc001) }, /* Shuttle eHome Infrared Transceiver */ +- { USB_DEVICE(VENDOR_GATEWAY, 0x3009) }, /* Gateway eHome Infrared Transceiver */ +- { USB_DEVICE(VENDOR_PINNACLE, 0x0225) }, /* Pinnacle Remote USB RC6 */ +- { } /* Terminating entry */ ++ /* Philips eHome Infrared Transciever */ ++ { USB_DEVICE(VENDOR_PHILIPS, 0x0815) }, ++ /* Philips Infrared Transciever - HP branded */ ++ { USB_DEVICE(VENDOR_PHILIPS, 0x060c) }, ++ /* Philips SRM5100 */ ++ { USB_DEVICE(VENDOR_PHILIPS, 0x060d) }, ++ /* SMK/Toshiba G83C0004D410 */ ++ { USB_DEVICE(VENDOR_SMK, 0x031d) }, ++ /* SMK eHome Infrared Transceiver (Sony VAIO) */ ++ { USB_DEVICE(VENDOR_SMK, 0x0322) }, ++ /* bundled with Hauppauge PVR-150 */ ++ { USB_DEVICE(VENDOR_SMK, 0x0334) }, ++ /* Tatung eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_TATUNG, 0x9150) }, ++ /* Shuttle eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_SHUTTLE, 0xc001) }, ++ /* Shuttle eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_SHUTTLE2, 0xc001) }, ++ /* Gateway eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_GATEWAY, 0x3009) }, ++ /* Mitsumi */ ++ { USB_DEVICE(VENDOR_MITSUMI, 0x2501) }, ++ /* Topseed eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_TOPSEED, 0x0001) }, ++ /* Topseed HP eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_TOPSEED, 0x0006) }, ++ /* Topseed eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_TOPSEED, 0x0007) }, ++ /* Topseed eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_TOPSEED, 0x0008) }, ++ /* Ricavision internal Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_RICAVISION, 0x0010) }, ++ /* Itron ione Libra Q-11 */ ++ { USB_DEVICE(VENDOR_ITRON, 0x7002) }, ++ /* FIC eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_FIC, 0x9242) }, ++ /* LG eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_LG, 0x9803) }, ++ /* Microsoft MCE Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_MICROSOFT, 0x00a0) }, ++ /* Formosa eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_FORMOSA, 0xe015) }, ++ /* Formosa aim / Trust MCE Infrared Receiver */ ++ { USB_DEVICE(VENDOR_FORMOSA, 0xe017) }, ++ /* Formosa Industrial Computing / Beanbag Emulation Device */ ++ { USB_DEVICE(VENDOR_FORMOSA, 0xe018) }, ++ /* Fintek eHome Infrared Transceiver */ ++ { USB_DEVICE(VENDOR_FINTEK, 0x0602) }, ++ /* Pinnacle Remote USB RC6 */ ++ { USB_DEVICE(VENDOR_PINNACLE, 0x0225) }, ++ /* Terminating entry */ ++ { } + }; + + static unsigned char usb_kbd_keycode[256] = { +@@ -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); +- input_dev->cdev.dev = &dev->dev; ++ input_dev->dev.parent = &dev->dev; + input_dev->evbit[BIT_WORD(EV_KEY)] |= BIT_MASK(EV_KEY); + input_dev->evbit[BIT_WORD(EV_REL)] |= BIT_MASK(EV_REL); + input_dev->relbit[BIT_WORD(REL_X)] |= BIT_MASK(REL_X); |