aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/IR
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2010-04-08 19:04:35 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:57:16 -0400
commit25bb10c11e6cca461f09df8f59c2eb501a9e4d52 (patch)
treeefcccd884cca48b971093d3ba9e29ea3d96a0087 /drivers/media/IR
parent733419b5c4d29186006982a9a27227e214a39dbc (diff)
V4L/DVB: Add NECx support to ir-core
This patch adds NECx support to drivers/media/IR/ir-nec-decoder.c Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR')
-rw-r--r--drivers/media/IR/ir-nec-decoder.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c
index 4c223f611a5e..14609d9580a8 100644
--- a/drivers/media/IR/ir-nec-decoder.c
+++ b/drivers/media/IR/ir-nec-decoder.c
@@ -18,6 +18,7 @@
18#define NEC_NBITS 32 18#define NEC_NBITS 32
19#define NEC_UNIT 562500 /* ns */ 19#define NEC_UNIT 562500 /* ns */
20#define NEC_HEADER_PULSE PULSE(16) 20#define NEC_HEADER_PULSE PULSE(16)
21#define NECX_HEADER_PULSE PULSE(8) /* Less common NEC variant */
21#define NEC_HEADER_SPACE SPACE(8) 22#define NEC_HEADER_SPACE SPACE(8)
22#define NEC_REPEAT_SPACE SPACE(4) 23#define NEC_REPEAT_SPACE SPACE(4)
23#define NEC_BIT_PULSE PULSE(1) 24#define NEC_BIT_PULSE PULSE(1)
@@ -152,7 +153,7 @@ static int ir_nec_decode(struct input_dev *input_dev, s64 duration)
152 switch (data->state) { 153 switch (data->state) {
153 154
154 case STATE_INACTIVE: 155 case STATE_INACTIVE:
155 if (u == NEC_HEADER_PULSE) { 156 if (u == NEC_HEADER_PULSE || u == NECX_HEADER_PULSE) {
156 data->count = 0; 157 data->count = 0;
157 data->state = STATE_HEADER_SPACE; 158 data->state = STATE_HEADER_SPACE;
158 } 159 }