aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/budget-ci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/ttpci/budget-ci.c')
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index b82756db5bd1..1d79ada864d6 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -26,7 +26,7 @@
26 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html 26 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
27 * 27 *
28 * 28 *
29 * the project's page is at http://www.linuxtv.org/ 29 * the project's page is at http://www.linuxtv.org/
30 */ 30 */
31 31
32#include <linux/module.h> 32#include <linux/module.h>
@@ -102,6 +102,7 @@ struct budget_ci_ir {
102 int rc5_device; 102 int rc5_device;
103 u32 ir_key; 103 u32 ir_key;
104 bool have_command; 104 bool have_command;
105 bool full_rc5; /* Outputs a full RC5 code */
105}; 106};
106 107
107struct budget_ci { 108struct budget_ci {
@@ -154,11 +155,18 @@ static void msp430_ir_interrupt(unsigned long data)
154 return; 155 return;
155 budget_ci->ir.have_command = false; 156 budget_ci->ir.have_command = false;
156 157
157 /* FIXME: We should generate complete scancodes with device info */
158 if (budget_ci->ir.rc5_device != IR_DEVICE_ANY && 158 if (budget_ci->ir.rc5_device != IR_DEVICE_ANY &&
159 budget_ci->ir.rc5_device != (command & 0x1f)) 159 budget_ci->ir.rc5_device != (command & 0x1f))
160 return; 160 return;
161 161
162 if (budget_ci->ir.full_rc5) {
163 rc_keydown(dev,
164 budget_ci->ir.rc5_device <<8 | budget_ci->ir.ir_key,
165 (command & 0x20) ? 1 : 0);
166 return;
167 }
168
169 /* FIXME: We should generate complete scancodes for all devices */
162 rc_keydown(dev, budget_ci->ir.ir_key, (command & 0x20) ? 1 : 0); 170 rc_keydown(dev, budget_ci->ir.ir_key, (command & 0x20) ? 1 : 0);
163} 171}
164 172
@@ -206,7 +214,8 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
206 case 0x1011: 214 case 0x1011:
207 case 0x1012: 215 case 0x1012:
208 /* The hauppauge keymap is a superset of these remotes */ 216 /* The hauppauge keymap is a superset of these remotes */
209 dev->map_name = RC_MAP_HAUPPAUGE_NEW; 217 dev->map_name = RC_MAP_HAUPPAUGE;
218 budget_ci->ir.full_rc5 = true;
210 219
211 if (rc5_device < 0) 220 if (rc5_device < 0)
212 budget_ci->ir.rc5_device = 0x1f; 221 budget_ci->ir.rc5_device = 0x1f;