cx88-input.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. /*
  2. *
  3. * Device driver for GPIO attached remote control interfaces
  4. * on Conexant 2388x based TV/DVB cards.
  5. *
  6. * Copyright (c) 2003 Pavel Machek
  7. * Copyright (c) 2004 Gerd Knorr
  8. * Copyright (c) 2004 Chris Pascoe
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. */
  24. #include <linux/init.h>
  25. #include <linux/delay.h>
  26. #include <linux/input.h>
  27. #include <linux/pci.h>
  28. #include <linux/module.h>
  29. #include <linux/moduleparam.h>
  30. #include <media/ir-common.h>
  31. #include "cx88.h"
  32. /* ---------------------------------------------------------------------- */
  33. /* DigitalNow DNTV Live DVB-T Remote */
  34. static IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE] = {
  35. [0x00] = KEY_ESC, /* 'go up a level?' */
  36. /* Keys 0 to 9 */
  37. [0x0a] = KEY_KP0,
  38. [0x01] = KEY_KP1,
  39. [0x02] = KEY_KP2,
  40. [0x03] = KEY_KP3,
  41. [0x04] = KEY_KP4,
  42. [0x05] = KEY_KP5,
  43. [0x06] = KEY_KP6,
  44. [0x07] = KEY_KP7,
  45. [0x08] = KEY_KP8,
  46. [0x09] = KEY_KP9,
  47. [0x0b] = KEY_TUNER, /* tv/fm */
  48. [0x0c] = KEY_SEARCH, /* scan */
  49. [0x0d] = KEY_STOP,
  50. [0x0e] = KEY_PAUSE,
  51. [0x0f] = KEY_LIST, /* source */
  52. [0x10] = KEY_MUTE,
  53. [0x11] = KEY_REWIND, /* backward << */
  54. [0x12] = KEY_POWER,
  55. [0x13] = KEY_S, /* snap */
  56. [0x14] = KEY_AUDIO, /* stereo */
  57. [0x15] = KEY_CLEAR, /* reset */
  58. [0x16] = KEY_PLAY,
  59. [0x17] = KEY_ENTER,
  60. [0x18] = KEY_ZOOM, /* full screen */
  61. [0x19] = KEY_FASTFORWARD, /* forward >> */
  62. [0x1a] = KEY_CHANNELUP,
  63. [0x1b] = KEY_VOLUMEUP,
  64. [0x1c] = KEY_INFO, /* preview */
  65. [0x1d] = KEY_RECORD, /* record */
  66. [0x1e] = KEY_CHANNELDOWN,
  67. [0x1f] = KEY_VOLUMEDOWN,
  68. };
  69. /* ---------------------------------------------------------------------- */
  70. /* IO-DATA BCTV7E Remote */
  71. static IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE] = {
  72. [0x40] = KEY_TV,
  73. [0x20] = KEY_RADIO, /* FM */
  74. [0x60] = KEY_EPG,
  75. [0x00] = KEY_POWER,
  76. /* Keys 0 to 9 */
  77. [0x44] = KEY_KP0, /* 10 */
  78. [0x50] = KEY_KP1,
  79. [0x30] = KEY_KP2,
  80. [0x70] = KEY_KP3,
  81. [0x48] = KEY_KP4,
  82. [0x28] = KEY_KP5,
  83. [0x68] = KEY_KP6,
  84. [0x58] = KEY_KP7,
  85. [0x38] = KEY_KP8,
  86. [0x78] = KEY_KP9,
  87. [0x10] = KEY_L, /* Live */
  88. [0x08] = KEY_T, /* Time Shift */
  89. [0x18] = KEY_PLAYPAUSE, /* Play */
  90. [0x24] = KEY_ENTER, /* 11 */
  91. [0x64] = KEY_ESC, /* 12 */
  92. [0x04] = KEY_M, /* Multi */
  93. [0x54] = KEY_VIDEO,
  94. [0x34] = KEY_CHANNELUP,
  95. [0x74] = KEY_VOLUMEUP,
  96. [0x14] = KEY_MUTE,
  97. [0x4c] = KEY_S, /* SVIDEO */
  98. [0x2c] = KEY_CHANNELDOWN,
  99. [0x6c] = KEY_VOLUMEDOWN,
  100. [0x0c] = KEY_ZOOM,
  101. [0x5c] = KEY_PAUSE,
  102. [0x3c] = KEY_C, /* || (red) */
  103. [0x7c] = KEY_RECORD, /* recording */
  104. [0x1c] = KEY_STOP,
  105. [0x41] = KEY_REWIND, /* backward << */
  106. [0x21] = KEY_PLAY,
  107. [0x61] = KEY_FASTFORWARD, /* forward >> */
  108. [0x01] = KEY_NEXT, /* skip >| */
  109. };
  110. /* ---------------------------------------------------------------------- */
  111. /* ADS Tech Instant TV DVB-T PCI Remote */
  112. static IR_KEYTAB_TYPE ir_codes_adstech_dvb_t_pci[IR_KEYTAB_SIZE] = {
  113. /* Keys 0 to 9 */
  114. [0x4d] = KEY_0,
  115. [0x57] = KEY_1,
  116. [0x4f] = KEY_2,
  117. [0x53] = KEY_3,
  118. [0x56] = KEY_4,
  119. [0x4e] = KEY_5,
  120. [0x5e] = KEY_6,
  121. [0x54] = KEY_7,
  122. [0x4c] = KEY_8,
  123. [0x5c] = KEY_9,
  124. [0x5b] = KEY_POWER,
  125. [0x5f] = KEY_MUTE,
  126. [0x55] = KEY_GOTO,
  127. [0x5d] = KEY_SEARCH,
  128. [0x17] = KEY_EPG, /* Guide */
  129. [0x1f] = KEY_MENU,
  130. [0x0f] = KEY_UP,
  131. [0x46] = KEY_DOWN,
  132. [0x16] = KEY_LEFT,
  133. [0x1e] = KEY_RIGHT,
  134. [0x0e] = KEY_SELECT, /* Enter */
  135. [0x5a] = KEY_INFO,
  136. [0x52] = KEY_EXIT,
  137. [0x59] = KEY_PREVIOUS,
  138. [0x51] = KEY_NEXT,
  139. [0x58] = KEY_REWIND,
  140. [0x50] = KEY_FORWARD,
  141. [0x44] = KEY_PLAYPAUSE,
  142. [0x07] = KEY_STOP,
  143. [0x1b] = KEY_RECORD,
  144. [0x13] = KEY_TUNER, /* Live */
  145. [0x0a] = KEY_A,
  146. [0x12] = KEY_B,
  147. [0x03] = KEY_PROG1, /* 1 */
  148. [0x01] = KEY_PROG2, /* 2 */
  149. [0x00] = KEY_PROG3, /* 3 */
  150. [0x06] = KEY_DVD,
  151. [0x48] = KEY_AUX, /* Photo */
  152. [0x40] = KEY_VIDEO,
  153. [0x19] = KEY_AUDIO, /* Music */
  154. [0x0b] = KEY_CHANNELUP,
  155. [0x08] = KEY_CHANNELDOWN,
  156. [0x15] = KEY_VOLUMEUP,
  157. [0x1c] = KEY_VOLUMEDOWN,
  158. };
  159. /* ---------------------------------------------------------------------- */
  160. /* MSI TV@nywhere remote */
  161. static IR_KEYTAB_TYPE ir_codes_msi_tvanywhere[IR_KEYTAB_SIZE] = {
  162. /* Keys 0 to 9 */
  163. [0x00] = KEY_0,
  164. [0x01] = KEY_1,
  165. [0x02] = KEY_2,
  166. [0x03] = KEY_3,
  167. [0x04] = KEY_4,
  168. [0x05] = KEY_5,
  169. [0x06] = KEY_6,
  170. [0x07] = KEY_7,
  171. [0x08] = KEY_8,
  172. [0x09] = KEY_9,
  173. [0x0c] = KEY_MUTE,
  174. [0x0f] = KEY_SCREEN, /* Full Screen */
  175. [0x10] = KEY_F, /* Funtion */
  176. [0x11] = KEY_T, /* Time shift */
  177. [0x12] = KEY_POWER,
  178. [0x13] = KEY_MEDIA, /* MTS */
  179. [0x14] = KEY_SLOW,
  180. [0x16] = KEY_REWIND, /* backward << */
  181. [0x17] = KEY_ENTER, /* Return */
  182. [0x18] = KEY_FASTFORWARD, /* forward >> */
  183. [0x1a] = KEY_CHANNELUP,
  184. [0x1b] = KEY_VOLUMEUP,
  185. [0x1e] = KEY_CHANNELDOWN,
  186. [0x1f] = KEY_VOLUMEDOWN,
  187. };
  188. /* ---------------------------------------------------------------------- */
  189. /* Cinergy 1400 DVB-T */
  190. static IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE] = {
  191. [0x01] = KEY_POWER,
  192. [0x02] = KEY_1,
  193. [0x03] = KEY_2,
  194. [0x04] = KEY_3,
  195. [0x05] = KEY_4,
  196. [0x06] = KEY_5,
  197. [0x07] = KEY_6,
  198. [0x08] = KEY_7,
  199. [0x09] = KEY_8,
  200. [0x0a] = KEY_9,
  201. [0x0c] = KEY_0,
  202. [0x0b] = KEY_VIDEO,
  203. [0x0d] = KEY_REFRESH,
  204. [0x0e] = KEY_SELECT,
  205. [0x0f] = KEY_EPG,
  206. [0x10] = KEY_UP,
  207. [0x11] = KEY_LEFT,
  208. [0x12] = KEY_OK,
  209. [0x13] = KEY_RIGHT,
  210. [0x14] = KEY_DOWN,
  211. [0x15] = KEY_TEXT,
  212. [0x16] = KEY_INFO,
  213. [0x17] = KEY_RED,
  214. [0x18] = KEY_GREEN,
  215. [0x19] = KEY_YELLOW,
  216. [0x1a] = KEY_BLUE,
  217. [0x1b] = KEY_CHANNELUP,
  218. [0x1c] = KEY_VOLUMEUP,
  219. [0x1d] = KEY_MUTE,
  220. [0x1e] = KEY_VOLUMEDOWN,
  221. [0x1f] = KEY_CHANNELDOWN,
  222. [0x40] = KEY_PAUSE,
  223. [0x4c] = KEY_PLAY,
  224. [0x58] = KEY_RECORD,
  225. [0x54] = KEY_PREVIOUS,
  226. [0x48] = KEY_STOP,
  227. [0x5c] = KEY_NEXT,
  228. };
  229. /* ---------------------------------------------------------------------- */
  230. struct cx88_IR {
  231. struct cx88_core *core;
  232. struct input_dev *input;
  233. struct ir_input_state ir;
  234. char name[32];
  235. char phys[32];
  236. /* sample from gpio pin 16 */
  237. int sampling;
  238. u32 samples[16];
  239. int scount;
  240. unsigned long release;
  241. /* poll external decoder */
  242. int polling;
  243. struct work_struct work;
  244. struct timer_list timer;
  245. u32 gpio_addr;
  246. u32 last_gpio;
  247. u32 mask_keycode;
  248. u32 mask_keydown;
  249. u32 mask_keyup;
  250. };
  251. static int ir_debug = 0;
  252. module_param(ir_debug, int, 0644); /* debug level [IR] */
  253. MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
  254. #define ir_dprintk(fmt, arg...) if (ir_debug) \
  255. printk(KERN_DEBUG "%s IR: " fmt , ir->core->name , ##arg)
  256. /* ---------------------------------------------------------------------- */
  257. static void cx88_ir_handle_key(struct cx88_IR *ir)
  258. {
  259. struct cx88_core *core = ir->core;
  260. u32 gpio, data;
  261. /* read gpio value */
  262. gpio = cx_read(ir->gpio_addr);
  263. if (ir->polling) {
  264. if (ir->last_gpio == gpio)
  265. return;
  266. ir->last_gpio = gpio;
  267. }
  268. /* extract data */
  269. data = ir_extract_bits(gpio, ir->mask_keycode);
  270. ir_dprintk("irq gpio=0x%x code=%d | %s%s%s\n",
  271. gpio, data,
  272. ir->polling ? "poll" : "irq",
  273. (gpio & ir->mask_keydown) ? " down" : "",
  274. (gpio & ir->mask_keyup) ? " up" : "");
  275. if (ir->mask_keydown) {
  276. /* bit set on keydown */
  277. if (gpio & ir->mask_keydown) {
  278. ir_input_keydown(ir->input, &ir->ir, data, data);
  279. } else {
  280. ir_input_nokey(ir->input, &ir->ir);
  281. }
  282. } else if (ir->mask_keyup) {
  283. /* bit cleared on keydown */
  284. if (0 == (gpio & ir->mask_keyup)) {
  285. ir_input_keydown(ir->input, &ir->ir, data, data);
  286. } else {
  287. ir_input_nokey(ir->input, &ir->ir);
  288. }
  289. } else {
  290. /* can't distinguish keydown/up :-/ */
  291. ir_input_keydown(ir->input, &ir->ir, data, data);
  292. ir_input_nokey(ir->input, &ir->ir);
  293. }
  294. }
  295. static void ir_timer(unsigned long data)
  296. {
  297. struct cx88_IR *ir = (struct cx88_IR *)data;
  298. schedule_work(&ir->work);
  299. }
  300. static void cx88_ir_work(void *data)
  301. {
  302. struct cx88_IR *ir = data;
  303. unsigned long timeout;
  304. cx88_ir_handle_key(ir);
  305. timeout = jiffies + (ir->polling * HZ / 1000);
  306. mod_timer(&ir->timer, timeout);
  307. }
  308. /* ---------------------------------------------------------------------- */
  309. int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
  310. {
  311. struct cx88_IR *ir;
  312. struct input_dev *input_dev;
  313. IR_KEYTAB_TYPE *ir_codes = NULL;
  314. int ir_type = IR_TYPE_OTHER;
  315. ir = kzalloc(sizeof(*ir), GFP_KERNEL);
  316. input_dev = input_allocate_device();
  317. if (!ir || !input_dev) {
  318. kfree(ir);
  319. input_free_device(input_dev);
  320. return -ENOMEM;
  321. }
  322. ir->input = input_dev;
  323. /* detect & configure */
  324. switch (core->board) {
  325. case CX88_BOARD_DNTV_LIVE_DVB_T:
  326. case CX88_BOARD_KWORLD_DVB_T:
  327. ir_codes = ir_codes_dntv_live_dvb_t;
  328. ir->gpio_addr = MO_GP1_IO;
  329. ir->mask_keycode = 0x1f;
  330. ir->mask_keyup = 0x60;
  331. ir->polling = 50; /* ms */
  332. break;
  333. case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1:
  334. ir_codes = ir_codes_cinergy_1400;
  335. ir_type = IR_TYPE_PD;
  336. ir->sampling = 1;
  337. break;
  338. case CX88_BOARD_HAUPPAUGE:
  339. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  340. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  341. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  342. case CX88_BOARD_HAUPPAUGE_HVR1100:
  343. ir_codes = ir_codes_hauppauge_new;
  344. ir_type = IR_TYPE_RC5;
  345. ir->sampling = 1;
  346. break;
  347. case CX88_BOARD_WINFAST2000XP_EXPERT:
  348. ir_codes = ir_codes_winfast;
  349. ir->gpio_addr = MO_GP0_IO;
  350. ir->mask_keycode = 0x8f8;
  351. ir->mask_keyup = 0x100;
  352. ir->polling = 1; /* ms */
  353. break;
  354. case CX88_BOARD_IODATA_GVBCTV7E:
  355. ir_codes = ir_codes_iodata_bctv7e;
  356. ir->gpio_addr = MO_GP0_IO;
  357. ir->mask_keycode = 0xfd;
  358. ir->mask_keydown = 0x02;
  359. ir->polling = 5; /* ms */
  360. break;
  361. case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO:
  362. ir_codes = ir_codes_pixelview;
  363. ir->gpio_addr = MO_GP1_IO;
  364. ir->mask_keycode = 0x1f;
  365. ir->mask_keyup = 0x80;
  366. ir->polling = 1; /* ms */
  367. break;
  368. case CX88_BOARD_ADSTECH_DVB_T_PCI:
  369. ir_codes = ir_codes_adstech_dvb_t_pci;
  370. ir->gpio_addr = MO_GP1_IO;
  371. ir->mask_keycode = 0xbf;
  372. ir->mask_keyup = 0x40;
  373. ir->polling = 50; /* ms */
  374. break;
  375. case CX88_BOARD_MSI_TVANYWHERE_MASTER:
  376. ir_codes = ir_codes_msi_tvanywhere;
  377. ir->gpio_addr = MO_GP1_IO;
  378. ir->mask_keycode = 0x1f;
  379. ir->mask_keyup = 0x40;
  380. ir->polling = 1; /* ms */
  381. break;
  382. }
  383. if (NULL == ir_codes) {
  384. kfree(ir);
  385. input_free_device(input_dev);
  386. return -ENODEV;
  387. }
  388. /* init input device */
  389. snprintf(ir->name, sizeof(ir->name), "cx88 IR (%s)",
  390. cx88_boards[core->board].name);
  391. snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(pci));
  392. ir_input_init(input_dev, &ir->ir, ir_type, ir_codes);
  393. input_dev->name = ir->name;
  394. input_dev->phys = ir->phys;
  395. input_dev->id.bustype = BUS_PCI;
  396. input_dev->id.version = 1;
  397. if (pci->subsystem_vendor) {
  398. input_dev->id.vendor = pci->subsystem_vendor;
  399. input_dev->id.product = pci->subsystem_device;
  400. } else {
  401. input_dev->id.vendor = pci->vendor;
  402. input_dev->id.product = pci->device;
  403. }
  404. input_dev->cdev.dev = &pci->dev;
  405. /* record handles to ourself */
  406. ir->core = core;
  407. core->ir = ir;
  408. if (ir->polling) {
  409. INIT_WORK(&ir->work, cx88_ir_work, ir);
  410. init_timer(&ir->timer);
  411. ir->timer.function = ir_timer;
  412. ir->timer.data = (unsigned long)ir;
  413. schedule_work(&ir->work);
  414. }
  415. if (ir->sampling) {
  416. core->pci_irqmask |= (1 << 18); /* IR_SMP_INT */
  417. cx_write(MO_DDS_IO, 0xa80a80); /* 4 kHz sample rate */
  418. cx_write(MO_DDSCFG_IO, 0x5); /* enable */
  419. }
  420. /* all done */
  421. input_register_device(ir->input);
  422. return 0;
  423. }
  424. int cx88_ir_fini(struct cx88_core *core)
  425. {
  426. struct cx88_IR *ir = core->ir;
  427. /* skip detach on non attached boards */
  428. if (NULL == ir)
  429. return 0;
  430. if (ir->polling) {
  431. del_timer(&ir->timer);
  432. flush_scheduled_work();
  433. }
  434. input_unregister_device(ir->input);
  435. kfree(ir);
  436. /* done */
  437. core->ir = NULL;
  438. return 0;
  439. }
  440. /* ---------------------------------------------------------------------- */
  441. void cx88_ir_irq(struct cx88_core *core)
  442. {
  443. struct cx88_IR *ir = core->ir;
  444. u32 samples, ircode;
  445. int i;
  446. if (NULL == ir)
  447. return;
  448. if (!ir->sampling)
  449. return;
  450. samples = cx_read(MO_SAMPLE_IO);
  451. if (0 != samples && 0xffffffff != samples) {
  452. /* record sample data */
  453. if (ir->scount < ARRAY_SIZE(ir->samples))
  454. ir->samples[ir->scount++] = samples;
  455. return;
  456. }
  457. if (!ir->scount) {
  458. /* nothing to sample */
  459. if (ir->ir.keypressed && time_after(jiffies, ir->release))
  460. ir_input_nokey(ir->input, &ir->ir);
  461. return;
  462. }
  463. /* have a complete sample */
  464. if (ir->scount < ARRAY_SIZE(ir->samples))
  465. ir->samples[ir->scount++] = samples;
  466. for (i = 0; i < ir->scount; i++)
  467. ir->samples[i] = ~ir->samples[i];
  468. if (ir_debug)
  469. ir_dump_samples(ir->samples, ir->scount);
  470. /* decode it */
  471. switch (core->board) {
  472. case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1:
  473. ircode = ir_decode_pulsedistance(ir->samples, ir->scount, 1, 4);
  474. if (ircode == 0xffffffff) { /* decoding error */
  475. ir_dprintk("pulse distance decoding error\n");
  476. break;
  477. }
  478. ir_dprintk("pulse distance decoded: %x\n", ircode);
  479. if (ircode == 0) { /* key still pressed */
  480. ir_dprintk("pulse distance decoded repeat code\n");
  481. ir->release = jiffies + msecs_to_jiffies(120);
  482. break;
  483. }
  484. if ((ircode & 0xffff) != 0xeb04) { /* wrong address */
  485. ir_dprintk("pulse distance decoded wrong address\n");
  486. break;
  487. }
  488. if (((~ircode >> 24) & 0xff) != ((ircode >> 16) & 0xff)) { /* wrong checksum */
  489. ir_dprintk("pulse distance decoded wrong check sum\n");
  490. break;
  491. }
  492. ir_dprintk("Key Code: %x\n", (ircode >> 16) & 0x7f);
  493. ir_input_keydown(ir->input, &ir->ir, (ircode >> 16) & 0x7f, (ircode >> 16) & 0xff);
  494. ir->release = jiffies + msecs_to_jiffies(120);
  495. break;
  496. case CX88_BOARD_HAUPPAUGE:
  497. case CX88_BOARD_HAUPPAUGE_DVB_T1:
  498. case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
  499. case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
  500. ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7);
  501. ir_dprintk("biphase decoded: %x\n", ircode);
  502. if ((ircode & 0xfffff000) != 0x3000)
  503. break;
  504. ir_input_keydown(ir->input, &ir->ir, ircode & 0x3f, ircode);
  505. ir->release = jiffies + msecs_to_jiffies(120);
  506. break;
  507. }
  508. ir->scount = 0;
  509. return;
  510. }
  511. /* ---------------------------------------------------------------------- */
  512. MODULE_AUTHOR("Gerd Knorr, Pavel Machek, Chris Pascoe");
  513. MODULE_DESCRIPTION("input driver for cx88 GPIO-based IR remote controls");
  514. MODULE_LICENSE("GPL");
  515. /*
  516. * Local variables:
  517. * c-basic-offset: 8
  518. * End:
  519. */